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

ECharts3.1.7Treemap鼠标点击事件问题 #3063

Closed
wqk271561787 opened this Issue Apr 25, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@wqk271561787

wqk271561787 commented Apr 25, 2016

问题简述 (One-line summary)

创建Treemap,绑定任意鼠标点击事件click、dblclick,鼠标点击节点,通过function中的参数params取得params.data,取到的data并不是所点击节点的data,而是下一个index的data,例:点击index0的节点,取到的是index1的节点的data

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version):3.1.7
  • 浏览器类型和版本 (Browser version):Firefox45.0.2
  • 操作系统类型和版本 (OS Version):win7 64

重现步骤 (Steps to reproduce)

期望结果 (Expected behaviour)

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

ECharts配置项 (ECharts option)

option = {
toolbox: {
            itemSize : 40,
            show : true,
             feature : {
                saveAsImage : {
                }
            } 
        },
        series: [{
             name:'treemap',
             type:'treemap',
             label: {
                 show: true,
                 formatter: '{b}' 
             },
             itemStyle: {
                 normal: {
                     borderColor: '#fff',
                     gapWidth: 1
                 }
             },
             nodeClick:'zoomToNode',
             data: [
                    {value:20,name:'树1'},
                    {value:19,name:'树2'},
                    {value:18,name:'树3'},
                    {value:17,name:'树4'},
                    {value:16,name:'树5'},
                    {value:15,name:'树6'},
                    {value:14,name:'树7'},
                    {value:13,name:'树8'},
                    {value:12,name:'树9'},
                    {value:11,name:'树10'},
                    {value:10,name:'树11'},
                    {value:9,name:'树12'},
                    {value:8,name:'树13'},
                    {value:7,name:'树14'},
                    {value:6,name:'树15'},
                    {value:5,name:'树16'},
                    {value:4,name:'树17'},
                    {value:3,name:'树18'},
                    {value:2,name:'树19'},
                    {value:2,name:'树20'}
                ]
         }]
}

其他信息 (Other comments)

@100pah 100pah closed this in 10e31b9 Apr 26, 2016

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