{"action":"opened","issue":{"url":"https://api.github.com/repos/ecomfe/echarts/issues/6878","repository_url":"https://api.github.com/repos/ecomfe/echarts","labels_url":"https://api.github.com/repos/ecomfe/echarts/issues/6878/labels{/name}","comments_url":"https://api.github.com/repos/ecomfe/echarts/issues/6878/comments","events_url":"https://api.github.com/repos/ecomfe/echarts/issues/6878/events","html_url":"https://github.com/ecomfe/echarts/issues/6878","id":267449309,"number":6878,"title":"3.6可实现的文字颜色渐变效果，3.7失效了。","user":{"login":"muhm21cn","id":16379233,"avatar_url":"https://avatars2.githubusercontent.com/u/16379233?v=4","gravatar_id":"","url":"https://api.github.com/users/muhm21cn","html_url":"https://github.com/muhm21cn","followers_url":"https://api.github.com/users/muhm21cn/followers","following_url":"https://api.github.com/users/muhm21cn/following{/other_user}","gists_url":"https://api.github.com/users/muhm21cn/gists{/gist_id}","starred_url":"https://api.github.com/users/muhm21cn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muhm21cn/subscriptions","organizations_url":"https://api.github.com/users/muhm21cn/orgs","repos_url":"https://api.github.com/users/muhm21cn/repos","events_url":"https://api.github.com/users/muhm21cn/events{/privacy}","received_events_url":"https://api.github.com/users/muhm21cn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-22T09:20:34Z","updated_at":"2017-10-22T09:20:34Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n为了方便我们能够复现和修复 bug，请遵从下面的规范描述您的问题。\r\n-->\r\n\r\n\r\n### One-line summary [问题简述]\r\n项目上一个特殊需求，需要文字能够有颜色渐变的效果。\r\n在3.6.x的版本上（具体小版本忘了，也不知道怎么查小版本号，囧），通过graphic的rect和text叠加实现了。可升级到3.7.2后文字颜色渐变效果失效了。\r\n\r\n\r\n\r\n\r\n### Version & Environment [版本及环境]\r\n+ ECharts version [ECharts 版本]: 3.7.2\r\n+ Browser version [浏览器类型和版本]: Chrome 61.0.3163.100\r\n+ OS Version [操作系统类型和版本]: Mac\r\n\r\n\r\n\r\n\r\n\r\n### Expected behaviour [期望结果]\r\n能够有办法实现3.6.x时候可以实现的文字颜色渐变效果\r\n\r\n\r\n\r\n\r\n\r\n### ECharts option [ECharts配置项]\r\n<!-- Copy and paste your 'echarts option' here. -->\r\n<!-- [下方贴你的option，注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->\r\n```javascript\r\noption = {\r\n\r\n                \"graphic\": [\r\n                    {\r\n                        \"type\": \"group\",\r\n                        \"children\": [\r\n                            {\r\n                                \"type\": \"rect\",\r\n                                \"style\": {\r\n                                    \"text\": \"\",\r\n                                    \"lineWidth\": 0,\r\n                                    \"fill\": {\r\n                                        \"x\": \"0\",\r\n                                        \"y\": \"0\",\r\n                                        \"x2\": \"1\",\r\n                                        \"y2\": \"0\",\r\n                                        \"type\": \"linear\",\r\n                                        \"global\": false,\r\n                                        \"colorStops\": [\r\n                                            {\r\n                                                \"offset\": 0,\r\n                                                \"color\": \"#db10ee\"\r\n                                            },\r\n                                            {\r\n                                                \"offset\": 1,\r\n                                                \"color\": \"#f0e90c\"\r\n                                            }\r\n                                        ]\r\n                                    }\r\n                                },\r\n                                \"left\": 100,\r\n                                \"top\": 100,\r\n                                \"shape\": {\r\n                                    \"height\": 0,\r\n                                    \"width\": \"250\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"type\": \"text\",\r\n                                \"style\": {\r\n                                    \"font\": \"italic bold 50px Helvetica\",\r\n                                    \"text\": \"渐变色文字\",\r\n                                    \"fill\": {\r\n                                        \"x\": \"0\",\r\n                                        \"y\": \"0\",\r\n                                        \"x2\": \"1\",\r\n                                        \"y2\": \"0\",\r\n                                        \"type\": \"linear\",\r\n                                        \"global\": false,\r\n                                        \"colorStops\": [\r\n                                            {\r\n                                                \"offset\": 0,\r\n                                                \"color\": \"#db10ee\"\r\n                                            },\r\n                                            {\r\n                                                \"offset\": 1,\r\n                                                \"color\": \"#f0e90c\"\r\n                                            }\r\n                                        ]\r\n                                    }\r\n                                },\r\n                                \"left\": 100,\r\n                                \"top\": 100,\r\n                            }\r\n                        ],\r\n                        // \"width\": 0,\r\n                        // \"height\": 0\r\n                    }\r\n                ]\r\n\r\n}\r\n\r\n```\r\n\r\n\r\n\r\n\r\n### Other comments [其他信息]\r\n<!-- For example: Screenshot or Online demo -->\r\n<!-- [例如，截图或线上实例 (JSFiddle/JSBin/Codepen)] -->\r\n如上的代码在3.6.x版本上能够实现如下图的文字颜色渐变效果\r\n![image](https://user-images.githubusercontent.com/16379233/31860472-2f05ff32-b6e0-11e7-8b52-2003bf86de63.png)\r\n\r\n\r\n"}}
{"actor":{"display_login":"muhm21cn"}}