{"action":"created","issue":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/2593","repository_url":"https://api.github.com/repos/ecomfe/echarts","labels_url":"https://api.github.com/repos/ecomfe/echarts/issues/2593/labels{/name}","comments_url":"https://api.github.com/repos/ecomfe/echarts/issues/2593/comments","events_url":"https://api.github.com/repos/ecomfe/echarts/issues/2593/events","html_url":"https://github.com/ecomfe/echarts/issues/2593","id":134180334,"number":2593,"title":"设置toolbox->feature->dataZoom  互换xy轴会报错！","user":{"login":"zhump","id":7962067,"avatar_url":"https://avatars.githubusercontent.com/u/7962067?v=3","gravatar_id":"","url":"https://api.github.com/users/zhump","html_url":"https://github.com/zhump","followers_url":"https://api.github.com/users/zhump/followers","following_url":"https://api.github.com/users/zhump/following{/other_user}","gists_url":"https://api.github.com/users/zhump/gists{/gist_id}","starred_url":"https://api.github.com/users/zhump/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhump/subscriptions","organizations_url":"https://api.github.com/users/zhump/orgs","repos_url":"https://api.github.com/users/zhump/repos","events_url":"https://api.github.com/users/zhump/events{/privacy}","received_events_url":"https://api.github.com/users/zhump/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-17T05:11:03Z","updated_at":"2016-02-19T09:02:12Z","closed_at":null,"body":"重现环境：\r\n1.柱图\r\n2.设置option->\r\n```\r\n\"toolbox\": {\r\n    \"feature\": {\r\n\t\"dataZoom\": {}\r\n     }\r\n}\r\n```\r\n3.我需要将x轴和y轴对调，展示图形，当然也可还原回来。\r\n```\r\nfunction yx(){\r\n    var option = chart.getOption();\r\n\tvar temp = option.xAxis;\r\n\toption.xAxis =  option.yAxis;\r\n\toption.yAxis = temp;\r\n\tchart.setOption(option);\r\n}\r\n```\r\n然后按钮触发这个yx事件，xy轴成功调换，如果再次触发就会抛出如下异常:\r\n\r\n```\r\n Uncaught Error: id duplicates:  _ec_toolbox-dataZoom_xAxis0\tVM9574 echarts.js?bust=v1.0:3872\r\n(anonymous function)\t@\tVM9574 echarts.js?bust=v1.0:3872\r\n(anonymous function)\t@\tVM9574 echarts.js?bust=v1.0:3835\r\neach\t@\tVM9574 echarts.js?bust=v1.0:403\r\neachOpt\t@\tVM9574 echarts.js?bust=v1.0:3828\r\nmakeKeyInfo\t@\tVM9574 echarts.js?bust=v1.0:3851\r\nhandleNew\t@\tVM9574 echarts.js?bust=v1.0:3307\r\nvisitComponent\t@\tVM9574 echarts.js?bust=v1.0:3277\r\nentity.topologicalTravel\t@\tVM9574 echarts.js?bust=v1.0:2093\r\nModel.extend.mergeOption\t@\tVM9574 echarts.js?bust=v1.0:3269\r\nModel.extend.resetOption\t@\tVM9574 echarts.js?bust=v1.0:3218\r\nModel.extend.setOption\t@\tVM9574 echarts.js?bust=v1.0:3196\r\nechartsProto.setOption\t@\tVM9574 echarts.js?bust=v1.0:16238\r\n```\r\n\r\n\r\n\r\n但是如果不设置toolbox->feature->dataZoom ,yx轴可以随意调换。\r\n\r\n不知道是我使用用问题，还是echart的bug，望回复。。"},"comment":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/comments/186122610","html_url":"https://github.com/ecomfe/echarts/issues/2593#issuecomment-186122610","issue_url":"https://api.github.com/repos/ecomfe/echarts/issues/2593","id":186122610,"user":{"login":"SuperZDev","id":7768611,"avatar_url":"https://avatars.githubusercontent.com/u/7768611?v=3","gravatar_id":"","url":"https://api.github.com/users/SuperZDev","html_url":"https://github.com/SuperZDev","followers_url":"https://api.github.com/users/SuperZDev/followers","following_url":"https://api.github.com/users/SuperZDev/following{/other_user}","gists_url":"https://api.github.com/users/SuperZDev/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperZDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperZDev/subscriptions","organizations_url":"https://api.github.com/users/SuperZDev/orgs","repos_url":"https://api.github.com/users/SuperZDev/repos","events_url":"https://api.github.com/users/SuperZDev/events{/privacy}","received_events_url":"https://api.github.com/users/SuperZDev/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T09:02:12Z","updated_at":"2016-02-19T09:02:12Z","body":"~@~ toolbox reset的bug我看已经被 @100pah 修复了。\r\n你这个问题估计他们还没有确认，毕竟事情太多了。"}}