|
|
1 |
Frequently asked questions |
|
|
2 |
-------------------------- |
|
|
3 |
|
|
|
4 |
Q: How much data can Flot cope with? |
|
|
5 |
|
|
|
6 |
A: Flot will happily draw everything you send to it so the answer |
|
|
7 |
depends on the browser. The excanvas emulation used for IE (built with |
|
|
8 |
VML) makes IE by far the slowest browser so be sure to test with that |
|
|
9 |
if IE users are in your target group. |
|
|
10 |
|
|
|
11 |
1000 points is not a problem, but as soon as you start having more |
|
|
12 |
points than the pixel width, you should probably start thinking about |
|
|
13 |
downsampling/aggregation as this is near the resolution limit of the |
|
|
14 |
chart anyway. If you downsample server-side, you also save bandwidth. |
|
|
15 |
|
|
|
16 |
|
|
|
17 |
Q: Flot isn't working when I'm using JSON data as source! |
|
|
18 |
|
|
|
19 |
A: Actually, Flot loves JSON data, you just got the format wrong. |
|
|
20 |
Double check that you're not inputting strings instead of numbers, |
|
|
21 |
like [["0", "-2.13"], ["5", "4.3"]]. This is most common mistake, and |
|
|
22 |
the error might not show up immediately because Javascript can do some |
|
|
23 |
conversion automatically. |
|
|
24 |
|
|
|
25 |
|
|
|
26 |
Q: Can I export the graph? |
|
|
27 |
|
|
|
28 |
A: This is a limitation of the canvas technology. There's a hook in |
|
|
29 |
the canvas object for getting an image out, but you won't get the tick |
|
|
30 |
labels. And it's not likely to be supported by IE. At this point, your |
|
|
31 |
best bet is probably taking a screenshot, e.g. with PrtScn. |
|
|
32 |
|
|
|
33 |
|
|
|
34 |
Q: The bars are all tiny in time mode? |
|
|
35 |
|
|
|
36 |
A: It's not really possible to determine the bar width automatically. |
|
|
37 |
So you have to set the width with the barWidth option which is NOT in |
|
|
38 |
pixels, but in the units of the x axis (or the y axis for horizontal |
|
|
39 |
bars). For time mode that's milliseconds so the default value of 1 |
|
|
40 |
makes the bars 1 millisecond wide. |
|
|
41 |
|
|
|
42 |
|
|
|
43 |
Q: Can I use Flot with libraries like Mootools or Prototype? |
|
|
44 |
|
|
|
45 |
A: Yes, Flot supports it out of the box and it's easy! Just use jQuery |
|
|
46 |
instead of $, e.g. call jQuery.plot instead of $.plot and use |
|
|
47 |
jQuery(something) instead of $(something). As a convenience, you can |
|
|
48 |
put in a DOM element for the graph placeholder where the examples and |
|
|
49 |
the API documentation are using jQuery objects. |
|
|
50 |
|
|
|
51 |
Depending on how you include jQuery, you may have to add one line of |
|
|
52 |
code to prevent jQuery from overwriting functions from the other |
|
|
53 |
libraries, see the documentation in jQuery ("Using jQuery with other |
|
|
54 |
libraries") for details. |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
Q: Flot doesn't work with [widget framework xyz]! |
|
|
58 |
|
|
|
59 |
A: The problem is most likely within the framework, or your use of the |
|
|
60 |
framework. |
|
|
61 |
|
|
|
62 |
The only non-standard thing used by Flot is the canvas tag; otherwise |
|
|
63 |
it is simply a series of absolute positioned divs within the |
|
|
64 |
placeholder tag you put in. If this is not working, it's probably |
|
|
65 |
because the framework you're using is doing something weird with the |
|
|
66 |
DOM. As a last resort, you might try replotting and see if it helps. |
|
|
67 |
|
|
|
68 |
If you find there's a specific thing we can do to Flot to help, feel |
|
|
69 |
free to submit a bug report. Otherwise, you're welcome to ask for help |
|
|
70 |
on the mailing list, but please don't submit a bug report to Flot - |
|
|
71 |
try the framework instead. |
|
|
72 |
|