Ng2-charts: Calling Chart.js methods

Created on 20 Jul 2016  路  6Comments  路  Source: valor-software/ng2-charts

Hi,
it says this chart is based on Chart.js, how would I go about accessing methods such as .addData() and .removeData(), so as to allow live updates.

Thanks!

All 6 comments

@CraigHarley Just update the data and it should update the chart. See the "Line Chart" example on the ng2-charts site and click the button that says "CLICK".

Hello,

The Line Chart example shows how to update the values but does not show how to get access to the methods of Charts.js.

I solved it on my side by disabling animation (like on the example) but it's not like in this Chartjs example : http://jsbin.com/yitep/5/edit?html,js,output

For reference/example, this Angular2 HighCharts implementation does this :
https://github.com/gevgeny/angular2-highcharts#dynamic-interaction-with-chart-object

It's far from perfect but it gives you access to the Highcharts object.

Thanks @jarnix that's exactly what I'm looking for

This does not answer your question though (and I need the same thing), the reference was intended as a suggestion for the developers.

Closing for inactivity.
If this is still an issue, please provide an example showing the current behavior and describe the expected
behavior.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

egervari picture egervari  路  4Comments

dj-techs picture dj-techs  路  3Comments

shenriksen4 picture shenriksen4  路  3Comments

dslima90 picture dslima90  路  3Comments

sarn3792 picture sarn3792  路  4Comments