Feedfedfat Feedfedfat - 6 months ago 51
Javascript Question

In Highcharts, is it possible to add a border to the legend symbol?

In highcharts, to configure the legend symbol (the small square in front of each legend item), there are four properties can be configured:

symbolHeight, symbolPadding, symbolRadius, symbolWidth
.

Is it possible to add some extra properties to it? Like
borderWidth, borderColor...
?

Answer

symbolHeight, symbolPadding, symbolRadius, and symbolWidth are merely used to adjust the size and placement of the symbols in the legend. To further change the appearance of these symbols, you should look at the options for series.marker.symbol instead (see http://api.highcharts.com/highcharts#series<line>.marker.symbol).

There's a demo fiddle the Highcharts team created that shows you a bunch of options for marker symbols, each of which shows up in the legend as well: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-marker-symbol/

Hopefully, one of these options should be suitable for you.

enter image description here