Skip to content

Optional Extra Renderers

Nicolas Kruchten edited this page Nov 30, 2017 · 10 revisions

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.

You can also find third-party renderers such as Subtotal.js, NovixPivotJS and the NReco extensions

Plotly Charts (demo)

In order to use these, in addition to including the plotly_renderers.js file, you must first include Plotly in your <head>:

<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>

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 c3_renderers.js makes available at $.pivotUtilities.c3_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.

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.

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.

Clone this wiki locally