maliu
Posts: 2
Joined: Mon May 15, 2023 10:17 am

Issue with setCompare and dataGrouping approximation

Hi,

We have a chart that uses the compare tool with the option to reset the comparison by using yAxis[0].setCompare("none"). It's based on this demo: https://jsfiddle.net/gh/get/library/pur ... setcompare

Our chart also uses the dataGrouping approximation setting, but this causes issues with setCompare. yAxis[0].setCompare("none") causes an error if the chart's series has the dataGrouping approximation setting defined. The error shown in the console is "caught TypeError: Cannot read properties of undefined (reading 'forEach')" Example (built on top of the demo linked above): https://jsfiddle.net/maliu/Lcfobpzg/10/

Thanks for any help with this issue!
jakub.s
Posts: 1229
Joined: Fri Dec 16, 2022 11:45 am

Re: Issue with setCompare and dataGrouping approximation

Hi,

Welcome to our forum & thanks for the question!

You're right, it seems to be a bug. I've reported it on GitHub here: https://github.com/highcharts/highcharts/issues/19001 where you can track its progress.

Our developers will take it from there.

Let me know if there's anything else I could help you with.

Best regards!
Jakub
Highcharts Developer
maliu
Posts: 2
Joined: Mon May 15, 2023 10:17 am

Re: Issue with setCompare and dataGrouping approximation

Hi Jakub,

Thank you very much for checking this! I'll track the issue's progress in GitHub.
jakub.s
Posts: 1229
Joined: Fri Dec 16, 2022 11:45 am

Re: Issue with setCompare and dataGrouping approximation

Sure, no problem.

Do not hesitate to ask in case any questions arise. I'll be happy to help.

Kind regards!
Jakub
Highcharts Developer

Return to “Highcharts Stock”