0👍
use this.formGenerator.valueChanges.subscribe(val => { ... });
Full code:
export class GeneratorComponent {
public doughnutChartLabels = ['foo', 'bar'];
public doughnutChartData;
public doughnutChartType = 'doughnut';
formGenerator: FormGroup;
constructor(private formBuilder: FormBuilder) {
this.doughnutChartData = [30, 15];
this.formGenerator = this.formBuilder.group({
sequenceNumberTime: 30,
sequenceLetterTime: 15
});
this.formGenerator.valueChanges.subscribe(val => {
this.doughnutChartData = [val.sequenceNumberTime, val.sequenceLetterTime];
});
}
}
- Chartjs-CharJs scrolling page on mobile
- Chartjs-How do I break a comma separated string into new lines in tooltip callbacks afterBody?
Source:stackexchange.com