echarts icon indicating copy to clipboard operation
echarts copied to clipboard

设置minAngle在特定情况下导致的显示问题

Open CYvonne opened this issue 9 years ago • 0 comments

One-line summary [问题简述]

当我给饼图设置了minAngle=20,并且data中第一个数据的value设为<17(比如3),第二个数据的value设为'-'的时候,结果显示会有问题。

去掉minAngle=20的话则显示正确。

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {
color: ['#36bbd2', '#FEA054', '#FEE054', '#9CCC5A', '#F77157', '#9054FE', '#3988FF'],
					legend: {
						x: 'center',
						y: 'bottom',
						data: legendData,
						itemWidth: 14,
						itemGap: 20,
						padding: 0,
						width:350,
						
					},
					series: [{
						name: '访问来源',
						type: 'pie',
						radius: '60%',
						center: ['50%', '50%'],
						minAngle: 20,
						stillShowZeroSum: false,
						hoverAnimation: false,
						selectedMode: false,
						selectedOffset: 0,
						legendHoverLink: false,
						data: [{
									value: 3,
									name: '本周到期'
								}, {
									value: '-',
									name: '下周到期'
								}, {
									value: '-',
									name: '本月到期'
								}, {
									value: 55,
									name: '未到期'
								}, {
									value: 66,
									name: '已完成'
								}, {
									value: 77,
									name: '暂停'
								}, {
									value: 88,
									name: '逾期'
								}],
						roseType: 'angel',
						clockwise: false,//逆时针
						label: {
							normal: {
								textStyle: {
									color: '#999'
								},
								formatter: "{c}"
							}
						},
						labelLine: {
							normal: {
								lineStyle: {
									color: '#e5e5e5'
								},
								smooth: 0,
								length: 5,
								length2: 15
							}
						},
						itemStyle: {
							normal: {
								shadowBlur: 20,
								shadowColor: 'rgba(0, 0, 0, 0.3)'
							},
						},

						animationType: 'scale',
						animationEasing: 'elasticOut',
						animationDelay: function(idx) {
							return Math.random() * 200;
						}
					}]
}

Other comments [其他信息]

Markdown

CYvonne avatar Apr 28 '17 03:04 CYvonne