Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 编辑甜甜圈高度图表_Javascript_Highcharts - Fatal编程技术网

Javascript 编辑甜甜圈高度图表

Javascript 编辑甜甜圈高度图表,javascript,highcharts,Javascript,Highcharts,需要帮助删除图表灰色部分中的灰色线 您可以为点设置数据标签,并在格式化程序中识别是否应设置数据标签 // Build the chart $('#' + div_id).highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false, type: 'pie' }, title: {

需要帮助删除图表灰色部分中的灰色线


您可以为点设置数据标签,并在格式化程序中识别是否应设置数据标签

// Build the chart
$('#' + div_id).highcharts({
    chart: {
        plotBackgroundColor: null,
        plotBorderWidth: null,
        plotShadow: false,
        type: 'pie'
    },
    title: {
        text: title
    },
    tooltip: {
        enabled: false
    },
    plotOptions: {
        pie: {
            allowPointSelect: false,
            cursor: 'pointer'
        }
    },
    series: [{
        type: 'pie',
        name: title,
        size: '60%',
        innerSize: '40%',
        data: [{
            y: number,
            name: title,
            color: color,
            dataLabels: {
                enabled: true,
                color: '#000000',
                inside: true,
                formatter: function () {
                    return Math.floor(Number(this.percentage)) + ' %';
                }
            }
        }, {
            y: (100 - number),
            name: " ",
            color: '#AAAAAA',
            dataLabels: {
                enabled: true
            }
        }]
    }]
});
plotOptions: {
        pie: {
            allowPointSelect: false,
            cursor: 'pointer',
            dataLabels: {
                enabled:true,
                formatter: function () {
                    if(this.point.dataLabels.enabled)
                        return Math.floor(Number(this.percentage)) + ' %';
                    else
                        return null;
                }
            }
        }
    },