Enzo
Enzo

Reputation: 962

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.

    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? How can i solve this problem?

Upvotes: 1

Views: 50

Answers (1)

user2761286
user2761286

Reputation: 239

Try ;

data : serie.options.data,

Upvotes: 1

Related Questions