Answer the question
In order to leave comments, you need to log in
How to update chartjs + angular 5 chart?
<chart [type]="type" [data]="data" [options]="options"></chart>
ngOnInit() {
this.checkChartData();
this.type = 'line';
this.data = {
labels: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday', 'Saturday',],
datasets: [
{
...
data: this.commitsData, // это массив у меня
}
]
};
Answer the question
In order to leave comments, you need to log in
To update the chart, you need to update the linked data, if I understand the question correctly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question