PieCharts Decoupling Data from Color options #4921
Unanswered
ebratz-aws
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all...
Not sure if possible but I could not find an answer for this:
Is possible to decouple the data from chart configuration in PieCharts?
My goals is to have pure data coming from an API and set the graph properties in another way.
Currently all the Pie Charts have some chartData like:
const chartData = [
{ browser: "chrome", visitors: 275, fill: "var(--color-chrome)" },
{ browser: "safari", visitors: 200, fill: "var(--color-safari)" },
{ browser: "firefox", visitors: 287, fill: "var(--color-firefox)" },
{ browser: "edge", visitors: 173, fill: "var(--color-edge)" },
{ browser: "other", visitors: 190, fill: "var(--color-other)" },
]
Would be great if there's a way to decouple the "fill" property from that dataset.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions