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.34k stars 1.08k forks source link

Plotly/Pie Chart Integration. Add customizable data object. #1170

Open raphaelg opened 4 years ago

raphaelg commented 4 years ago

Hello,

A lot of the customization in Plotly is done at the data object level. For example, to customize the colors of the pie chart ( such as 'marker' : {'colors' : ["rgb(183,101,184)", "rgb(236,77,216)", "rgb(176,164,216)", "rgb(255,168,255)"]} ) , it needs to be added in the data object, and not in the Layout (provided by plotly:) nor in the Config (provided by plotlyConfig) .

Would it be possible to be able to add customizable parameters in a data object ?

Thanks

nicolaskruchten commented 4 years ago

Hi!

My recommendation would be to use the layout object keys such as colorway or template, which let you customize most chart aspects, without needing to edit keys in data directly.

See https://plot.ly/javascript/layout-template/ for advanced examples

It's very difficult to provide a good API that lets you manipulate data given that the number and content of entries in that array is highly dependent on user choices in the UI...