Highcharts - 对于具有任何 endAngle 的极坐标图,x 轴标签消失

Highcharts - x-axis label disappears for polar chart with any endAngle

对于具有非默认 (360) 端角的极坐标图,x 轴标签消失

没有 endAngle 的作品:http://jsfiddle.net/qs5v601b/1/

$(function () {
    $('#container').highcharts({
        chart: {
            polar: true,
            type: 'line'
        },
        title: {
            text: 'Budget vs spending',
            x: -80
        },
        pane: {
            size: '80%'
        },
        xAxis: {
            categories: ['Sales', 'Marketing'],
            tickmarkPlacement: 'on',
            lineWidth: 0
        },
        yAxis: {
            gridLineInterpolation: 'polygon',
            lineWidth: 0,
            min: 0
        },

        tooltip: {
            shared: true,
            pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'
        },

        legend: {
            align: 'right',
            verticalAlign: 'top',
            y: 70,
            layout: 'vertical'
        },

        series: [{
            name: 'Allocated Budget',
            data: [43000, 19000],
            pointPlacement: 'on'
        }, {
            name: 'Actual Spending',
            data: [50000, 39000],
            pointPlacement: 'on'
        }]

    });
});

不适用于 endAngle :http://jsfiddle.net/qtpq84nw/

$(function () {

    $('#container').highcharts({

        chart: {
            polar: true,
            type: 'line'
        },

        title: {
            text: 'Budget vs spending',
            x: -80
        },

        pane: {
            size: '80%',
            endAngle: 90
        },

        xAxis: {
            categories: ['Sales', 'Marketing'],
            tickmarkPlacement: 'on',
            lineWidth: 0
        },

        yAxis: {
            gridLineInterpolation: 'polygon',
            lineWidth: 0,
            min: 0
        },

        tooltip: {
            shared: true,
            pointFormat: '<span style="color:{series.color}">{series.name}: <b>${point.y:,.0f}</b><br/>'
        },

        legend: {
            align: 'right',
            verticalAlign: 'top',
            y: 70,
            layout: 'vertical'
        },

        series: [{
            name: 'Allocated Budget',
            data: [43000, 19000],
            pointPlacement: 'on'
        }, {
            name: 'Actual Spending',
            data: [50000, 39000],
            pointPlacement: 'on'
        }]

    });
});

有人知道这是什么原因吗?

您需要启用 showLastLabel 参数。