How to make pie chart with data border radius in highchart

前端 未结 1 1404
北海茫月
北海茫月 2021-01-26 11:33

I am trying to plot the highchart with data border radius in both end.for that i refered Rounded corners in highcharts but i didn\'t get Round corners after include script and

相关标签:
1条回答
  • 2021-01-26 11:56

    I do not think a pie can have rounded corners without modifying internal Highcharts code. However, you can achieve the desired result with a solidgauge chart with some trickery - this type of chart has property to set rounded/square caps - solidgauge.linecap.

    var gaugeOptions = {
    
    chart: {
      type: 'solidgauge'
    },
    
    yAxis: {
      visible: false,
      min: 0,
      max: 2
    },
    
    tooltip: {
      enabled: false
    },
    
    plotOptions: {
      solidgauge: {
        dataLabels: {
          enabled: false
        },
        borderColor: '#0883ce',
        borderWidth: 15,
        radius: '100%',
        innerRadius: '100%'
      }
    },
    series: [{
      borderColor: '#b9b9b9',
      borderWidth: 14,
      data: [1.5]
    }, {
      data: [0],
      enableMouseTracking: false
    }, {
      data: [1],
      linecap: 'square'
    }]
    };
    

    Live example and output

    http://jsfiddle.net/Penstrife/1s8sfqtn/

    0 讨论(0)
提交回复
热议问题