efenadir
Posts: 31
Joined: Sat Jul 10, 2021 6:32 pm

Cannot remove built-in flag from stock chart

Hello,

I have a question about flags. In my chart, user can add flags and after save the chart(It is stock chart with stock tools). When user saves the chart and after user renders the page again, I take the chart info (annotations, flags) from local storage and user can see the saved chart. There is no problem so far.

But unlike in annotations, I cannot remove the flags from the UI, after the saved chart shows up. I also tried to add the flag object manually, just put in the series object in options. But again, I couldn't remove the flag from the UI. I mean normally when you add a flag, in that session, the flag is clickable and you can remove or edit the flag. But, in my case, the flag is not even clickable.

Did you configure this feature on purpose?

Thank you for your consideration!
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Cannot remove built-in flag from stock chart

Hello efenadir!

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

Is it ok for you to delete flags programmatically? We can use the remove method on series to delete it.
Something like that: https://jsfiddle.net/BlackLabel/1oh07w6v/

API references:
https://api.highcharts.com/class-refere ... ies#remove

If that's not what you are looking for I suggest creating a feature request on our GitHub. We'll take a closer look at this issue over there.
Here you can find a link: https://github.com/highcharts/highchart ... new/choose

Best regards!
Dominik Chudy
Highcharts Developer
efenadir
Posts: 31
Joined: Sat Jul 10, 2021 6:32 pm

Re: Cannot remove built-in flag from stock chart

Hi Dominik,

Thank you for your response and suggested solution. But I believe this is not the best practice for this problem and it doesn't seem very UX friendly to me.

I open feature request on github: https://github.com/highcharts/highcharts/issues/16024

Anyone can follow the flow from there.

Best regards!
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Cannot remove built-in flag from stock chart

All right, thanks for doing that!

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

Return to “Highcharts Stock”