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

Comments

Projects
None yet
10 participants
@evilbdef

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 from JS触发饼图的pieUnSelect,pieSelect无效 to 【BUG】JS触发饼图的pieUnSelect,pieSelect无效 Oct 13, 2016

@pissang pissang added bug pending and removed bug pending labels Oct 13, 2016

@evilbdef

This comment has been minimized.

Show comment
Hide comment
@evilbdef

evilbdef Oct 14, 2016

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

evilbdef commented Oct 14, 2016

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

@100pah

This comment has been minimized.

Show comment
Hide comment
@100pah

100pah Oct 15, 2016

Member

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

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

100pah commented Oct 15, 2016

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

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

This comment has been minimized.

Show comment
Hide comment
@hyy1115

hyy1115 Jan 5, 2017

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

hyy1115 commented Jan 5, 2017

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

@Ovilia Ovilia self-assigned this Mar 17, 2017

@runfan

This comment has been minimized.

Show comment
Hide comment
@runfan

runfan Mar 30, 2017

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

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

runfan commented Mar 30, 2017

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

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

@gbyuxia

This comment has been minimized.

Show comment
Hide comment
@gbyuxia

gbyuxia Jul 13, 2017

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

gbyuxia commented Jul 13, 2017

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

@rancui

This comment has been minimized.

Show comment
Hide comment
@rancui

rancui 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)

可以选中指定扇形

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

This comment has been minimized.

Show comment
Hide comment
@eaminhu

eaminhu Jul 14, 2017

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

eaminhu commented Jul 14, 2017

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

@Ovilia

This comment has been minimized.

Show comment
Hide comment
@Ovilia

Ovilia Jul 17, 2017

Contributor

@eaminhu@runfan 的解决方案

Contributor

Ovilia commented Jul 17, 2017

@eaminhu@runfan 的解决方案

@mengxy

This comment has been minimized.

Show comment
Hide comment
@mengxy

mengxy 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

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

This comment has been minimized.

Show comment
Hide comment
@rancui

rancui Aug 9, 2017

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

rancui commented Aug 9, 2017

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

@mengxy

This comment has been minimized.

Show comment
Hide comment
@mengxy

mengxy Aug 9, 2017

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

gist 可能需要翻墙才能打开

mengxy commented Aug 9, 2017

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

gist 可能需要翻墙才能打开

@Ovilia

This comment has been minimized.

Show comment
Hide comment
@Ovilia

Ovilia Aug 10, 2017

Contributor

Bug 已修复:3461395

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

Contributor

Ovilia commented Aug 10, 2017

Bug 已修复:3461395

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

@Ovilia Ovilia closed this Aug 10, 2017

@rancui

This comment has been minimized.

Show comment
Hide comment
@rancui

rancui Aug 10, 2017

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

rancui commented Aug 10, 2017

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

@Ovilia

This comment has been minimized.

Show comment
Hide comment
@Ovilia

Ovilia Aug 10, 2017

Contributor

@runfan 下周发布

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