jahnvi25
Posts: 284
Joined: Thu Oct 04, 2012 12:16 pm

highstock bottom tooltip with formatter

i would like to enable bottom tooltip (where it displays dats in the format like 'Wednesday Oct 17..').. but its not working with custom formatter function..

https://jsfiddle.net/evdrkLm5/

run this demo and you will see default bottom tooltip...
but when formatter function is un-commented, bottom tooltip is not showing..
how can i fix it.. i have need for custom formatter function.

Thanks
kamil.k
Posts: 458
Joined: Thu Oct 06, 2022 12:49 pm

Re: highstock bottom tooltip with formatter

Hello there,

As I can see, you are setting the tooltip property globally. How about setting it directly to the series?
I have updated the demo with the possibility to set the custom tooltips for both series and remains the bottom one as unchanged showing the data you need.

Please, take a look: https://jsfiddle.net/BlackLabel/ducx1pen/

API: https://api.highcharts.com/highstock/se ... tFormatter

Let me know if I understood you correctly and if the solution is what you were looking for,
Best Regards!
Kamil Kubik
Highcharts Developer
jahnvi25
Posts: 284
Joined: Thu Oct 04, 2012 12:16 pm

Re: highstock bottom tooltip with formatter

:( Thanks for reply, but thats not what i was asking about. i modified the demo with just showing one OHLC series.

https://jsfiddle.net/L15bz23y/2/

in the above demo the default bottom tooltip is not showing because i have enabled formatter function..
how can i have tooltip like attached screenshot with custom formatter in place ?? (specially bottom date part -- Wednesday, Oct 12,13:30)
sample_tooltip.png
sample_tooltip.png (43.04 KiB) Viewed 345 times
kamil.k
Posts: 458
Joined: Thu Oct 06, 2022 12:49 pm

Re: highstock bottom tooltip with formatter

Thank you for the clarification. What you need to achieve can be simply done by returning the array from the formatter in which every element corresponds to another tooltip starting from the header. You can read more about it here: https://api.highcharts.com/highcharts/tooltip.formatter

Please take note that in the above example I have used the pointFormatter which corresponds to the particular point and doesn't reset every tooltip as formatter does.

I have updated the latest example you provided (according to the first one, you have to use three elements array): https://jsfiddle.net/BlackLabel/ojv0sd4b/

Let me know if that works for you,
Regards!
Kamil Kubik
Highcharts Developer

Return to “Highcharts Stock”