From 1479a46997c44bbb155b166b1827cd1b10be346b Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Tue, 14 Jun 2022 01:45:15 -0400 Subject: [PATCH] Timeseries: Improve cursor Y sync behavior (#50740) (#50741) (cherry picked from commit 4e4686001b6f5a7365ba3c363c115994a943cb3e) Co-authored-by: Ryan McKinley --- .../src/components/GraphNG/__snapshots__/utils.test.ts.snap | 6 +----- packages/grafana-ui/src/components/TimeSeries/utils.ts | 6 ++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/grafana-ui/src/components/GraphNG/__snapshots__/utils.test.ts.snap b/packages/grafana-ui/src/components/GraphNG/__snapshots__/utils.test.ts.snap index f4e0f8d1bd2..bb9819144ef 100644 --- a/packages/grafana-ui/src/components/GraphNG/__snapshots__/utils.test.ts.snap +++ b/packages/grafana-ui/src/components/GraphNG/__snapshots__/utils.test.ts.snap @@ -77,13 +77,9 @@ Object { "pub": [Function], }, "key": "__global_", - "match": Array [ - [Function], - [Function], - ], "scales": Array [ "x", - null, + "__fixed/na-na/na-na/auto/linear/na", ], }, }, diff --git a/packages/grafana-ui/src/components/TimeSeries/utils.ts b/packages/grafana-ui/src/components/TimeSeries/utils.ts index 8f95e21518d..78e2c1be97d 100644 --- a/packages/grafana-ui/src/components/TimeSeries/utils.ts +++ b/packages/grafana-ui/src/components/TimeSeries/utils.ts @@ -465,10 +465,8 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{ return true; }, }, - // ??? setSeries: syncMode === DashboardCursorSync.Tooltip, - //TODO: remove any once https://github.com/leeoniya/uPlot/pull/611 got merged or the typing is fixed - scales: [xScaleKey, null as any], - match: [() => true, () => true], + scales: [xScaleKey, yScaleKey], + // match: [() => true, (a, b) => a === b], }; }