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

highstock tunnel annotation

How can i change the background of tunnel.. from default rgba(130, 170, 255, 0.4) to my custom.. i tried but its not working

Code: Select all

temp.tunnel = {
			typeOptions:{
				background:{
					fill:rgba(255,152,0,1)
					stroke:rgba(255,152,0,1)
					strokeWidth: 2
				},
				line:{
					stroke:rgba(255,152,0,1)
				}
			}
		}
border line does change like in screenshot

how can i change the blue color..?
sample.png
sample.png (13.77 KiB) Viewed 434 times
thanks..
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: highstock tunnel annotation

Hello jahnvi25,

Thanks for contacting us with your issue.

I think that there's a problem with the code that you shared. Options like fill, stroke and similar should receive color value as a string. Use fill: 'rgba(255,152,0,1)' instead of fill:rgba(255,152,0,1).
Demo: https://jsfiddle.net/BlackLabel/z6jsb5u8/

Let me know if that was what you were looking for!
Best regards!
Mateusz Bernacik
Highcharts Developer
jahnvi25
Posts: 284
Joined: Thu Oct 04, 2012 12:16 pm

Re: highstock tunnel annotation

Thanks for response.. i was trying annotations.tunnel.background which is not the case.. i need to specify typeOptions.background.fill...which is working..
jahnvi25
Posts: 284
Joined: Thu Oct 04, 2012 12:16 pm

Re: highstock tunnel annotation

one more question about fibonacci. i know from labels:[].. you can control the label display for each one. but is there a way to specify just one color for all labels ? instead of labels:[]..

thanks
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: highstock tunnel annotation

Hello jahnvi25,

You can change all labels' color with labelOptions.style.color property.
Demo: https://jsfiddle.net/BlackLabel/fpq7k53y/
API reference: https://api.highcharts.com/highstock/an ... ions.style

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

Return to “Highcharts Stock”