簡體   English   中英

高圖-帶有任何endAngle的極坐標圖的x軸標簽消失

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

對於帶有除默認值以外的任何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參數。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM