K.T
Posts: 50
Joined: Tue Aug 16, 2022 3:37 am

Dumbbell - hide when null/0

Hello

I am new to highcharts and looking to have a display a dumbbell chart with multiple categories.
However I wanted to hide a single dumbbell on a within a category for a series or be able to plot for a series against a particular category therefore being able to skip if value is null.
I can do this for a column chart but do not seem to see how this can be done for a dumbbell.
Attachments
dumbbell 0.JPG
dumbbell 0.JPG (58.61 KiB) Viewed 205 times
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Dumbbell - hide when null/0

Hello K.T!
Thanks for contacting us with your question!

You can use some JS function to replace objects with low and high set to 0 to null values, which will be treated as null and not shown on the chart. Please, check the example below.

Demo: https://jsfiddle.net/BlackLabel/h8gLb7kf/

Let me know if that was what you were looking for.
Kind regards!
Hubert Kozik
Highcharts Developer
K.T
Posts: 50
Joined: Tue Aug 16, 2022 3:37 am

Re: Dumbbell - hide when null/0

Thank you

Exactly what I needed
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Dumbbell - hide when null/0

You're welcome! In case of any further questions, feel free to contact us again.
Hubert Kozik
Highcharts Developer

Return to “Highcharts Usage”