venkatesh
Posts: 5
Joined: Mon Sep 05, 2022 11:33 am

Error: <rect> attribute width: Expected length, "NaN".

while resizing my chart too small this Error: <rect> attribute width: Expected length, "NaN". occured.
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Error: <rect> attribute width: Expected length, "NaN".

Hello,

Welcome to our forum!

As you have said, the chart is too small to render some drawings on it, therefore it throws an error.
And that's all we can do without looking and your code and knowing what problems this error causes.

Next time, please provide a more detailed explanation of your problem and reproduce the issue in an online editor like JSFiddle.

Best regards!
Kamil Musiałowski
Highcharts Developer
dizzy
Posts: 79
Joined: Mon Aug 01, 2022 5:28 pm

Re: Error: <rect> attribute width: Expected length, "NaN".

venkatesh wrote: Mon Sep 05, 2022 11:36 am while resizing my chart too small this Error: <rect> attribute width: Expected length, "NaN". occured.
by chance are you passing data (as json) to your page/chart from python/pandas? if so, you may want to drop NaNs or back/forward fill before sending to your page.
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Error: <rect> attribute width: Expected length, "NaN".

dizzy, thank you for contributing to our forum! We appreciate your help and effort :)
Kamil Musiałowski
Highcharts Developer
venkatesh
Posts: 5
Joined: Mon Sep 05, 2022 11:33 am

Re: Error: <rect> attribute width: Expected length, "NaN".

do you have any idea about Highcharts['seriesTypes'].variwide.prototype.correctStackLabels = function () {} function I could not get proper idea about this issue someone please explain , it will solve my above issues as well
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Error: <rect> attribute width: Expected length, "NaN".

Hi,

Unfortunately, your message does not tell much about the whole issue.
Could you please reproduce it in an online code editor, so I can look at the bigger picture, and investigate what could be causing it?

Thank you in advance,
Regards!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Stock”