TimeSeries: Fix shared cursor (#39738) (#39760)

(cherry picked from commit 4682cf5b7c)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2021-09-29 10:58:14 +02:00
committed by GitHub
co-authored by Zoltán Bedi
parent f793c0d2fc
commit 805cbba81d
@@ -72,7 +72,7 @@ export interface GraphNGState {
}
/**
* "Time as X" core component, expectes ascending x
* "Time as X" core component, expects ascending x
*/
export class GraphNG extends React.Component<GraphNGProps, GraphNGState> {
static contextType = PanelContextRoot;
@@ -138,7 +138,7 @@ export class GraphNG extends React.Component<GraphNGProps, GraphNGState> {
const u = this.plotInstance.current;
if (u) {
// Try finding left position on time axis
const left = u.valToPos(evt.payload.point.time, 'time');
const left = u.valToPos(evt.payload.point.time, 'x');
let top;
if (left) {
// find midpoint between points at current idx