目前图例将文本左对齐。即 (-- 表示项目标签,在大多数情况下只是不同的颜色。
___________________
[-- Legend item 2 ]
[-- Legend item 3 ]
[-- Legend item 244 ]
我希望它能像这样
___________________
[-- Legend item 2 ]
[-- Legend item 3 ]
[-- Legend item 244 ]
我尝试使用 itemStyle: textAlign: 'right' 但没有运气。这可能吗?
您可以设置 useHTML,然后定义宽度和文本对齐:
http://jsfiddle.net/5gjfW/2/
.highcharts-legend-item span {
width:70px!important;
text-align:right!important;
}
http://api.highcharts.com/highcharts#legend.useHTML
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)