我正在尝试添加一个新系列,然后在图表的特定类别(例如 12 月和 8 月)中添加点,但我无法在图表上看到点
HTML 代码
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
这是filddle
最佳答案
您可以将 addSeries 与基于 x/y 坐标的定义点一起使用。
setTimeout(function () {
var lastPoint = chart.xAxis[0].categories.length-1;
chart.addSeries({
name: 'hello' + '',
data: [[lastPoint,50]]
});
}, 1);
关于javascript - 为某些特定类别的新系列添加积分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18377573/