Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

221
Views
Disable data overlap in donut chart in Highcharts

I am working on a donut chart in Highcharts where I am displaying some data. The thing is that when the donut chart is displayed there is a little bit of overlap between the types of data. If you would like to see the chart in jsfiddle, here is the html for it

<script src="https://code.highcharts.com/highcharts.js"></script>

<div id="container" style="height: 400px"></div>

and the js code

Highcharts.chart('container', {
    chart: {
        type: 'pie',
        margin: [0, 0, 0, 0]
    },

    xAxis: {
        categories: ['Jan', 'Feb', 'Mar']
    },
    plotOptions: {
        pie: {
                startAngle: 90,
            innerSize: '99%',
            borderWidth: 16,
            slicedOffset: 40,
            borderColor: undefined,
            dataLabels: {
                enabled: false
            },
            states: {
                hover: {
                    brightness: 1,
                    halo: {
                        size: 0
                    }
                }
            }
        }
    },
    series: [{
        data: [29.9, 71.5,50]
    }]
});

If you hoover over one of the series in the donut chart, the line reaches into the other one. My question is that is there an option so the lines won't overlap each other, so the end is not rounded but have sharp edges that do not overlap? Thank you for any help.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

There are two approaches.

  • you can use this custom code - but it works with the previous version of highcharts (8) - demo: http://jsfiddle.net/BlackLabel/72015ojz/
  • you can add some dummy points between the current one, set their visibility as false and set the series.ignroeHiddenPoint as false - https://jsfiddle.net/BlackLabel/h2m0e35a/ - here you will need to implement some logic to calculate the amount and the values of those dummy points.
about 4 years ago · Juan Pablo Isaza Report

0

Eventually I managed to figure it out. All I had to do is to set the borderWidth to 0 and change the innerSize e.g 80% (this one depends on how wide you want the donut to be).

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!