0
2
4
6
8
10
12
-2.5
0.0
2.5
5.0
7.5
10.0
12.5
Simple example. You don't need to specify much to get an attractive look. Put in a placeholder, make sure you set its dimensions (otherwise the plot library will barf) and call the plot function with the data. The axes are automatically scaled.
0
2
4
6
8
10
12
-1.0
-0.5
0.0
0.5
1.0
sin(x) | |
cos(x) |
One of the goals of Flot is to support user interactions. Try pointing and clicking on the points.
Mouse hovers at (0, 0).
A tooltip is easy to build with a bit of jQuery code and the data returned from the plot.
Enable tooltip
No comments:
Post a Comment