Highcharts donut chart customization

后端 未结 3 1693
生来不讨喜
生来不讨喜 2020-12-28 18:27

I have a license for highcharts and I would like to create a char like the one bellow:

\"enter

相关标签:
3条回答
  • 2020-12-28 18:41
     function(chart4) {
    chart4.renderer.text('<span style="word-wrap: break-word !important;">Reduced by <br/>10 Years</span>', (chart4.chartWidth/2)-38, (chart4.chartHeight/2)-5)
                 .css({
    
                    color: '#4b4b4b',
                    fontWeight: 'bold',
                    fontSize: '12px'
    
                })
                .add();
    }
    
    0 讨论(0)
  • 2020-12-28 18:48

    Check about innerSize.

    "The size of the inner diameter for the pie. A size greater than 0 renders a donut chart. Can be a percentage or pixel value. Percentages are relative to the size of the plot area. Pixel values are given as integers. Defaults to 0." reference

    Than you can take a look this example which shows how to put the text inside the donut chart.

    Hope it help you.

    0 讨论(0)
  • 2020-12-28 18:49

    You might try using title as an alternative and rather simple approach.

                title: {
                    text: 'Budget',
                    align: 'center',
                    verticalAlign: 'middle',
                    style: {
                        fontSize: '9.5px'
                    } 
                },
    

    JsFiddle: http://jsfiddle.net/amigoo/zwod86e1/

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