fahidarif
Posts: 1
Joined: Tue Apr 05, 2022 5:01 pm

highchart Cannot read property 'loading' of undefined

Hi
Getting error of Cannot read property 'loading' of undefined on "this.chart.showLoading('message....') "method in angular10 ...the moment I enable and disable the chart from checkbox I'm getting spam of this error "Cannot read property 'loading' of undefined"

i've requirements to enable to disable the the chart so while enabling we call an api to fetch data as the api is in ending state we show the loading message in chart using this "this.chart.showLoading('message....') " but the moment when i enable and disable it on the same time i'm getting an error ..please guide me to resolve this error
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: highchart Cannot read property 'loading' of undefined

Hi there,

Thank you for contacting us with your question and welcome to our forum!

It is hard to tell what is not working without looking at your code live and working in an online editor, but I'm guessing that maybe the chart, that your are calling the loading property on does not exist? (Since you are removing it).

Maybe a better idea would be to use CSS and show/hide the div with the chart rendered inside?

Let me know your thoughts about it,
Best regards!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Usage”