mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-24 22:54:33 +08:00
fix: offset added hinders the timestamps for the traces (#4642)
* fix: offset added hinders the timestamps for the traces * fix: offset added hinders the timestamps for the traces
This commit is contained in:
parent
90d7f0200a
commit
fdd7e022e9
@ -18,8 +18,9 @@ function onClickPlugin(opts: OnClickPluginOpts): uPlot.Plugin {
|
||||
const mouseY = event.offsetY + 40;
|
||||
|
||||
// Convert pixel positions to data values
|
||||
const xValue = u.posToVal(mouseX, 'x');
|
||||
const yValue = u.posToVal(mouseY, 'y');
|
||||
// do not use mouseX and mouseY here as it offsets the timestamp as well
|
||||
const xValue = u.posToVal(event.offsetX, 'x');
|
||||
const yValue = u.posToVal(event.offsetY, 'y');
|
||||
|
||||
opts.onClick(xValue, yValue, mouseX, mouseY);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user