liyuanqiu opened a new issue #9160: series.scatter.label.formatter 里面如何根据value的值来决定显示什么颜色? URL: https://github.com/apache/incubator-echarts/issues/9160 <!-- 为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。 --> ### One-line summary [问题简述] 经过研究以及搜索,series.scatter.label.formatter 似乎无法根据params.value的取值来决定显示什么颜色。 ### Version & Environment [版本及环境] + ECharts version [ECharts 版本]: latest + Browser version [浏览器类型和版本]: chrome 69 + OS Version [操作系统类型和版本]: macOS ### Expected behaviour [期望结果] 1. 是否可以给出解决方法,或是workaround,来达到效果 2. 如果目前无解,serials.scatter.label.color 是否可以支持传入function(params) {} ### ECharts option [ECharts配置项] <!-- Copy and paste your 'echarts option' here. --> <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] --> ```javascript option = { xAxis: {}, yAxis: {}, series: [{ symbolSize: 20, data: [ [10.0, 8.04], [8.0, 6.95], [13.0, 7.58], [9.0, 8.81], [11.0, 8.33], [14.0, 9.96], [6.0, 7.24], [4.0, 4.26], [12.0, 10.84], [7.0, 4.82], [5.0, 5.68] ], type: 'scatter', label: { show: true, position: 'top', formatter(params) { // TODO 此处无法根据value来决定显示什么颜色 return params.value[1]; }, // TODO 此处是否增加支持传入 function(params) color: 'black', } }] }; ``` ### Other comments [其他信息] <!-- For example: Screenshot or Online demo --> <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] --> http://jsfiddle.net/5oqfbgz6/
---------------------------------------------------------------- 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]
