Aligning the text in Legend in Highcharts

后端 未结 1 2015
闹比i
闹比i 2021-01-25 16:41

Currently the legend aligns the text to the left. I.e (-- indicates item label and in most cases would be just different colors.

 ___________________
[-- Legend          


        
相关标签:
1条回答
  • 2021-01-25 17:07

    You can set useHTML and then define width and text-align:

    http://jsfiddle.net/5gjfW/2/

    .highcharts-legend-item span {
        width:70px!important;
        text-align:right!important;
    }
    

    http://api.highcharts.com/highcharts#legend.useHTML

    0 讨论(0)
提交回复
热议问题