sunburst-chart icon indicating copy to clipboard operation
sunburst-chart copied to clipboard

Can we have async data for each level?

Open vipullimbachiya opened this issue 6 years ago • 3 comments

We have to implement a way where we can use a separate call for each level, is that possible? if yes, please guide

vipullimbachiya avatar Jul 03 '18 09:07 vipullimbachiya

@vipullimbachiya the size of each slice depends on the values of all its descendants, so generally you need the full data set to compute the layout accurately.

You can feed data progressively to the component, but that will cause layout changes as the new values are computed.

Is it an option in your case to load the whole data prior to handing it over to the component?

vasturiano avatar Jul 03 '18 17:07 vasturiano

Actually, we will get data of 1 level at a time. We can have counts of its children but data of children won't be available in that level's response.

vipullimbachiya avatar Jul 04 '18 05:07 vipullimbachiya

@vipullimbachiya Totally possible, but you'll have to compute the stats for each ring on your own and create sunburst for each level. You can get the target from the onClick of the partitions, and you'll have add an additional field to the data you're going to feed to the Sunburst.

sterkhedkar avatar Mar 22 '19 10:03 sterkhedkar