forked from imxiaobo/flot-sproutcore
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
32 lines (22 loc) · 891 Bytes
/
README
File metadata and controls
32 lines (22 loc) · 891 Bytes
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
Flot integration provides framework for integrating Flot into SproutCore framework.
The flot-integration 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
})
})