Posts: 13
Joined: Fri Nov 09, 2018 9:15 am

Variablepie multiple series value-related

Wed Nov 28, 2018 3:46 pm

I wounder if.... when I am using multiple variable-pie series in the same graphic, I have a way in which to link one series Z value to another series's Z value.
My problem is that when I have more than one variable-pie series on my graph and display them one inside another.
I want them to remain stuck to each-other and not to have to adjust each time the following three values, so I can find the perfect combination:

Code: Select all

series 1 :

"size": "97%", 
"innerSize": "60%", 
"zMin" : "54",

 series 2:
 "size": "97%", 
 "innerSize": "50%", 
 "zMin" : "34", 
And it looks like this: https://codepen.io/Jaquelline/pen/ZmjNYV?editors=0010
If I change the values from the second series and add something like 36/44, my green serie will overlap the first one, even if my value diffrence is only a few points and not 20/40....

Do I have a way in which I can keep the thickness of each series related to the other one value?
For example, my first series has values around 67, while the second's series values run around 33.
So, I will have to work on making it look like the first series is 67% of the whole graph while the second represents only 33%, in percentage.

Because for now, from my point of view, the only thing I can think on for doing this, is a function. That calculates the ratio between my values and build a formula by which this three elements combination is generally working, regardless of my future possible values......

Many thanks,

Posts: 132
Joined: Wed Oct 17, 2018 10:59 am

Re: Variablepie multiple series value-related

Thu Nov 29, 2018 12:16 pm

Hi Jaqulline,

Notice two things. First, you set zMin property as 34, that's mean that every value under 34 will be drawn according to the zMin value - API: https://api.highcharts.com/highcharts/s ... lepie.zMin. So every value <= 34 looks the same in the chart, but when you will change this value to value above 34, like 36 or 44 this value will be the maximum value in your series. And here notice a second thing, in both series, you set the same size property. That's mean that maximum value from one series (which will be drawn as 97% of the WHOLE chart) looks equal to the maximum value from the second series(because this one also will be drawn as 97% of the WHOLE chart). Check this demo, try to manipulate size properties and zMax to achieve what you want DEMO: https://jsfiddle.net/Bastss/cp2k4qgm/. If something will be unclear, feel free to ask :)

Kind regards!

Return to “Highcharts Usage”