jagge123
Posts: 2
Joined: Wed Jan 19, 2022 1:02 pm

Corresponding css for setting dash style

Hi,

Im working with some charts in styled mode and want one of my series (a graph line) to have a dashed style. While not in styled mode i can just set the dashStyle and everything is fine. However i cant find out what class i need to apply or even what the css for setting the dashed style is in Highcharts. I have set classNames for all my individual series so i assume i just need to target the correct class and apply the css.

Im stranded on this one and appreciate all help i can get!



Also small notice to Highcharts guys to update the 'Style by CSS' docs since many of the live demos are nothing but empty shells.


Thanks alot in advance!
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Corresponding css for setting dash style

Hi jagge123,

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

Please provide me with a simplified live demo of you chart in styled mode. You can start here: https://jsfiddle.net/BlackLabel/g96kt8jo/24/

Regards!
Mateusz Bernacik
Highcharts Developer
jagge123
Posts: 2
Joined: Wed Jan 19, 2022 1:02 pm

Re: Corresponding css for setting dash style

As always i spend hours trying to sort this out and the moment i actually ask a question i figure it out...

I only needed to set 'stroke-dasharray: 10, 12;' on my custom class i set as the 'className' for the series.

Anyways thx for the quick reply, happy days!
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Corresponding css for setting dash style

It happens to all of us :D Glad to hear you figured it out. In case of any further questions, feel free to contact us again.

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”