[英]display high chart pie chart on the top of the div
i have the high-chart with label as shown below我有带标签的高图,如下所示
how to display the chart from the top left corner如何从左上角显示图表
i have tried doing it as below我试过如下
{
legend: {
itemStyle: {
fontSize:'8px'
},
align: 'right',
layout: 'vertical',
verticalAlign: 'top',
x: this.state.legendXValue ? this.state.legendXValue : 10,
y: this.state.legendYValue ? this.state.legendYValue : 30,
backgroundColor: 'rgba(255,255,255,0.2)'
}
}
but chart is not aligning to the top left但图表没有与左上角对齐
please let know how to configure chart parts to render it from the top left i mean there is lot of space in the top left how to remove it and utilize it for the chart请让我们知道如何配置图表部分以从左上角呈现它我的意思是左上角有很多空间如何将其删除并将其用于图表
You can position the pie chart according to your requirements by using center
property:您可以使用
center
属性根据您的要求定位饼图:
series: [{
center: ['30%', '40%'],
size: '80%',
...
}]
Live demo: http://jsfiddle.net/BlackLabel/6m4e8x0y/4812/现场演示: http : //jsfiddle.net/BlackLabel/6m4e8x0y/4812/
API Reference: API参考:
https://api.highcharts.com/highcharts/series.pie.center https://api.highcharts.com/highcharts/series.pie.center
https://api.highcharts.com/highcharts/series.pie.size https://api.highcharts.com/highcharts/series.pie.size
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.