Highcharts 6.0.2:重叠标签

时间:2017-11-14 01:14:19

标签: highcharts

Highcharts的新手,并且想知道是否有人为我的问题开发了解决方案。找到我的甜甜圈图表的切片足够小,它们的价值标签相互重叠/阻碍 - 有没有人在我把它拉开之前找到解决方案? :)

Highcharts values overlapping

任何建议表示赞赏!

1 个答案:

答案 0 :(得分:0)

我最终得到了 解决方案......

最初我在使用:

options: {
            chart: {
                height: 320,
                plotShadow: false,
                plotBorderWidth: 0,
                spacingBottom: 10,
                type: 'pie',
            },
            credits: {
                enabled: false
            },
            legend: {
                align: 'center',
                symbolRadius: 0,
                floating: true,
                layout: 'vertical',
                y: -110
            },
            tooltip: {
                enabled: false
            },
            title: {
                text: ''
            },
            subtitle: {
                text: ''
            },
            plotOptions: {
                pie: {
                    showInLegend: true,
                    startAngle: 45,
                    dataLabels: {
                        allowOverlap: false,
                        distance: 10,
                        padding: 2,
                        softConnector: true,
                        className: 'pieLabels ',
                        format: '{y}',
                        useHTML: true,
                        enabled: true
                    },
                    shadow: false,
                    center: ['50%', '50%'],
                    size: '90%',
                    innerSize: '65%',
                    borderColor: 'none'
                }
            },
            series: this.props.series
        }

结束了:

options: {
            chart: {
                height: 320,
                plotShadow: false,
                plotBorderWidth: 0,
                spacingBottom: 10,
                type: 'pie',
            },
            credits: {
                enabled: false
            },
            legend: {
                align: 'center',
                symbolRadius: 0,
                floating: true,
                layout: 'vertical',
                y: -100
            },
            tooltip: {
                enabled: false
            },
            title: {
                text: ''
            },
            subtitle: {
                text: ''
            },
            plotOptions: {
                pie: {
                    showInLegend: true,
                    dataLabels: {
                        connectorWidth: 0,
                        distance: -25,
                        // overflow: 'none',
                        className: 'pieLabels ',
                        format: '{y}',
                        useHTML: true,
                        enabled: true
                    },
                    shadow: false,
                    center: ['50%', '50%'],
                    size: '100%',
                    innerSize: '60%',
                    borderColor: 'none',
                },
            },
            series: this.props.series
        }

哪位给了我:

highcharts graph with external labels