From 4e4686001b6f5a7365ba3c363c115994a943cb3e Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Mon, 13 Jun 2022 22:16:49 -0700 Subject: [PATCH] Timeseries: Improve cursor Y sync behavior (#50740) --- .../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], }; }