对于带有除默认值以外的任何endAngle的极坐标图,x轴标签消失了(360)

没有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参数。

09-25 18:55