2
votes

I want to change the legend Symbol in column chart and make a legend Symbol like spline. I've seen the document => legend.

As I've seen I can change the legend width and some other features like CSS designing but how can I change the symbol?

enter image description here

change to

enter image description here

Please help...

Thanks

3

3 Answers

2
votes

I don't believe the Highchart's API offers the ability to customize the legend symbol with a bar chart. You can, however, modify the symbol after the chart is drawn.

   chart: {
        type: 'column',
        events: {
            load: function(event) {
                // modify the legend symbol from a rect to a line
                $('.highcharts-legend-item rect').attr('height', '2').attr('y', '10');
            }
        }   
    },

Fiddle here.

enter image description here

2
votes

Since Highcharts 3.0 you can use linkedTo option. API with the demo.

0
votes

Remove Legend symbol

 chart: {
        type: 'column',
        events: {
            load: function(event) {
                // modify the legend symbol from a rect to a line
                $('.highcharts-legend-item rect').attr('r', '0');
            }
        }   
    },