Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highcharts - How do I get dashed lines in legend

I'm using a basic line graph with some of the data series having dashed lines.

{
   name: 'Country Population',
   data: [1, 2, 3, 4], dashStyle: 'longdash'
}

However I can't get the legend to reflect which lines have dashes. Ideally I want the legend to include which lines have the dashes?

http://jsfiddle.net/cbx3r91u/

like image 798
colouredFunk Avatar asked Dec 12 '25 23:12

colouredFunk


1 Answers

Use symbolWidth to make the lines large enough to see the dashes.

symbolWidth: 40

seems to work well.

JSFiddle

like image 65
JBux Avatar answered Dec 15 '25 13:12

JBux



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!