RodOrmon
Posts: 2
Joined: Thu Mar 02, 2023 1:59 am

Globally set ToolTips Split to TRUE

Hi Team,

Thanks for this great tool! We are using HighCharts for most of our visualizations.

Is there a way to "globally" set the ToolTips Split to "true" overriding the default of false (like it was back in pre- V6 releases?

If possible we would prefer to make a single "global" change rather than make the override on every one of our existing (and new) charts.

Thanks!
jedrzej.r
Posts: 725
Joined: Tue Jan 24, 2023 11:21 am

Re: Globally set ToolTips Split to TRUE

Hello and welcome to our forum!

We appreciate that you enjoy Highcharts products!

First of all, you asked the question in Highcharts Stock, in which tooltip.split property is set to true by default. But in case you have many charts on one page, you are still able to set global options by Highcharts.setOptions object, which will override default setting.

For splitting tooltip on all charts, you can use this code snippet:

Code: Select all

Highcharts.setOptions({
  tooltip: {
    split: true
  }
});

References:
https://www.highcharts.com/docs/getting ... al-options
https://api.highcharts.com/highstock/tooltip.split

Let me know if that was what you were looking for! In case of any other questions, feel free to ask anytime.
Best regards!
Jędrzej Ruta
Highcharts Developer
RodOrmon
Posts: 2
Joined: Thu Mar 02, 2023 1:59 am

Re: Globally set ToolTips Split to TRUE

Thanks for the reply. And my mistake, as your reply correctly indicates the default is true for ToolTips Split. I meant to ask:

Is there a way to "globally" set the ToolTips Split to "false" overriding the default of "true".

If possible we would prefer to make a single "nodejs module" change rather than make the override on every one of our existing (and new) charts.

The issue is we have many, many places to change. We would prefer to have the default be false and only have to use your suggestion to add a setOptions when we might want tooltip.split=true (which would be very rare.)

Thanks, again! And sorry for the mix up for true/false.
jedrzej.r
Posts: 725
Joined: Tue Jan 24, 2023 11:21 am

Re: Globally set ToolTips Split to TRUE

As previously mentioned, it is possible to globally set options for all charts using Highchart.setOptions object. You can add this snippet of code before initializing your charts:

Code: Select all

Highcharts.setOptions({
  tooltip: {
    split: false // change to desired value
  }
});
This snippet overrides tooltip setting globally (for all charts), and if you want to have split tooltip in particular chart, than you can enable it in chosen chart config.

Take a look at this demo: http://jsfiddle.net/BlackLabel/9rjwm5bx/

Best regards!
Jędrzej Ruta
Highcharts Developer

Return to “Highcharts Stock”