Table2Chart enables a shortcode to draw a stylish, interactive chart reading numerical data from a table inserted in the same post. It uses the Highcharts JS library (*).
(*) Please read
http://www.highcharts.com/products/highcharts for informations.
In its simplest formulation,
[Table2Chart] shortcode creates the chart from the first table in the post with default settings.
Several arguments can be specified (default values are within brackets):
- table: number which indicates the cardinal position of the table in the post to gather the data from (1)
- width: chart width in pixel (500)
- height: chart height in pixel (400)
- type: chart type to choose from bar (horizontal bars), column (vertical bars), line, area (column)
- title: chart title (empty)
- subtitle: chart subtitle (empty)
- titlex: category axis title (empty)
- titley: value axis title (empty)
- order: row if data series are horizontal, column if they are vertical (column)
- namecol: position of the row containing the series or category titles (1)
- namerow: position of the column containing the series or category titles (1)
- excluderows: position of rows (e.g. 2 or 3,4) to exclude from the chart (empty)
- excludecols: position of columns (e.g. 2 or 5,6,7,8,9) to exclude from the chart (empty)
- includerows: if set, only the rows whose position is specified (e.g. 2 or 3,4) are included in the chart (empty)
- includecols: if set, only the columns whose position is specified (e.g. 2 or 5,6,7,8,9) are included in the chart (empty)
- background: background color in hexadecimal format (#ffffff)
- color: colors of data series (#ff0000,#00ff00,#0000ff,#00ffff,#ff00ff,#ffff00)
- convert: true if numerical values in the table are in continental (1.234,56) format, false otherwise (true)
- hide: true if the table has to be hidden, false otherwise (false)
In enclosing form the shortcode allows to customize every chart detail using HighCharts API syntax. See screeshots and
http://www.antoniorinaldi.it/table2chart page for more information.
- Upload the Table2Chart.zip file from the 'Plugins' section of Admin menu in WordPress
- Activate the plugin from the 'Plugins' section of Admin menu in WordPress
Done. Now you can insert the shortcodes within your posts and pages.