-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Optional Extra Renderers
In addition to the built-in table, heatmap and table-barchart renderers, PivotTable.js ships with a few optional extra renderers that add charting or TSV export support.
##Google Charts (demo)
In order to use these, in addition to including the gcharts_renderers.js file, you must first include the Google JS API in your <head>:
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
And include this call somewhere early on in your Javascript code:
google.load("visualization", "1", {packages:["corechart", "charteditor"]});
Finally, you must pass into pivotUI() some of the renderers that gcharts_renderers.js makes available at $.pivotUtilities.gchart_renderers.
##D3 Visualizations (demo)
In order to use these, in addition to including the d3_renderers.js file, you must first include D3 in your <head>:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
Finally, you must pass into pivotUI() some of the renderers that d3_renderers.js makes available at $.pivotUtilities.d3_renderers.
##C3 Charts (demo)
In order to use these, in addition to including the c3_renderers.js file, you must first include D3 and C3 in your <head>:
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.js"></script>
Finally, you must pass into pivotUI() some of the renderers that d3_renderers.js makes available at $.pivotUtilities.d3_renderers.
##Exporting to TSV (demo)
In order to use these, in addition to including the export_renderers.js file, you must pass into pivotUI() some of the renderers that export_renderers.js makes available at $.pivotUtilities.export_renderers.