如何将标志添加到连续更新 angular highcharts

How to add flags to countinuous update angular highcharts

我尝试添加用于加载动态数据的标志,这些标志最初在我使用连续更新图表时有效,如下所示https://www.highcharts.com/stock/demo/dynamic-update and then the flags as follows https://www.highcharts.com/stock/demo/flags-shapes

你能给我一些为连续数据添加标志的解决方案吗?另外,我希望如果连续数据超过某个限制,标志应该出现在该系列上。我也想要连续数据的标志

和基础系列加分一样,你也要加旗系列加分:

    events: {
        load: function () {
            var series = this.series[0],
                flagSeries = this.series[1];

            setInterval(function () {
                var x = (new Date()).getTime(), // current time
                    y = Math.round(Math.random() * 100);

                series.addPoint([x, y], true, true);

                flagSeries.addPoint({
                    x: x,
                    title: y
                });
            }, 1000);
        }
    }

现场演示:https://jsfiddle.net/BlackLabel/rh8jug5d/

API: https://api.highcharts.com/class-reference/Highcharts.Series#addPoint