Skip to content Skip to sidebar Skip to footer

Custom Highcharts Legend Symbol

I want to override the legend symbols in Highcharts. But I cannnot see any way of doing this. The Highcharts Legend API has a 'labelFormatter' function but nothing to format the sy

Solution 1:

You can use two series, connect them using linkedTo option, then for the main series, you can use image as symbol, for example:

$('#container').highcharts({series: [{
    data: [],
    id:'main',
    marker: {
      symbol:'url(https://www.highcharts.com/samples/graphics/sun.png)'
    }
  }, {
    linkedTo:'main',
    data: [1, 3, -2, -4]
  }]
});

Demo: http://jsfiddle.net/hnc27nf2/

Screenshot:

exmaple

Post a Comment for "Custom Highcharts Legend Symbol"