Optimize rendering of sunburst plots?

54 Views Asked by At

I have created a go.Sunburst html output that looks as expected. However, its output is unsurprisingly very complicated and irregular (it is displaying a large, deep UNIX directory structure). The output html can be close to 20 MB with well over 100K sectors to render. As you can imagine, the response time to interact with the plot is really sluggish, especially when moving from the outer extents of the plot back to the root/topmost level. Is there any practical way to improve the rendering process of complex sunbursts? I would consider a format other than html (D3.js?), if that is even an option.

1

There are 1 best solutions below

0
Fraser On

You can create a "zoomable" sunburst so that you are only showing a few levels of the hierarchy at any given time. This reduction in the amount of data being displayed should improve the performance.

There is a good example of that here - https://observablehq.com/@d3/zoomable-sunburst where...

This variant of a sunburst diagram shows only two layers of the hierarchy at a time. Click a node to zoom in, or the center to zoom out.

You could combine this idea with "lazy loading". "Lazy loading" is just a technique that loads the data of the chart dynamically as and when the user interacts with it. This can significantly reduce the loading time and enhance the performance of your chart.

However these are just general ideas, without seeing any code it is hard to offer specific advice.