SCalc Custom Chart Shortcodes

To add a custom chart you will need to things: The shortcode and a data table from which SCalc generates the datasets and labels.

[* schart type=”line” symbol=”€” height=”300″ width=”200″ show_table=”1″ *]

Here is the place for the table. It must be a valid HTML table.

[* /schart *]

Colors can be set in the Settings panel SCalc. Same colors will used for calculators and custom charts.

The options:

type: line, bar, doughnut, pie (mandatory)
symbol: Appendix for labels and legends (i.e. $) (optional)
height: pixel or percent numeric (i.e. “100%” or “300” for 300 px) (optional)
width: same as height
thousands: , or . (defaults to “,”. If your table data contains formatted numbers you must set this according to data format)
decimals: , or . (defaults to “.”. If your table data contains formatted numbers you must set this according to data format)
show_table: “0” or “1” Display the data table or not (optional)

Be careful with width and height: Since charts are responsive, adjustment of width and / or height may lead to unwanted results.

Leave a Reply