Setonix
Posts: 16
Joined: Thu Dec 23, 2021 9:14 am

spacing around donut chart

Hi,

I'm trying to figure out how to not have the spacing around the donut in my <div> element. From several examples, I already set chart.margin, chart.spacing etc as well as the series size to 100%, but initially this kept showing the halo (which I at first thought was called a border), but by disabling the halo, HighCharts still preserves space for it:

This example shows the pie chart in a red box. I want the chart to touch the borders without having to deal with the halo space around it. Is that possible?

http://jsfiddle.net/Setonix/24wupfyb/13/
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: spacing around donut chart

Hi Setonix,

Thanks for contacting us with your question.

There is some reserved space in case a point is sliced:
http://jsfiddle.net/BlackLabel/syvm578L/

Add slicedOffset: 0 property to series to make chart fill whole available space:
http://jsfiddle.net/BlackLabel/8qyLbt72/

Let me know if it was what you were looking for.
Regards!
Mateusz Bernacik
Highcharts Developer
Setonix
Posts: 16
Joined: Thu Dec 23, 2021 9:14 am

Re: spacing around donut chart

Hi Mateusz,
Thanks for your quick responses to my questions on the forum. Your answers have been very helpful. We've used several HighCharts charts in our application and I think the library is very nice to work with.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: spacing around donut chart

Setonix,

You're welcome! Glad to hear it was what you were looking for and that you like Highcharts, thanks for your feedback :D
In case of any further questions feel free to contact us again!

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”