Closed ChrisDevinePimss closed 7 years ago
turns out its because the size of the chart is being set to 100% of the page and not the tab. Probably because the chart is rendering before the tab. is there a way to delay the rendering of the chart to test this theory
use the dynamic instance in ngAfterViewInit()
ngAfterViewInit() {
setTimeout(() => {
if(this.chart) {
this.chart.reflow();
}
},100);
}
Not possible due to it being redrawn on a *ngif, also you should not use setTimeout in angular due to AOT (so iv read in the past).
I solved it using observable and a subscribe with a debounce time.
Having issues with sizing of a highchart inside a bootstrap 4 tab.
I am trying to call chart.reflow (http://api.highcharts.com/highcharts/Chart.reflow) inside the typescript but not sure on how this would be done, especially without getting a typescript error. Any advice would be great thanks