Closed kazehaiya closed 5 years ago
Test example:
var chart = echarts.init(document.getElementById('main'), null, {
renderer: 'svg'
});
var option = {
title : {
text: '某站点用户访问来源',
subtext: '纯属虚构',
x:'center'
},
tooltip : {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient: 'vertical',
left: 'left',
data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
},
series : [
{
id: 'aaa',
name: '访问来源',
type: 'pie',
radius : '55%',
center: ['50%', '60%'],
selectedMode: 'single',
data:[
{value:335, name:'直接访问'},
{value:310, name:'邮件营销'},
{value:234, name:'联盟广告'},
{value:135, name:'视频广告'},
{value:1548, name:'搜索引擎'}
],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
chart.setOption(option, true);
chart.on('pieselectchanged', data => {
console.log(data);
});
General Questions
I tried to get Pie's seriesId with
pieselectchange
funciton while Pie's data is more than two, howerer, I suppose the result isbut I get only
And my series data is
Issue Type
Issue Details
The result of
pieselectchange
function missingseriesId
paramsExpected Behavior
As document's result
Current Behavior
Missing
seriesId
{ type: 'pieselected', // 数据名称 name: name, // 所有数据的选中状态表。 selected: Object }Online Example
Topics
Anything Else We Need to Know
Environment
Vue + vue-echarts + echarts
ECharts version;ECharts 版本: { 4.x }
[ ] It happens only on certain browsers or operating systems. 对于特定浏览器或操作系统才会出现的问题,请提供相应环境信息:{BROWSER_VERSION_OR_OS_INFORMATION_HERE}