Template:JqPlotFromTable/doc
From WikiEducator
This is the documentation for Template:jqPlotFromTable
Sample Table
The html table (below) with id='dataTable1' has the following tag:
<table id="dataTable1">
and renders as
Acceleration | Force | Mass |
---|---|---|
2 | 4 | 2 |
4 | 8 | 2 |
3 | 6 | 2 |
5 | 10 | 2 |
10 | 20 | 2 |
Parameters
- tableID= must be set to the id of a table in the wiki page and the table must use html syntax not wiki markup. {default:table1}
- chartID= must be set to allow more than one chart per page. {default:chart1}
- xCol = integer for the x column in the data table (default:0 ie the left most column)
- yCol = integer for the y column in the data table (default:1)
- title = title at the top of the plot
- width= width of the plot (integer)
- height = height of plot (integer)
- showLine = {true/false}
- pointSize = integer that defines the size of the points {default:8}
- pointStyle = {square, diamond, circle, etc}
Usage
There must be an html table on the wiki page with an ID. Do not use rich text mode because it will convert the html to wiki markup and the widget will not work.
Adding
{{jqPlotFromTable|tableID=dataTable1|chartID=chart2}}
to a page with a table that has the id='dataTable1' (see table above) will give the following