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

【BUG】JS触发饼图的pieUnSelect,pieSelect无效 #4242

Closed
evilbdef opened this issue Oct 13, 2016 · 14 comments
Closed

【BUG】JS触发饼图的pieUnSelect,pieSelect无效 #4242

evilbdef opened this issue Oct 13, 2016 · 14 comments
Labels

Comments

@evilbdef
Copy link

evilbdef commented Oct 13, 2016

问题简述 (One-line summary)

通过dispatchAction方式触发饼图选中、取消选中指定的扇形,完全没有发应,
myChart.dispatchAction({
type: 'pieUnSelect'
});
myChart..dispatchAction({
type: 'pieSelect',
dataIndex : 0,
//dataIndex : [0]
});

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): 3.2.3
  • 浏览器类型和版本 (Browser version):chrome 51
  • 操作系统类型和版本 (OS Version): win10

重现步骤 (Steps to reproduce)

1.请看简述

期望结果 (Expected behaviour)

可以选中指定扇形

可能哪里有问题 (What went wrong)

ECharts配置项 (ECharts option)

option = {

}

其他信息 (Other comments)

@evilbdef evilbdef changed the title JS触发饼图的pieUnSelect,pieSelect无效 【BUG】JS触发饼图的pieUnSelect,pieSelect无效 Oct 13, 2016
@pissang pissang added bug pending We are not sure about whether this is a bug/new feature. and removed bug pending We are not sure about whether this is a bug/new feature. labels Oct 13, 2016
@evilbdef
Copy link
Author

evilbdef commented Oct 14, 2016

什么时候能发下个版本修复一下呢?大大

@100pah
Copy link
Member

100pah commented Oct 15, 2016

暂时可先用 name 来索引,会有效果:

chart.dispatchAction({type: 'pieSelect', name: 'xxx'});

@hyy1115
Copy link

hyy1115 commented Jan 5, 2017

我也遇到这种不能触发的情况,似乎这是一个无效的配置。

@Ovilia Ovilia self-assigned this Mar 17, 2017
@runfan
Copy link

runfan commented Mar 30, 2017

 series: [
            {
                // name: '访问来源',
                type: 'pie',
                selectedMode:'single',//这个很重要,如果不设置,定义要选中关闭,会导致pieselectedchange事件无效
        }
]

其实这个不BUG,而是文档没有说明清楚
这个问题同样出现在其他的图表中

@gbyuxia
Copy link

gbyuxia commented Jul 13, 2017

selectedMode:'single', 和name都分别试过,并没有起作用

@rancui
Copy link

rancui commented Jul 13, 2017

问题简述 (One-line summary)

通过dispatchAction方式触发饼图选中、取消选中指定的扇形,完全没有发应,

myChart..dispatchAction({
type: 'pieselected',
seriesName:'累积客户签约量',
dataIndex : 0,

});

版本及环境 (Version & Environment)

ECharts 版本 (ECharts version): 3.6.1
浏览器类型和版本 (Browser version):chrome 55.0.2883.87
操作系统类型和版本 (OS Version): win7
重现步骤 (Steps to reproduce)

1.请看简述

期望结果 (Expected behaviour)

可以选中指定扇形

@eaminhu
Copy link

eaminhu commented Jul 14, 2017

遇到同样的问题,上面几个同学有没有解决呀?

@Ovilia
Copy link
Contributor

Ovilia commented Jul 17, 2017

@eaminhu@runfan 的解决方案

@mengxy
Copy link

mengxy commented Aug 9, 2017

正好处理这个问题看到这个issue,把测试好的 demo 分享给大家。
问题就是文档不准确,name 可用,dataIndex 不可用。

myChart.dispatchAction({
  type: 'pieSelect',
  seriesIndex: 0,
  name: option.series[0].data[0].name,
});

https://gist.github.com/mengxy/3b6027030fe2d0eefd808a91497346ef

@rancui
Copy link

rancui commented Aug 9, 2017

你好,链接打不开,请问示例中的app指的是啥?

@mengxy
Copy link

mengxy commented Aug 9, 2017

@rancui 修改了一下,就是 data 的 index

gist 可能需要翻墙才能打开

@Ovilia
Copy link
Contributor

Ovilia commented Aug 10, 2017

Bug 已修复:3461395

从下一个版本起,可以使用 dataIndexname 来索引,如果两个同时设置,name 将被忽略。

@Ovilia Ovilia closed this as completed Aug 10, 2017
@rancui
Copy link

rancui commented Aug 10, 2017

你好,请问下个版本啥时候发布呀?

@Ovilia
Copy link
Contributor

Ovilia commented Aug 10, 2017

@runfan 下周发布

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

No branches or pull requests

10 participants