ThinkontrolSY opened a new issue #10914: 热力图encode中指定seriesName,并没有读取维度数据 URL: https://github.com/apache/incubator-echarts/issues/10914 ### Version 4.2.1 ### Steps to reproduce 在type为heatmap的series中,数据从dataset来, dataset中dimension设置为:['name', 'x', 'y', 'value'] encode字段中指定seriesName的维度为'name', series中tooltip.formatter: (params) => {params.seriesName} 设置如下: ···typescript dataset: [ { source: [], dimensions: ['lineId', 'resourceId', 'priority', 'amount', 'x', 'y'], } ], series: [ { type: 'heatmap', encode: { x: 'x', y: 'y', itemName: 'lineId', seriesName: 'lineId', value: ['amount', 'priority'], itemId: 'resourceId', tooltip: ['amount', 'priority'], }, tooltip: { formatter: ({ data, seriesName }) => { console.log(seriesName); return `${data.lineId}<br/>${data.resourceId}<br/>优先级: ${ data.priority }<br/>利用次数: ${data.amount}`; }, }, },] ``` ### What is expected? console.log应该输出data的name字段的值 ### What is actually happening? console.log实际输出了字符串'name' <!-- 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]
