[英]HightCharts: How to align pie chart positions to right or left corner of the container
如何将 highcharts 中的饼图与容器中的右端或左端对齐? 我注意到 center:[] 属性使用百分比工作,但在调整容器大小时遇到一些位置问题。 请检查下面的小提琴链接。
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Browser market shares in January, 2018'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
showInLegend: true
}
},
series: [..]
});
您可以为图表使用style属性。 请看附上的例子:
chart: {
plotBackgroundColor: null,
width: 200,
height: 300,
type: 'pie',
style: {
'float': 'right'
}
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.