nicolaskruchten / pivottable

Open-source Javascript Pivot Table (aka Pivot Grid, Pivot Chart, Cross-Tab) implementation with drag'n'drop.
https://pivottable.js.org/
MIT License
4.36k stars 1.07k forks source link

plotlyConfig not working #1235

Open adimon91 opened 4 years ago

adimon91 commented 4 years ago

I've read all the documentation everywhere - here and plotly. Nothing I put into the plotlyConfig object is working. Here is my code. If anyone can help it would be greatly appreciated! I've spent hours on this and about to give up... I'm able to set layout options using plotly but for some reason plotlyConfig doesn't work.

$("#output").pivotUI( pivotList, { rows: ["Project Title", "Action Title"], cols: ["Full Name"], vals: ["Hours"], aggregatorName: "Sum", renderers: renderers, rendererOptions: { plotlyConfig: { responsive: true, editable: true, scrollZoom: true, displayModeBar: false }, plotly: { // width: 1000, // height: 700, autosize: true, margin: {autoexpand: true}, xaxis: { tickangle: 45, automargin: true } } }, derivedAttributes: { "Hours": record => record["time"]/60/60, "Date Logged": derivers.dateFormat("date", "%m/%d"), "Action Deadline" : derivers.dateFormat("action deadline", "%y/%m/%d") }, hiddenAttributes: ["time", "date", "userId", "action deadline"], onRefresh: (config) => { if(config.rendererName == "TSV Export"){ let text = $("textarea")[0].value; let filename = "tableExport.xls"; download(filename, text); } } });

renankaic commented 3 years ago

Same issue here. I'm trying to change my locale but it doesn't work.

Here is the fiddle about what I've tried: https://jsfiddle.net/xvor2mqd/

Here is the official Codepen with PT-BR language set working: https://codepen.io/renankaic/pen/OJbaJbG