代码之家  ›  专栏  ›  技术社区  ›  John Doe

如何在图表中动态设置新的yAxis数据(highcharts+angular2(4))?

  •  1
  • John Doe  · 技术社区  · 7 年前

    我有样条图:

      this.chart = {
                chart: {
                    type: 'spline',
                    zoomType: 'x',
                    animation: true,
                    marginRight: 10,
                    renderTo: chartId
                },
    

    private addingAxisData() {
    // What should be here?
    }
    
    1 回复  |  直到 7 年前
        1
  •  2
  •   Kacper Madej    7 年前

    可以为系列而不是轴设置数据。

    检查 this documentation for dynamic interaction with Chart object -它显示了如何动态添加新点。

    setData 为整个系列设置数据的方法相同。