Open rmohamedfazil opened 5 years ago
jqeury extend
does not eturn any merged objects.
you need to separate renderes object declaration and merging like this:
var renderers = {}; $.extend(renderers, $.pivotUtilities.renderers, $.pivotUtilities.c3_renderers, $.pivotUtilities.subtotal_renderers);
HI, I also have similar issue. I can only see default renders in the dropdown though I have added c3 renderers as metioned above. I also tried plotly renederer as per the demo, however it didn;t showup. Default summary pivot table works fine.
var renderers = {}; $.extend(renderers, $.pivotUtilities.renderers, $.pivotUtilities.c3_renderers, $.pivotUtilities.subtotal_renderers);
var url = '/api/getPivotData' + q;
Papa.parse(url, {
download: true,
skipEmptyLines: true,
complete: function(parsed){
$("#oimPivotTableOutput").pivotUI(parsed.data, {
renderers: renderers,
cols: ["x"],
rows: ["y"],
// renderer: $.pivotUtilities.plotly_renderers["Scatter Chart"],
rendererOptions: { plotly: {width: 600, height: 600} }
});
}
Hi @somkhil , hi @rmohamedfazil , I had the same issue as you and the solution was that I had to include 1 more dependency: 1 this one I had:
<script src="https://cdn.plot.ly/plotly-basic-latest.min.js"></script>
2 this one had to be included
<script src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/plotly_renderers.min.js"></script>
After that everything worked as per instructions...
var renderers = {}; $.extend(renderers, $.pivotUtilities.renderers, $.pivotUtilities.plotly_renderers);
...
renderers:renderers,
...
Hope it helps
This is My code
<!DOCTYPE html>
« back to PivotTable.js examples