【问题标题】:How to set new yAxis data in chart dynamically (highcharts + angular2(4))?如何在图表中动态设置新的 yAxis 数据(highcharts + angular2(4))?
【发布时间】:2017-08-14 07:49:18
【问题描述】:

我有样条图:

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

用户点击某个按钮后如何添加新数据(新行)?

private addingAxisData() {
// What should be here?
}

【问题讨论】:

    标签: angular typescript highcharts angular2-highcharts


    【解决方案1】:

    可以为系列设置数据,但不能为轴设置数据。

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

    可以使用setData 相同的方式为整个系列设置数据。

    【讨论】:

      猜你喜欢
      • 2011-10-14
      • 2012-07-31
      • 1970-01-01
      • 2012-03-30
      • 1970-01-01
      • 1970-01-01
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多