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

highstock crosshair with menu for more options

i have enabled crosshairs which displays values just like expected.. but is there a way to add small (+) icon or something along with that for more options.. like in screenshot below..

Thanks
Attachments
sample22.png
sample22.png (53.56 KiB) Viewed 444 times
sample11.png
sample11.png (30.91 KiB) Viewed 444 times
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: highstock crosshair with menu for more options

Hello jahnvi25!

We appreciate you reaching out to us!

As far as I know, there are no API options that could add such a button, so you would probably need to add it by yourself.

Maybe our custom GUI would interest you. In the demo below you've got an interface from which you could modify the chart (something similar to your button functionality).

Demo: https://www.highcharts.com/demo/stock/s ... custom-gui

Best regards!
Dominik Chudy
Highcharts Developer
jahnvi25
Posts: 284
Joined: Thu Oct 04, 2012 12:16 pm

Re: highstock crosshair with menu for more options

i was thinking of using XAxisCrosshairLabelFormatterCallbackFunction(for y-axis)function and add may be icon or something in the formatter function. but i dont know how to use that ? do you think this would work as alternative ?

Thanks.. i will look into custom GUI as well
jahnvi25
Posts: 284
Joined: Thu Oct 04, 2012 12:16 pm

Re: highstock crosshair with menu for more options

looks like formatter function is not working on y-Axis. is this a bug ? i do see documentation for it..
and i am trying to change the shape for X-axis crosshair label. but that seem to be not working as well..
is there a way i can use custom icon with link with html in formatter function, that would be simpler than modifying the chart for what i need..

here is the link

https://jsfiddle.net/j3wf78th/
minhyen97
Posts: 30
Joined: Mon Apr 12, 2021 10:50 am
Location: PM

Re: highstock crosshair with menu for more options

jahnvi25 wrote: Mon Apr 19, 2021 5:44 pm i have enabled crosshairs which displays values just like expected.. but is there a way to add small (+) icon or something along with that for more options.. like in screenshot below..

Thanks
Capture.PNG
Capture.PNG (88.45 KiB) Viewed 435 times
Hi jahnvi25
Can you just help me fix the lastLablePrice tag like yours currently. because my label is covering the last few candles on the chart. Do you have a way to move the labels to the outside right of the chart!
I have been trying to get to the documentation so far but have not solved this problem yet.
Hope you will help me with this problem, thank you very much!
My demo: https://jsfiddle.net/j0pwdsy6/
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: highstock crosshair with menu for more options

Hi, again jahnvi25!

The formatter function for yAxis didn't work because you've also defined format property that overlapped formatter function. When we get rid of format property, it works fine: https://jsfiddle.net/BlackLabel/8cdyh253/

Unfortunately, there's no useHTML property for crosshair labels, so you can't put in formatter function any HTML element that could be like your button.

Best regards!
Dominik Chudy
Highcharts Developer

Return to “Highcharts Stock”