williamwong
Posts: 36
Joined: Mon Feb 07, 2022 3:54 am

Ability to choose the series

In stock chart, I have volume and macd series. I would like to merge both into 1 window and present a dropdown box for user to select to display macd or volume. This way, I could provide more space for the price chart. How do I achieve this?
Attachments
feature request.png
feature request.png (91.33 KiB) Viewed 557 times
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Ability to choose the series

Hi williamwong,

Thanks for contacting us with your question.

You can create it either by switching series visibility using setVisible method or adding and removing series. You also need to remember to link series to right axis.
Demo: https://jsfiddle.net/BlackLabel/r94qvoj0/

Here you can find an example with add and remove series:
viewtopic.php?t=44011

Let me know if that was what you were looking for!
Regards!
Mateusz Bernacik
Highcharts Developer
williamwong
Posts: 36
Joined: Mon Feb 07, 2022 3:54 am

Re: Ability to choose the series

yes, but how to place the select box right next to macd window?
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Ability to choose the series

williamwong,

Could you provide me with an illustration where precisely the select box should be located? Thanks in advance.

Regards!
Mateusz Bernacik
Highcharts Developer
williamwong
Posts: 36
Joined: Mon Feb 07, 2022 3:54 am

Re: Ability to choose the series

The upper red box in the picture.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Ability to choose the series

Hi williamwong,

Please check this topic. You will learn there how you can position the select box:
viewtopic.php?t=45205

Let me know if that was what you were looking for!
Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”