Data Input from OpenOffice Calc Tables
The Best Way
Most easily you can generate new charts by using "table" option.
To do this:
* You mark each data column with the different background color on OpenOffice Calc.
* Next, you normally copy & paste whole table into WordPress page/post (in visual mode).
* Finally, you just name your table with own ID tag and call it by shortcode (in html mode).
More Control & takes more time
By using "class" option you can generate the chart from the tables of OpenOffice or from any random data tags of document (page/post).
To do this:
* You can mark input data values & labels on cells with same background color with OpenOffice Calc.
* Next, you normally copy & paste whole table into WordPress page/post (in visual mode).
* Finally, you just name your table with own ID tag and call it by shortcode (in html mode).
Benefits: you edit table's values directly and the chart updates automatically to show them out with both methods above.
Below is whole story: how to use them.
Import a Table from OpenOffice Calc with "table" Option
This is how typical copy&paste table looks like from OpenOffice Calc on WordPress HTML mode.
|
Pcs |
| Cats |
7 |
| Cows |
2 |
| Birds |
12 |
We call its chart simply this way:
[jsChart type='simpleline' table="myallpets" backgroundcolor="darkgray"]
...OR...
[jsChart type='simpleline' table='myallpets' options='{autocoloring:false}' backgroundcolor="darkgray"]
Note: only change made is addition of id="myallpets". Latter shortcode's call turns off automatic coloring of elements for new chart.
Simple Data Set from OpenOffice Calc with "class" Option
Typically, short table from OpenOffice after copy & paste on WordPress side when data values have background color "#FFFF99" (eq Yellow by OpenOffice palette) is like this ...
You just add ID "mypets' for this table ...
... And call it with id + bgcolor for showing its values ...
[loadNVD3]
[jsChart type='discretebar' class='{id:"mypets", bgcolor:"#FFFF99"}']
Not so good since labels are still numbers, huh? So, we need...
Values + Labels from OpenOffice Calc Automatically
Generating your labels of chart is as easy too: you just mark the different background color for them on OpenOffice side. Here is the same table after copy & paste (in visual mode!) + added another ID "mypets2" for it ...
And call it again as before but adding now "titlecolor" option to find those labels ...
[loadNVD3]
[jsChart type='discretebar' class='{id:"mypets2", bgcolor:"#FFFF99", titlecolor:"#66CC99"}']
Note: labels of chart may come freely from one row / column of OpenOffice table on this way as long as you just mark their bgcolor properly.
Multidimensional Data Sets from OpenOffice
You can also bring in data from many data sets and show them out with 'multibar' chart type. The principle is the same as above: you pick up for labels & different data sets own background color and paste them into WP document.
Here is an example table.
| Cats |
7 |
18 |
| Cows |
2 |
9 |
| Birds |
12 |
4 |
Only difference is that you call the chart up by having a list of colors for the background of data cells, instead of just one color:
[jsChart type='multibar' class='{id:"mypets4", bgcolor:"#FFFF99,#FF9900", titlecolor:"#66CC99"}']
Note: here is just 2 data sets but you copy&paste from **shortcode_direct_openoffice.ods** example table bigger data set and play around with it easily and see how it is unlimited.
Note2: By adding seriescolor:"blue" option you can include names of series to the chart (if they happened to be with "blue" background, in this case)
Adding Own Custom Labels - Cell by Cell to Each Value
In order to get own labels into chart you just add IDs also for each cells of table like this (some copy&paste stuff removed for the sake of clarity) ...
And shortcode call stays the same ...
[loadNVD3]
[jsChart type='discretebar' class='{id:"mypets3", bgcolor:"#FFFF99"}']
This is slow and time-consuming way to generate them but now you have exact control of each label that appears with your chart.
That is all folks - enjoy it with OpenOffice for all your tables !