How to make a specific series in a chart have a dashed line?

Hello, 


I have a line chart that is plotting a DataPointList with 3 DataSeriesName's, and right now the chart plots each series as a solid line (as this is the default). The series' are named "apple", "banana", and "orange". I figured out how to make the linestyle for all of them a dashed line, but how do I just do it for one of them (lets say the "orange" series)? I've tried looking at highcharts API but can't figure it out. 


Thanks!

Solution

James Carson wrote:

Hello, 


I have a line chart that is plotting a DataPointList with 3 DataSeriesName's, and right now the chart plots each series as a solid line (as this is the default). The series' are named "apple", "banana", and "orange". I figured out how to make the linestyle for all of them a dashed line, but how do I just do it for one of them (lets say the "orange" series)? I've tried looking at highcharts API but can't figure it out. 


Thanks!


Hi James,


You may use this and set style of dash per DataSeriesName if you were using the Charts\LineChart. 


Here's the result of the screenshot above.


You can find here the other possible values of dash as well. 

 https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/ 

And here, you can find the dashstyle from HighCharts API.

https://api.highcharts.com/highcharts/series.line.dashStyle

Solution

Thanks!!!