-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME
38 lines (26 loc) · 1.07 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Flot-SproutCore provides framework for integrating flot into SproutCore applications.
The Flot-SproutCore directory is an example SproutCore application. If you have SproutCore installed and want to see the example, type:
cd flot-integration
sc-server
and go to http://localhost:4020/demo in your browser.
If you would like to add flot integration support to your existing app
mkdir myapp_dir/frameworks
cd flot-integration/frameworks
cp -r flot myapp_dir/frameworks
and add this line to your Buildfile:
config :all, :required => [:sproutcore, :flot]
restart server if necessary.
Now, you can create Flot views like this
Flot.GraphView.design({
layout: { left: 0, top: 0, height: 200, right: 0 } ,
data: [
SC.Object.create({label: 'set1', data:[[0,0], [1, 3], [2, 4]]}) ,
] ,
options: SC.Object.create({
// your options here
})
})
Notes:
since the flot-svn is a submodule, after cloning the repo it is important to do:
git submodule init and then
git submodule update otherwise the demo won't run because it can't find the flot sources.