ronakdiyora
Posts: 9
Joined: Thu Jul 08, 2021 6:31 am

Set flag at specific position

I am using highstock chart for showing stock data and using flag to show up and down signal. Here, I am attaching images of highstock chart visual and expecting visual of flag position.

Please help me set flag position of highstock chart.

This flag position I am expecting as per below image
https://ibb.co/PcGJDDG

Currently flag position looks like of highstock chart
https://ibb.co/0BQ1S1S
Warm regards,
Ronak Diyora
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Set flag at specific position

Hello ronakdiyora!

Welcome to our forum and thanks for contacting us with your question!

So to sum up, you want the flags on different heights. Red ones higher, green ones lower. Do you also want to replace the basic look of the flag with an arrow? I would appreciate it a lot if you could reproduce the demo from your screenshots in an online editor I could work on. :)

Template demo:
https://jsfiddle.net/BlackLabel/ewq7ropt/

Best regards!
Dominik Chudy
Highcharts Developer
ronakdiyora
Posts: 9
Joined: Thu Jul 08, 2021 6:31 am

Re: Set flag at specific position

Hello Diminik Chudy,
Do you also want to replace the basic look of the flag with an arrow?
Ans :- If possible then it will good for me

I have created demo of my data. Please check and let me know possible solution

Demo:
https://jsfiddle.net/ronakdiyora/cL5zj7fv/4/
Warm regards,
Ronak Diyora
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Set flag at specific position

Hi again!

You can move the flag by editing y property, like that: https://jsfiddle.net/BlackLabel/mkgzc39a/ (look at the last flag series)

Another way to place the flags as you want could be to add hidden scatter series and place flags on them. And this is something that I recommend to you. You can also use y property for the flag series to have flags on different heights. Check out the demo: https://jsfiddle.net/BlackLabel/0nL2zrau/

API references:
https://api.highcharts.com/highstock/series.flags.y

Best regards!
Dominik Chudy
Highcharts Developer
ronakdiyora
Posts: 9
Joined: Thu Jul 08, 2021 6:31 am

Re: Set flag at specific position

Hello,

Thanks for your efforts for the demo. This is working fine.

Warm regards,
Ronak Diyora
Warm regards,
Ronak Diyora
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Set flag at specific position

You're welcome! :)

In case of any further questions, feel free to contact us again.
Dominik Chudy
Highcharts Developer

Return to “Highcharts Stock”