Zolotoy
Posts: 270
Joined: Tue Apr 14, 2020 10:06 am

column chart data

I have the following data for my simple column chart:

Code: Select all

0: {name: "86", y: 37.526, x: "MARK.CALC.CNT10"}
1: {name: "87", y: 36.288, x: "MARK.CALC.CNT30"}
2: {name: "88", y: 26.186, x: "MARK.CALC.CNT1"}
I also have these categories:
['MARK.CALC.CNT10', 'MARK.CALC.CNT30', 'MARK.CALC.CNT1']

I get empty chart with this shown in the Console:
Error: <rect> attribute y: Expected length, "NaN".
611:40:51.925 Error: <rect> attribute height: Expected length, "NaN".
5111:40:51.543 Error: <rect> attribute y: Expected length, "NaNNaN".
5111:40:51.543 Error: <rect> attribute height: Expected length, "NaNNaN".

Not sure what to do with these such informative errors.

Thanks
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: column chart data

Hi Zolotoy,

Thanks for contacting us!

Does your case look like this?
I am trying to know your problem, can you provide an example of your chart configuration in a code editor?
The data can be exemplary, they only to better understand your case.

Live demo:
https://jsfiddle.net/BlackLabel/8h3xs2jt/

Feel free to contact us if further help needed.
Best regards.
Sebastian Hajdus
Highcharts Developer
madhav
Posts: 1
Joined: Wed Jun 23, 2021 7:57 am

Re: column chart data

I have a very similar issue actually. Pretty simple bar chart which works fine in Chrome and Firefox but gives the following error in the case of Safari though:

Code: Select all

Error: Invalid value for <rect> attribute y="NaN"
Error: Invalid value for <rect> attribute height="NaNNaN"
(repeat for random number of times)
From what I've looked up, on other similar issues here in this forum & StackOverflow, it depends on the individual browser parsing and it's caused normally when we deal with the Date type. But I don't have any data of Date type. I'd appreciate it if you could help me out with an idea on how to approach this problem.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: column chart data

Hi madhav,
Welcome to our forum and thanks for contacting us with your question.

I checked this simple bar demo at the safari and don't have errors like yours.
That demo are you thinking about?

Demo:
https://jsfiddle.net/gh/get/library/pur ... /bar-basic

I'm waiting for news from you.
Best regards.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Usage”