饼图下的轴/标签 - echarts

时间:2021-01-15 15:20:45

标签: laravel 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}%)"}),
        });

1 个答案:

答案 0 :(得分:0)

你可以尝试添加 .axis(false) 这应该有效。