[REF-2928] Support to change chart color
Describe the bug
After switch to use new graphing library 'Recharts', found that Pie chart does not support color_scale parameters anymore.
Currently, the fill parameter only support to change the whole graph but not color by key value of data.
Expected behavior
Would like to change the chart color for different keys in data. Take below image for example,
Specifics (please complete the following information):
- Python Version: 3.9.9
- Reflex Version: 0.2.9
- OS: MacOS
- Browser (Optional): chrome
Feels like a convenient feature to have :+1:
I would like to add my support for this request. The Pie chart that is provided by ReCharts appears to be a downgrade in terms of functionality when compared to pre 0.3.0.
Hello, I had the same case. In this project I saw that the color could be modified for each value, like the following:
data01 = [ {"name": "Sent", "value": 400, "fill": "rgba(2, 220, 130, 1.0)"}, {"name": "Failed", "value": 100, "fill": "rgba(241, 50, 66, 1.0)"}, ]
π https://dashboard-new.reflex.run/
π https://github.com/reflex-dev/templates/blob/main/dashboard/dashboard/views/charts.py
Added this PR improving the docs for PieChart : https://github.com/reflex-dev/reflex-web/pull/947