I have a highcharts legend where the symbols are displaying with varying sizes as they are different sizes in the actual chart. Unfortunately, when the sizes of the data points grow, they also grow in the legend. I want the legend symbols to remain the same size regardless of the data point size.
Here is an example where the data points have grown with the graph. In case it matters, the actual graph I'm using is a scatter plot (unlike the example).
http://jsfiddle.net/RsUhk/
Any help is much appreciated!
This is a little hacky but it's the best I can come up with. After you draw the plot, manually adjust the legend symbols:
$(chart.series).each(function(){
this.legendSymbol.attr('width',8);
this.legendSymbol.attr('height',8);
this.legendSymbol.attr('x',this.legendLine.attr('translateX')-17);
this.legendSymbol.attr('y',this.legendLine.attr('translateY')-4);
});
Updated fiddle here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With