bobby
Posts: 13
Joined: Fri Jan 29, 2021 3:56 am

Highcharts annotations default styling, colors etc

Hi! Thank you for all your help. I am confused about implementing annotations on highcharts stock. I see that the value takes an array of annotations, however i am just using stock tools gui with AnnotationsAdvanced using react. I'd like to style the lines for dark mode usage, and also line width and some other parameters. I see you have the event add. But these events are per preadded- or post added Annotations and I'm not able to access that event callback.

I also see in your dark mode example that the default line color is still black.
Is there anyway around this? Is it covered in useStyles?

Thank you for your help as always!
bobby
Posts: 13
Joined: Fri Jan 29, 2021 3:56 am

Re: Highcharts annotations default styling, colors etc

Excuse me, covered in styled mode?
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Highcharts annotations default styling, colors etc

Hello bobby!

We appreciate you reaching out to us!

If you use annotations through stock tool GUI you can stylize the annotation label by clicking it. Do you want to stylize it in a different way? I would appreciate it a lot if you could reproduce your issue in an online editor and point out the issue. :)

Best regards!
Dominik Chudy
Highcharts Developer
bobby
Posts: 13
Joined: Fri Jan 29, 2021 3:56 am

Re: Highcharts annotations default styling, colors etc

Hello dominik!
Thank you for your time as always. I am just curious if there is a way to default the settings for each annotations rather than having our customers modify it. There's not a specific issue to reproduce I'm just curious if this functionality is possible. If not I will likely just go with light theming rather than dark.

https://www.highcharts.com/demo/stock/s ... dark-unica

If you go to the dark mode demo and add a line annotation notice how it defaults to the color black.

thank you!
bobby
Posts: 13
Joined: Fri Jan 29, 2021 3:56 am

Re: Highcharts annotations default styling, colors etc

I think I have it figured out I will update my post when I have it figured out thank u!
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Highcharts annotations default styling, colors etc

Hi again!

All right, we're waiting for your update. :)

Best regards!
Dominik Chudy
Highcharts Developer
Gabe Alexander
Posts: 2
Joined: Mon Nov 01, 2021 8:15 pm

Re: Highcharts annotations default styling, colors etc

I need the answer to this.
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Highcharts annotations default styling, colors etc

Hello Gabe Alexander!

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

Do you wonder if it's possible to set the default color of the annotation label?
If yes, unfortunately, it's not (at least using API and stockTools).

But you can try to create your own button that'll be responsible for adding annotation labels and over there you can set all its default properties. If you could tell me exactly what you're looking for I'm sure that I could help you more. :)

Best regards!
Dominik Chudy
Highcharts Developer
Alex Pohorielov
Posts: 1
Joined: Tue Aug 23, 2022 6:08 pm

Re: Highcharts annotations default styling, colors etc

Gabe Alexander wrote: Mon Nov 01, 2021 9:55 pm I need the answer to this.

You can try this:
https://api.highcharts.com/highcharts/n ... ons.stroke
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Highcharts annotations default styling, colors etc

Hi Alex Pohorielov!
Welcome to our forum and thanks for sharing your idea with other users. It can be really helpful for someone who is facing a similar issue!
Regards!
Hubert Kozik
Highcharts Developer

Return to “Highcharts Stock”