bahar_Agi
bahar_Agi

Reputation: 644

Change legend symbol in Column Chart in highcharts

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

Upvotes: 2

Views: 8313

Answers (3)

Mark
Mark

Reputation: 108512

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

Upvotes: 2

saran
saran

Reputation: 1

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');
            }
        }   
    },

Upvotes: 0

Paweł Fus
Paweł Fus

Reputation: 45079

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

Upvotes: 2

Related Questions