echarts中的圆条

问题描述 投票:0回答:2

是否有办法使条形图在ECharts图表中四舍五入,例如示例here

echarts baidu
2个回答
1
投票

使用roundCap:true

Example

series: [{
        type: 'bar',
        data: [4, 3, 2, 1, 0],
        coordinateSystem: 'polar',
        name: 'Without Round Cap',
        color: 'rgba(200, 0, 0, 0.5)',
        itemStyle: {
            borderColor: 'red',
            borderWidth: 1
        }
    }, {
        type: 'bar',
        data: [4, 3, 2, 1, 0],
        coordinateSystem: 'polar',
        name: 'With Round Cap',
        roundCap: true,
        color: 'rgba(0, 200, 0, 0.5)',
        itemStyle: {
            borderColor: 'green',
            borderWidth: 1
        }
    }],


-1
投票

您需要在该代码中添加CSS。

How to make corners of progress bar round in css

我在这里找到解决方案,它将为您服务。

© www.soinside.com 2019 - 2024. All rights reserved.