abc45628 opened a new issue #10391: 使用dataset时,tooltip.formatter使用通配符有问题 URL: https://github.com/apache/incubator-echarts/issues/10391 ### Version 4.2.1 ### Steps to reproduce option = { tooltip: { show: true, formatter: '系列名:{a}<br>数据名:{b}<br>数据值:{c}' }, dataset: { dimensions: ['预警类型', '预警数'], source: [['预警A', 1], ['预警B', 2]] }, xAxis: [{ type: 'value', show: false }], yAxis: [{ type: 'category' }], series: [ { type: 'bar', label: { show: true, position: 'right' }, encode: { x: '预警数', y: '预警类型', value: '预警数', seriesName:'预警类型' } } ] }; ### What is expected? tooltips应该显示 系列名:预警类型 数据名:预警A 数据值:1 ### What is actually happening? 系列名:预警类型 数据名:预警A 数据值:预警A,1 --- 没有指定encode.value时,tooltips.formatter不知道用第几个字段来显示{c},那么可以显示成“预警A,1”。 但是指定encode.value后,应该{c}就显示成encode.value的指定值 <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
