cluyet opened a new issue #16696:
URL: https://github.com/apache/echarts/issues/16696
### What problem does this feature solve?
When using a custom formatter for the tooltip, the 'params' contains
information about the series, the data, but there is no information about which
dataset is used for the tooltip.
In my case I have multiple datasets, and when I display the tooltip I would
like to show information about the current dataset.
Is it possible to add this information in the 'params' received in the
callback function?
### What does the proposed API look like?
The 'params' would look like this:
`[
{
"componentType": "series",
"componentSubType": "line",
"componentIndex": 1,
"seriesType": "line",
"seriesIndex": 1,
**"datasetIndex": 1, // <---- NEW INFORMATION**
"seriesId": "\u0000Temperature (°C)\u00001",
"seriesName": "Temperature (°C)",
"name": "",
"dataIndex": 12,
"data": [
1647346171000,
25.56,
26.91,
483.52
],
"value": [
1647346171000,
25.56,
26.91,
483.52
],
"color": "#5470c6",
"dimensionNames": [
"x",
"y",
"value",
"value0"
],
"encode": {
"x": [
0
],
"y": [
1
]
},
"$vars": [
"seriesName",
"name",
"value"
],
"axisDim": "x",
"axisIndex": 0,
"axisType": "xAxis.time",
"axisId": "\u0000series\u00000\u00000",
"axisValue": 1647346171000,
"axisValueLabel": "2022-03-15 13:09:31",
"marker": "<span
style=\"display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#5470c6;\"></span>"
}
]`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]