简体   繁体   English

多轴在Highcharts 4上不起作用

[英]Multiple axis does not work on Highcharts 4

I have a function that adds another axis and serie to chart dynamically. 我有一个功能,可以向动态图表添加另一个轴和系列。 It used to work well in Highcharts 3. Then i upgraded to Highcharts 4, but it adds axis but does not add serie. 它曾经在Highcharts 3中运行良好。然后我升级到Highcharts 4,但它添加了轴但没有添加意甲。

    chart.addAxis({ // Secondary yAxis
        id: tempId,
        title: {
            text: tempName
        },
        lineWidth: 2,
        lineColor: serie.color,
        opposite: opposition
    });

    var lbl = getLabelStatus_<?=$id?>(id);      

    chart.addSeries({
        name: tempName,
        type: serie.type,
        color: serie.color,
        yAxis: tempId,
        data: serie.data,
        dashStyle: serie.options.dashStyle,
        dataLabels: {
            enabled: lbl,
            rotation: serie.options.dataLabels.rotation
        }
    });

Did they change something about axis in v4? 他们是否改变了v4中的轴? How can i solve this problem? 我怎么解决这个问题?

尝试;

data : serie.options.data,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM