chrillenilsson123
Posts: 7
Joined: Mon Oct 21, 2024 2:02 pm

remove this section?

Hi,
is there any way to hide or remove the "drag zoom" under the graph?
Image
andrzej.b
Site Moderator
Posts: 315
Joined: Mon Jul 15, 2024 12:34 pm

Re: remove this section?

Hi,

Thanks for asking your question,

You can disable the navigator and scrollbar in the chart config, please see the API reference:
- https://api.highcharts.com/highstock/navigator.enabled
- https://api.highcharts.com/highstock/scrollbar.enabled

Here is a demo for you: https://jsfiddle.net/BlackLabel/xakzurgb/

I hope you will find it useful

Best regards,
Andrzej
Highcharts Developer
chrillenilsson123
Posts: 7
Joined: Mon Oct 21, 2024 2:02 pm

Re: remove this section?

Thanks,

but I cant get it work.
I have added the JS but no result?

https://orlandomagic.se/strand-formogenhetsfond/
andrzej.b
Site Moderator
Posts: 315
Joined: Mon Jul 15, 2024 12:34 pm

Re: remove this section?

Hi,

If you could share your chart config, I would be able to help you further. The best would be to reproduce it in some on-line editor like jsfiddle.

Best,
Andrzej
Highcharts Developer
chrillenilsson123
Posts: 7
Joined: Mon Oct 21, 2024 2:02 pm

Re: remove this section?

I use Highcharts thru "WP DataTables" and the have a section for "custom JS and CSS" but when I insert the code there, nothing happens.
andrzej.b
Site Moderator
Posts: 315
Joined: Mon Jul 15, 2024 12:34 pm

Re: remove this section?

Ok, now I see the possible issue.

As far as I can tell this is not related to Highcharst functionality, as the config on our side is straightforward. You are using a WordPress plugin which is not supported by us, and I don't have access to their platform to provide any further assistance. I can only advise you to contact them and also try out this path: https://wpdatatables.com/documentation/ ... callbacks/

From the code there I would try something along these lines inside the script tag:

Code: Select all

jQuery(window).on('load', function(){
    if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
    wpDataChartsCallbacks[39] = function(obj){
        obj.options.navigator.enabled = false;
        obj.options.scrollbar.enabled = false;
    }
});
Best,
Andrzej
Highcharts Developer

Return to “Highcharts Stock”