Engine-C commented on issue #10145: bmap下data数据绑定value值失效 URL: https://github.com/apache/incubator-echarts/issues/10145#issuecomment-524208781 ..自问自答吧。(echart的配置项也太多了) 官方例子那边的tooltip的确有问题。 要修改的话,需要自己去定义[tooltip](https://echarts.baidu.com/option.html#series-scatter.tooltip.formatter). map类的tooltip,看文档是只支持{a}{b}{c} c是混合数据,也就是formatter没法用字符串模板去写.官方还提供了了一个回调函数的方法,可以解决这个问题。有点神奇的是这个函数支持返回一个string类型的html模板(并不是jsx),如果有心的话可以玩出花来。 ``` tooltip: { formatter: function (params) { return `<div style='color:#00FFFF'> ${params.data.name}: ${params.data.value[2]} <div>` } } ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org For additional commands, e-mail: dev-h...@echarts.apache.org