How can I remove a color swatch from my HighCharts legend without affecting the column?

In my JSFiddle, the sample My Company

is blue. I already know that I can replace the pattern with the symbol as shown in the JSFiddle, but how would I go about removing the other pattern without affecting the columns and just keep the series name My Company

. I tried setting the color to transparent removes the swatch but also makes the column transparent and setting the legend to false removes the legend.

+3


source to share


1 answer


there might be a cleaner solution for this, however I found a solution that works right now.

you have the option to style the legend "symbols" and set the height to 0px, which effectively hides it.

I added legend: { symbolHeight: '0px' },

you can read more about the API options here: http://api.highcharts.com/highcharts#legend



and here is your updated demo.

http://jsfiddle.net/rlemon/NDpu6/35/

+4


source







All Articles