From 83042cc4b74d5c9ef4019a37adaac7e7b7bf478c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 9 Nov 2020 21:12:22 +0100 Subject: [PATCH] GraphNG: Restore focus option (#28946) * GraphNG: Restore focus option * Update snapshot --- .../src/components/uPlot/hooks.test.ts | 24 +++++++++---------- .../grafana-ui/src/components/uPlot/hooks.ts | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/grafana-ui/src/components/uPlot/hooks.test.ts b/packages/grafana-ui/src/components/uPlot/hooks.test.ts index 4e7f529b565..757f91ebc07 100644 --- a/packages/grafana-ui/src/components/uPlot/hooks.test.ts +++ b/packages/grafana-ui/src/components/uPlot/hooks.test.ts @@ -10,7 +10,7 @@ describe('usePlotConfig', () => { "axes": Array [], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -52,7 +52,7 @@ describe('usePlotConfig', () => { "axes": Array [], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -101,7 +101,7 @@ describe('usePlotConfig', () => { "axes": Array [], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -148,7 +148,7 @@ describe('usePlotConfig', () => { "axes": Array [], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -196,7 +196,7 @@ describe('usePlotConfig', () => { ], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -246,7 +246,7 @@ describe('usePlotConfig', () => { ], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -290,7 +290,7 @@ describe('usePlotConfig', () => { "axes": Array [], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -334,7 +334,7 @@ describe('usePlotConfig', () => { "axes": Array [], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -384,7 +384,7 @@ describe('usePlotConfig', () => { "axes": Array [], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -432,7 +432,7 @@ describe('usePlotConfig', () => { "axes": Array [], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -477,7 +477,7 @@ describe('usePlotConfig', () => { "axes": Array [], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { @@ -531,7 +531,7 @@ describe('usePlotConfig', () => { "axes": Array [], "cursor": Object { "focus": Object { - "prox": -1, + "prox": 30, }, }, "focus": Object { diff --git a/packages/grafana-ui/src/components/uPlot/hooks.ts b/packages/grafana-ui/src/components/uPlot/hooks.ts index 1fbbc8ab7dc..47d10f313b4 100644 --- a/packages/grafana-ui/src/components/uPlot/hooks.ts +++ b/packages/grafana-ui/src/components/uPlot/hooks.ts @@ -88,7 +88,7 @@ export const DEFAULT_PLOT_CONFIG = { }, cursor: { focus: { - prox: -1, + prox: 30, }, }, legend: {