dktg
Posts: 151
Joined: Mon Jan 29, 2018 2:19 pm

Adaption of column comparison

Hi,

Thank you for the great expample of comparing medal winners at olympic games on your demo page. I tried to adapt it to the code we usually use to be able to implement highcharts grafics in our cms. However, I got something wrong, but don't find the bug. Can you help me?
Here the expample: https://jsfiddle.net/statistik_tg/b6kqdr07/49/

Thank you for any hints and kind regards
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Adaption of column comparison

Hi,

We appreciate you reaching out to us!

You missed the jQuery library and you're getting a syntax error (brackets are not matching). Please review your code.
I've reproduced your example in pure JavaScript and everything works correctly.

Demo
https://jsfiddle.net/BlackLabel/rL8qgbvz/

Let me know if you have any further questions!
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
dktg
Posts: 151
Joined: Mon Jan 29, 2018 2:19 pm

Re: Adaption of column comparison

Hi, thank you for your help. When I produced the code in pure JS it also worked without any problem. The problem starts when implenting the JS code into our cms. We therefore work with the surrounding of the query and the json-variable, because in this shape the code works on our pages. Would it be therefore be possible to have another look at my first example and give me a hint, where I have to adapt my code so that it works?

Thanks again and kind regards,
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Adaption of column comparison

Hi,

I've made some modifications to your previous code, like adding jQuery library, changing scope and some variables.
Now it works in the fiddle demo https://jsfiddle.net/BlackLabel/zv8g053s/

Let me know if that worked in your CMS,
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
dktg
Posts: 151
Joined: Mon Jan 29, 2018 2:19 pm

Re: Adaption of column comparison

Hi, thank you! It works within our cms now. The only thing not working are the buttons. There seems to be some default settings in the background that cut the connection between button and function. I guess that's something our IT needs to have a lot on. Or are you aware of a trick that could help?

Thanks again and kind regards,
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Adaption of column comparison

Hi,

Are you getting any errors in the console, that could guide us to the problem?

Please, check also this code: https://jsfiddle.net/BlackLabel/eu4na652/

Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
dktg
Posts: 151
Joined: Mon Jan 29, 2018 2:19 pm

Re: Adaption of column comparison

Hi, thank you for your answer. Yes, there is an error message in the console saying:

13123:1098 Uncaught TypeError: Cannot read properties of null (reading '2008')
at HTMLButtonElement.<anonymous> (13123:1098)

I am not sure what this means, but I guess it has nothing to do with the connection between buttons and chart.

Kind regards,
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Adaption of column comparison

Hi,

I gather from the error message the problem is at your CMS side instead. Unfortunately, I can't help you with solving this issue.
You'd need to ask this question to support related to your CMS or StackOverflow.

Best regards!
Magdalena Gut
Developer and Highcharts Support Engineer
dktg
Posts: 151
Joined: Mon Jan 29, 2018 2:19 pm

Re: Adaption of column comparison

Thank you for your reply. That is what I think as well. Thank you anyway.
Kind regards,
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Adaption of column comparison

You're welcome,

In case of any further questions, feel free to contact us again.
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Usage”