You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Montinew (via GitHub)" <gi...@apache.org> on 2025/12/12 21:30:21 UTC
Re: [I] Display the nearest data of different series in one tooltip. [echarts]
Montinew commented on issue #15488:
URL: https://github.com/apache/echarts/issues/15488#issuecomment-3648204171
I found a practical workaround that works reliably for me.
**Problem:**
With asynchronous time series (timestamps differ slightly), tooltip aggregation fails because exact x-value alignment is required.
**Workaround:**
Bind each series to its own `time` xAxis and enable `tooltip.smartFormatter`.
smartFormatter allows the tooltip to display a single, consolidated timestamp instead of showing a separate timestamp per series.
Additional xAxes can be hidden.
```
{
"tooltip": { "smartFormatter": true },
"xAxis": [
{ "type": "time" },
{ "type": "time", "show": false },
{ "type": "time", "show": false }
],
"yAxis": { "type": "value" },
"series": [
{ "name": "Series 1", "type": "line", "xAxisIndex": 0, "data": [[t1, v1]] },
{ "name": "Series 2", "type": "line", "xAxisIndex": 1, "data": [[t2, v2]] },
{ "name": "Series 3", "type": "line", "xAxisIndex": 2, "data": [[t3, v3]] }
]
}
```
<img width="1462" height="662" alt="Image" src="https://github.com/user-attachments/assets/6400009a-75ec-4515-9751-4c3ffff35b8e" />
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org