How to access legendSymbols and change their shape in HighCharts

前端 未结 3 742
无人及你
无人及你 2020-12-20 06:04

I have a line chart with markers disabled. The legendSymbol is currently a line. I would like to show the symbol as a square. Any pointers?

3条回答
  •  渐次进展
    2020-12-20 06:39

    With the latest Highcharts release you can also exchange the method that draws the legend icon from outside of Highcharts:

    Highcharts.seriesTypes.line.prototype.drawLegendSymbol = 
         Highcharts.seriesTypes.area.prototype.drawLegendSymbol;
    

    To use the element that is drawn for the area chart as an icon for a line graph. (I have used this in Highcharts Stockcharts but this should be applicable in basic Highcharts as well)

提交回复
热议问题