3

我有动态计算的 x/y 值的蜘蛛网高图,并且除了最后一个之外,y 轴的所有标签都正确显示。有没有人有同样的问题?

function GenerateSpiderWebChart(conteinerId,categories,values, color) {

    $('#'+conteinerId).highcharts({

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

        colors: [
            color
        ],

        exporting: {
            enabled: false,
            buttons: {
                enabled: false
            }
        },

        title: {
            text: '&nbsp',
            x: -80,
            useHTML: true
        },

        pane: {
            size: '70%'
        },

        xAxis: {
            categories: categories,
            tickmarkPlacement: 'on',
            lineWidth: 0,
            labels: {
                align: 'center',
                distance: 43
            }
        },

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

        tooltip: {
            shared: true,
            headerFormat: '<span style="font-size: 12px">{point.key}:</span>&nbsp;&nbsp;<b>{point.y:,.2f}</b>',
            pointFormat: '',
            useHTML: true
        },

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

        series: [{
            name: '',
            data: values,
            pointPlacement: 'on'
        }]

    });
}
4

1 回答 1

6

yAxis.showLastLabel设置为 true。API 说“默认为真”。但在这种情况下并非如此。示例:http: //jsfiddle.net/02mssxy8/1/

showLastLabel: true
于 2014-09-18T12:29:58.947 回答