{"action":"created","issue":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/3450","repository_url":"https://api.github.com/repos/ecomfe/echarts","labels_url":"https://api.github.com/repos/ecomfe/echarts/issues/3450/labels{/name}","comments_url":"https://api.github.com/repos/ecomfe/echarts/issues/3450/comments","events_url":"https://api.github.com/repos/ecomfe/echarts/issues/3450/events","html_url":"https://github.com/ecomfe/echarts/issues/3450","id":160828309,"number":3450,"title":"echarts lines effect loop报错(急)","user":{"login":"oneroundseven","id":1825295,"avatar_url":"https://avatars.githubusercontent.com/u/1825295?v=3","gravatar_id":"","url":"https://api.github.com/users/oneroundseven","html_url":"https://github.com/oneroundseven","followers_url":"https://api.github.com/users/oneroundseven/followers","following_url":"https://api.github.com/users/oneroundseven/following{/other_user}","gists_url":"https://api.github.com/users/oneroundseven/gists{/gist_id}","starred_url":"https://api.github.com/users/oneroundseven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oneroundseven/subscriptions","organizations_url":"https://api.github.com/users/oneroundseven/orgs","repos_url":"https://api.github.com/users/oneroundseven/repos","events_url":"https://api.github.com/users/oneroundseven/events{/privacy}","received_events_url":"https://api.github.com/users/oneroundseven/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-17T07:30:17Z","updated_at":"2016-06-17T08:06:28Z","closed_at":null,"body":"<!--\r\n为了方便我们能够复现和修复 bug，请遵从下面的规范描述您的问题。\r\n-->\r\n#### 问题简述 (One-line summary)\r\n1、使用未公示的配置loop \r\n````javascript\r\n                effect : {\r\n                    symbol: 'arrow',\r\n                    symbolSize: 2,\r\n                    show: true,\r\n                    period: 2,\r\n                    loop: false,\r\n                    callback: null,\r\n                    trailLength: 0.1\r\n                }\r\n````\r\n2、第一次往data里面添加数据是没有问题的，但是清空完数据，再次添加数据的时候，会报错\r\n````javascript\r\n        symbol.setStyle('shadowColor', color);\r\n````\r\n这里直接报symbol为undefined 初步猜测是因为使用了loop的原因\r\n因为loop:false后会在动画结束后移除symbol对象\r\n````javascript\r\n                animator.done(function () {\r\n                    self.remove(symbol);\r\n                });\r\n````\r\n\r\n还发现有另外一个问题，就是 animator.done的回调不是每次都调用，当数据清空后，再次添加数据的时候，第一次会不走回调；\r\n\r\n求解决办法\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/comments/226707086","html_url":"https://github.com/ecomfe/echarts/issues/3450#issuecomment-226707086","issue_url":"https://api.github.com/repos/ecomfe/echarts/issues/3450","id":226707086,"user":{"login":"oneroundseven","id":1825295,"avatar_url":"https://avatars.githubusercontent.com/u/1825295?v=3","gravatar_id":"","url":"https://api.github.com/users/oneroundseven","html_url":"https://github.com/oneroundseven","followers_url":"https://api.github.com/users/oneroundseven/followers","following_url":"https://api.github.com/users/oneroundseven/following{/other_user}","gists_url":"https://api.github.com/users/oneroundseven/gists{/gist_id}","starred_url":"https://api.github.com/users/oneroundseven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oneroundseven/subscriptions","organizations_url":"https://api.github.com/users/oneroundseven/orgs","repos_url":"https://api.github.com/users/oneroundseven/repos","events_url":"https://api.github.com/users/oneroundseven/events{/privacy}","received_events_url":"https://api.github.com/users/oneroundseven/received_events","type":"User","site_admin":false},"created_at":"2016-06-17T08:06:28Z","updated_at":"2016-06-17T08:06:28Z","body":"找到部分问题所在；\r\n当lines的data默认有一条数据，然后通过setOption动态添加会导致animator.done异常；\r\n结果只执行一次回调，有一次会被忽略；"}}
{"actor":{"display_login":"oneroundseven"}}