Ng2-charts: Is this project still maintained?

Created on 9 Feb 2018  路  4Comments  路  Source: valor-software/ng2-charts

There have been so many issues without any response from the maintainer. Moreover, the most demanded feature is auto updating of chart for dynamic datasets.

@valorkin @greenkeeperio-bot can you please share your thoughts.

Most helpful comment

This would also interest me as well.

All 4 comments

This would also interest me as well.

Lack of dynamic updates is a deal breaker for me. It works with angular 1 but not the angular 2 version.

Moreover, the most demanded feature is auto updating of chart for dynamic datasets.

Auto-updating charts works for me, the trick is to re-assign to the exposed dataset property into your component so it triggers change detection:

Template:

<canvas baseChart [datasets]="chartDatasets" [options]="chartOptions" [chartType]="'line'"></canvas>

Component:

chartDatasets: Partial<ChartDataSet>[];
chartOptions: ChartOptions = ...

updateChart( newValue: number ) {

    this.chartDatasets[0].data.push( { x: new Date(), y: newValue } );
    this.chartDatasets = Object.assign( [], this.chartDatasets );
}

I have my own handmade Typings file that defines the interface for ChartDataSet and ChartOptions but it's incomplete and Chart.js' own documentation is inaccurate, so you're probably better-off sticking with any.

The answer to the issue topic is yes, and apart from that, I believe the update issue is now resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexcastillo picture alexcastillo  路  5Comments

grahammutter picture grahammutter  路  4Comments

vmironovs picture vmironovs  路  3Comments

egervari picture egervari  路  4Comments

martinpinto picture martinpinto  路  3Comments