Unfortunately my last PR introduced an unseen issue.
The use case is that when there are no data available and the noDataLabel gets displayed, #chart element is not present in the DOM, in order for Dygraph to plot the data when they are available again.
The error message is TypeError: Cannot read property 'nativeElement' of undefined which relates to this.chart @ https://github.com/mpx200/ng-dygraphs/blob/master/src/ng-dygraphs.component.ts#L71
#chart needs to always be present in the DOM, therefore we need to show/hide it and not add/remove it.
Unfortunately my last PR introduced an unseen issue.
The use case is that when there are no data available and the
noDataLabel
gets displayed,#chart
element is not present in the DOM, in order forDygraph
to plot the data when they are available again. The error message isTypeError: Cannot read property 'nativeElement' of undefined
which relates tothis.chart
@ https://github.com/mpx200/ng-dygraphs/blob/master/src/ng-dygraphs.component.ts#L71#chart
needs to always be present in the DOM, therefore we need to show/hide it and not add/remove it.Sorry for any inconvenience caused.