Axis/label饼图下-echarts
Axis/label under pie chart - echarts
我在 Laravel 上通过 Chartisan 包使用 echarts 库,但是当我渲染饼图时,饼图下方会呈现一条线。我怎样才能去掉饼图下面的线?
eCharts Pie Chart
const goods_chart = new Chartisan({
renderer: 'svg',
el: '#goods_category_chart',
url: "@chart('goods_category_chart')",
hooks: new ChartisanHooks()
//.colors(['#4299E1','#62051f','#C07EF1','#67C560','#ECC94B'])
.title({
text:'Goods by Category (YTD)',
subtext:'Tonnes',
left:'center'
})
.legend({
orient: 'vertical',
left: 10,
},)
.datasets([{
type:'pie',
animationEasing: 'cubicInOut',
radius: ['45%', '70%'],
labelLine: {
show: true
},
emphasis: {
label: {
show: true,
fontSize: '15',
fontWeight: 'bold'
},
itemStyle:{
shadowBlur:10,
shadowOffsetX:0,
shadowColor:'rgba(0, 0, 0, 0.5)'
}
},
}])
.tooltip({trigger: 'item',formatter: "{a} <br/>{b} : {c} ({d}%)"}),
});
你可以尝试添加 .axis(false) 这应该有效。
我在 Laravel 上通过 Chartisan 包使用 echarts 库,但是当我渲染饼图时,饼图下方会呈现一条线。我怎样才能去掉饼图下面的线? eCharts Pie Chart
const goods_chart = new Chartisan({
renderer: 'svg',
el: '#goods_category_chart',
url: "@chart('goods_category_chart')",
hooks: new ChartisanHooks()
//.colors(['#4299E1','#62051f','#C07EF1','#67C560','#ECC94B'])
.title({
text:'Goods by Category (YTD)',
subtext:'Tonnes',
left:'center'
})
.legend({
orient: 'vertical',
left: 10,
},)
.datasets([{
type:'pie',
animationEasing: 'cubicInOut',
radius: ['45%', '70%'],
labelLine: {
show: true
},
emphasis: {
label: {
show: true,
fontSize: '15',
fontWeight: 'bold'
},
itemStyle:{
shadowBlur:10,
shadowOffsetX:0,
shadowColor:'rgba(0, 0, 0, 0.5)'
}
},
}])
.tooltip({trigger: 'item',formatter: "{a} <br/>{b} : {c} ({d}%)"}),
});
你可以尝试添加 .axis(false) 这应该有效。