我有一个函数可以动态添加另一个轴和系列到图表中。它曾经在 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
}
});
他们在 v4 中对 axis 做了什么改变吗?我该如何解决这个问题?
最佳答案
尝试;
data : serie.options.data,
关于javascript - 多轴在 Highcharts 4 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32327510/