Skip to content

echarts环形图圆角问题 #7121

@huanledeniuduzi

Description

@huanledeniuduzi

One-line summary [问题简述]

请问如何将echarts的环形图设置成圆角?

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 3.8.4
  • Browser version [浏览器类型和版本]: 最新版的chrome
  • OS Version [操作系统类型和版本]: win7/64位

Expected behaviour [期望结果]

环形图设置成圆角

ECharts option [ECharts配置项]

option = {
    color:_that.color,
	        title: {
	            text: _that.title,
	            top:'3%',
	            left:'1%',
	            textStyle:{
	                color: '#333',
	                fontStyle: 'normal',
	                fontWeight: 'normal',
	                fontFamily: 'sans-serif',
	                fontSize: 16,
	            },
	            
	        },
	        series: [{
	            name: '来源',
	            type: 'pie',
	            radius: ['60%', '75%'],
	            avoidLabelOverlap: false,
	            hoverAnimation:false,
	            label: {
	                normal: {
	                    show: false,
	                    position: 'center',
	                    textStyle: {
	                        fontSize: _that.fontSize,
	                        fontWeight: 'bold',
	                       	color:'#fff',
	                    },
	                    formatter:'{c}'
	                }
	            },
	            data: [{
	                    value: _that.value,
	                    name: _that.name,
	                    itemStyle:{
	                    	emphasis: {
		                        barBorderRadius: 7
		                    },
			                normal:{
			                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
			                        offset: 0,
			                        color: colorArr[i][0]
			                    }, {
			                        offset: 1,
			                        color: colorArr[i][1]
			                    }])
			                }
			            },
	                    label:{
	                        normal:{
	                            show:true
	                        }
	                    }
	                 },
	                {
	                    value: 100-_that.value,
	                    name: ''
	                }
	            ]
	        }]
}

2345 20171126160538
2345 20171126160306

Other comments [其他信息]

想从基础的第一张图片红圈里的样式改变为第二张图片红圈里的圆角样式,如何实现?谢谢!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions