forked from markrcote/flot-hiddengraphs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
35 lines (27 loc) · 1016 Bytes
/
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
Plugin to hide series in flot graphs.
https://github.com/markrcote/flot-hiddengraphs
To activate, set legend.hideable to true in the flot options object.
To hide one or more series by default, set legend.hidden to an array of
label strings.
At the moment, this only works with line graphs and assumes that
points.show and lines.show are both true.
Example:
var plotdata = [{data: [[1, 1], [2, 1], [3, 3], [4, 2], [5, 5]],
label: "graph 1"},
{data: [[1, 0], [2, 1], [3, 0], [4, 4], [5, 3]],
label: "graph 2"}];
plot = $.plot($("#placeholder"), plotdata, {
series: {
points: { show: true },
lines: { show: true }
},
legend: {
hideable: true,
hidden: ["graph 1", "graph 2"]
}
});
TODO
----
- Make links/buttons configurable
- Support other types of graphs than just points and lines
- Make mouseovers a little less flakey--mouseout events sometimes missed