New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sunburst chart - Control the inner size of top node/ inner radius #7388

Closed
amruta30 opened this Issue Nov 10, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@amruta30

amruta30 commented Nov 10, 2017

Expected behaviour

Currently, in pie chart a property "innerSize" can be used to configure the size of the inner diameter for the pie.
Example:http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/pie-innersize-80px/
Similarly size can be controlled in a modified donut chart since there are 2 seperate series and "size" "innerSize" properties can be set per series.
Refer:http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/pie-donut/

Expected behavior is to control the inner radius/size of the top node of Sunburst chart. Is there any way to achieve this in Highcharts Sunburst chart? Or if size and/or innerSize property can be provided in "sunburst.levels".

Actual behaviour

I tried to configure the size of topmost level(inner radius) in the Sunburst chart, by setting the size property in levels array, for level: 1. I had checked in the API reference that Highcharts doesn't provide size property in levels. However, I would like to configure the size of level 1 only, so as to vary the size of innermost circle in the sunburst chart.

Live demo with steps to reproduce

JS Fiddle: http://jsfiddle.net/amrutaJgtp/tk4kprhc/4/

@pawelfus

This comment has been minimized.

Contributor

pawelfus commented Nov 10, 2017

Hi @amruta30

Size and innerSize are evenly distributed between levels. I agree, more control over it would be great.

Internal note:
It seems size/innerSize are calculated per level here:

innerRadius = parent.r,
outerRadius = innerRadius + parent.radius;

But layoutAlgorithm method is unwrappable - can we use there getCenter() with options from level? @jon-a-nygaard

@TorsteinHonsi

This comment has been minimized.

Collaborator

TorsteinHonsi commented Nov 15, 2017

But layoutAlgorithm method is unwrappable

@jon-a-nygaard This is the reason why we want functions to be attached to the prototype. See cf58a5c.

@TorsteinHonsi

This comment has been minimized.

Collaborator

TorsteinHonsi commented Nov 15, 2017

On a general note, we discussed a flexible option here. Ideally we should be able to set the radius distribution of the levels in a single and flexible setting. If we hard code it to size and innerSize on each level, it will not be flexible if another level is added in a dynamic chart.

If we implement size and innerSize on the levels, at least we have to make sure that the other levels adapt nicely. Specificly, if we set innerSize on the first level, the remaining space should be shared equally between the remaining levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment