WordPress.org

Ready to get started?Download WordPress

Plugin Directory

enigma chart.js

Enigma chart.js offers you a simple way to include and plot your data with six different kind of graphs.

How to use

The syntax itself is quite simple:

[chart TYPE DATA]

Current available types are: pie, bar, line, doughnut, polar and radar as provided by Chart.js. As each type of graph has different requirements there currently two groups of graphs which need different syntax for inserting data.

The first group consists of the types: pie, doughnut and radar. The insertion is quite simple for these ones:

{VALUE:COLOR,VALUE:COLOR,VALUE:COLOR}

For each value a color will be attributed. Colors can be inserted as described in the Chart.js documentation.

Your code for a pie chart would be:

[chart pie {58.1:#1bd081,30.17:#e0cb1e,11.73:#19a694}]

For the types line and polar things are a little bit more complicated due to the required labels. Here the data syntax consists of different elements:

{LABELS [fillColor;strokeColor;pointColor;pointStrokeColor|DATA||fillColor2;strokeColor2;pointColor2;pointStrokeColor2|DATA2]}

The data insertion starts with a ; separated list of the labels. Data and colors are then within squared brackets. Note the space between the labels and the first bracket. Also note that no spaces are used in LABELS or any other list of ; separated values. Spaces in labels will be a feature in future releases.

A line graph, for instance, would be resulted by:

[chart line {1;2;3;4;5 [#FFFFFF;#CDCDCD;#CCCCCC;#000000|10;20;30;80;90||#ff3600;#CDCDCD;#000;#CCC|20;30;10;0;90]}]

The last available kind of graph is the bar chart. The syntax only slightly differs from the line or the polar graph. Here the pointColor and pointStrokeColor are not available. For instance,

[chart bar {1;2;3;4;5 [#FFFFFF;#CDCDCD|10;20;30;80;90||#ff3600;#CDCDCD|20;30;10;0;90]}]

would result in a bar chart.

Feedback

I'm always looking for good ideas and of course for feedback. Please see my website to find several ways to contact me.

Compatible up to: 3.6.1
Last Updated: 2013-4-29
Downloads: 449

Ratings

0 stars
0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
0,1,0