Darrell Bulloch
Members-
Content count
2 -
Joined
-
Last visited
About Darrell Bulloch
-
Rank
Forum Newbie
-
Darrell Bulloch started following Manually re-render chart in Angular
-
Manually re-render chart in Angular
Darrell Bulloch replied to Darrell Bulloch's topic in General usage
I was using the wrong 'type' of chart for the data provided. -
I am trying to cause the chart to re-render when new data is received. 1. I gave the fusioncharts element in the template a id of "#fc". <fusioncharts [width]="width" [height]="height" [type]="type" [dataSource]="dataSource" #fc > 2. I used the @ViewChild() to obtain a reference to the element @ViewChild('fc', { static: false }) fc: any; 3. Then I called the render() method on the reference. this.fc.render(); 4. Although the compiler recognized that a render() method exists on the reference. At runtime, a failure occurred stating that there is no render() method. ERROR TypeError: this.fc.render is not a function