Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

echarts环形图圆角问题 #7121

Closed
huanledeniuduzi opened this issue Nov 26, 2017 · 4 comments
Closed

echarts环形图圆角问题 #7121

huanledeniuduzi opened this issue Nov 26, 2017 · 4 comments

Comments

@huanledeniuduzi
Copy link

huanledeniuduzi commented Nov 26, 2017

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 [其他信息]

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

@oo10
Copy link

oo10 commented Jan 8, 2018

m

@wangmeijian
Copy link

+1

@libangrui
Copy link

+1 mark

@Ovilia
Copy link
Contributor

Ovilia commented Oct 8, 2018

统一关注 #4856 吧,这里先关了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants