Flexible Charts, extend the awesome flot library for much more easy integration
Start with a simple table and the plugin makes the chart for you!
|
Label 1 |
Label 2 |
Label 3 |
Label 4 |
Label 5 |
Label 6 |
First Label |
48 |
125 |
159 |
147 |
154 |
114 |
Second Label |
8 |
27 |
25 |
79 |
47 |
59 |
Third Label |
28 |
56 |
98 |
112 |
87 |
26 |
Fourth Label |
38 |
43 |
69 |
54 |
16 |
16 |
This Table is used in all Examples!
Furthermore you can use a Javascript Object for the data too
Exactly the same data is used here
xlabels:['Label 1', 'Label 2', 'Label 3', 'Label 4', 'Label 5', 'Label 6'],
data:[{
label:'First Label',
data:[[0,48],[1,125],[2,159],[3,147],[4,154],[5,114]]
},{
label:'Second Label',
data:[[0,8],[1,27],[2,25],[3,79],[4,47],[5,59]]
},{
label:'Third Label',
data:[[0,28],[1,56],[2,98],[3,112],[4,87],[5,26]]
},{
label:'Fourth Label',
data:[[0,38],[1,43],[2,69],[3,54],[4,16],[5,16]]
}]
Line Charts
|
Label 1 |
Label 2 |
Label 3 |
Label 4 |
Label 5 |
Label 6 |
First Label |
48 |
125 |
159 |
147 |
154 |
114 |
Second Label |
8 |
27 |
25 |
79 |
47 |
59 |
Third Label |
28 |
56 |
98 |
112 |
87 |
26 |
Fourth Label |
38 |
43 |
69 |
54 |
16 |
16 |
Bar Charts
|
Label 1 |
Label 2 |
Label 3 |
Label 4 |
Label 5 |
Label 6 |
First Label |
48 |
125 |
159 |
147 |
154 |
114 |
Second Label |
8 |
27 |
25 |
79 |
47 |
59 |
Third Label |
28 |
56 |
98 |
112 |
87 |
26 |
Fourth Label |
38 |
43 |
69 |
54 |
16 |
16 |
Stacked Bar Charts
|
Label 1 |
Label 2 |
Label 3 |
Label 4 |
Label 5 |
Label 6 |
First Label |
48 |
125 |
159 |
147 |
154 |
114 |
Second Label |
8 |
27 |
25 |
79 |
47 |
59 |
Third Label |
28 |
56 |
98 |
112 |
87 |
26 |
Fourth Label |
38 |
43 |
69 |
54 |
16 |
16 |
Changed Orientation
use data-orientation="vertical"
to parse the table vertical
|
Label 1 |
Label 2 |
Label 3 |
Label 4 |
Label 5 |
Label 6 |
First Label |
48 |
125 |
159 |
147 |
154 |
114 |
Second Label |
8 |
27 |
25 |
79 |
47 |
59 |
Third Label |
28 |
56 |
98 |
112 |
87 |
26 |
Fourth Label |
38 |
43 |
69 |
54 |
16 |
16 |
More customisation
This Chart has following options:
data-points="false" data-fill="true" data-line-width="1" data-legend="false" data-stack="true" data-tooltip-gravity="s" data-tooltip-pattern="This is a custom Tooltip Pattern. Use placeholders (%n) to include data: %1 or '%3'"
|
Label 1 |
Label 2 |
Label 3 |
Label 4 |
Label 5 |
Label 6 |
First Label |
48 |
125 |
159 |
147 |
154 |
114 |
Second Label |
8 |
27 |
25 |
79 |
47 |
59 |
Third Label |
28 |
56 |
98 |
112 |
87 |
26 |
Fourth Label |
38 |
43 |
69 |
54 |
16 |
16 |
The Tooltip Patter can be a function too!
This Chart has following options:
data-type="bars" data-legend-position="nw" data-height="500" data-tooltip="false" data-colors="[#ff0000,#aaa,black]"
|
Label 1 |
Label 2 |
Label 3 |
Label 4 |
Label 5 |
Label 6 |
First Label |
48 |
125 |
159 |
147 |
154 |
114 |
Second Label |
8 |
27 |
25 |
79 |
47 |
59 |
Third Label |
28 |
56 |
98 |
112 |
87 |
26 |
Fourth Label |
38 |
43 |
69 |
54 |
16 |
16 |