plotly / react-pivottable

React-based drag'n'drop pivot table with Plotly.js charts
https://react-pivottable.js.org/
MIT License
993 stars 254 forks source link

Multiple Pie Chart, Pie Charts have different radii #98

Open ClassicSours opened 4 years ago

ClassicSours commented 4 years ago

image

This seems to be tied to the number of records per pie chart. And as a result when you start to do groups and aggregations the piecharts stay their same small size, even as groups are created and wedges in the pie charts are made.

image

I'm not sure how to go about fixing this but a work around would be really nice, because this package is really awesome.

ClassicSours commented 4 years ago

I've found that this is caused by scalegroup: 1, in PlotlyRenderers.js. Is there anyway to pass this value as a prop to the component?

As it stands I can get around this by altering the text on the line image

nicolaskruchten commented 4 years ago

This is intended as a feature rather than a bug :) You can set the aggregator to Sum as Fraction of Columns to renormalize the radii:

image

Richisfree commented 4 years ago

Agree this is intended (pie radius reflects magnitude of results represented by the pie). Suggest if this is actioned it’s a configuration rather than a Change to the existing view.