为某些特定类别的新系列添加点

add point to new series of some specific category

本文关键字:系列 添加 新系列      更新时间:2023-09-26

我正试图添加一个新的系列,然后在图表的特定类别中添加点(比如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>

这是过滤

您可以使用addSeries来定义基于x/y坐标的点。

  setTimeout(function () {
        var lastPoint = chart.xAxis[0].categories.length-1;
        chart.addSeries({
            name: 'hello' + '',
            data: [[lastPoint,50]]
        });
    }, 1);

http://jsfiddle.net/EKPZz/7/