Maks K
Maks K

Reputation: 3914

How to set new yAxis data in chart dynamically (highcharts + angular2(4))?

I have spline chart:

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

How can I add new data ( new lines) after user clicked to some button?

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

Upvotes: 1

Views: 531

Answers (1)

Kacper Madej
Kacper Madej

Reputation: 7896

Data can be set for series and not for axis.

Check this documentation for dynamic interaction with Chart object - it shows how new points could be added dynamically.

It's possible to use setData the same way to set data for whole series.

Upvotes: 2

Related Questions