overrei opened a new issue #8826: 如何让折线图渐变色的效果中,线条渐变色按照指定的维度值变化? URL: https://github.com/apache/incubator-echarts/issues/8826 <!-- 为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。 --> ### One-line summary [问题简述] 折线图使用visualMap可以实现渐变色效果。但是我的需求是渐变色是按照指定维度值进行改变的,和直线本身的值的维度无关。这种业务我配置出来后,发现折线的点可以按照指定维度进行颜色渐变,但是折线本身并没有进行变化。请问应该怎么配置? ### Version & Environment [版本及环境] + ECharts version [ECharts 版本]: 4.1.0 + Browser version [浏览器类型和版本]:chrome 68.0.3440.84 + OS Version [操作系统类型和版本]: win7 ### Expected behaviour [期望结果] 折线本身也可以按照指定的维度值进行颜色渐变。 相当于折线的走向和折线的颜色是无关的,可以体现两个维度的值变化 ### ECharts option [ECharts配置项] <!-- Copy and paste your 'echarts option' here. --> <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] --> ```javascript option = { "xAxis": [{ "type": "category", "data": ["2014年10月30日", "2015年12月18日", "2015年12月21日", "2016年1月26日", "2016年2月24日", "2016年3月02日", "2016年3月04日", "2016年3月07日", "2016年3月15日", "2016年3月17日", "2016年3月30日"] }], "yAxis": [{ "type": "value", }], "tooltip": { "trigger": "axis", formatter:'{b0}<br />numZH: {c0}' }, "series": [{ "name": "numZH", "type": "line", "encode": { "x": 1, y:0 }, "symbolSize": 10, lineStyle:{ color:"#ddd" } }], "visualMap": { "show": false, "min": 7.7, "max": 760.2, "calculable": true, "inRange": { "color": ["rgb(215, 218, 245)", "rgb(17,40,248)"] }, "type": "continuous", "dimension": 2 }, "dataset": { "source": [ ["", "", ""], ["111", "2014年10月30日", "222.0"], ["711", "2015年12月18日", "160.2"], ["200", "2015年12月21日", "500"], ["306", "2016年1月26日", "700"], ["200", "2016年2月24日", "500"], ["200", "2016年3月02日", "120"], ["6", "2016年3月04日", "707"], ["700", "2016年3月07日", "200"], ["605", "2016年3月15日", "180"], ["326", "2016年3月17日", "210"], ["150", "2016年3月30日", "360"] ] } } ``` ### Other comments [其他信息] <!-- For example: Screenshot or Online demo --> <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
