-
I'm looking to show multiple datasets within my pie chart. I am able to iterate through my data and render child charts, but the problem I'm having is that they're not actually "stacked" like I'd expect, they're just separate rings independent of the arc prior. Here is an image of what I'm trying to emulate: Thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @jakiestfu, You're looking for a sunburst chart. To do this you need to:
more details/an example here: #1085 Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Fixed my issue. In my case, I'm showing directory/file size and I was summing directory sizes which are already sums of file sizes. Thanks again! |
Beta Was this translation helpful? Give feedback.
Hi @jakiestfu,
You're looking for a sunburst chart. To do this you need to:
root
usinghierarchy()
from eitherd3-hierarchy
or@visx/hierarchy
re-export alias<Partition root={root}>{(partition) => // stuff}</Partition>
passing your root as a prop<Partition>
function as children, map overpartition.descendants()
nodes returning an<Arc />
for each nodemore details/an example here: #1085
Hope this helps!