From b4627ec302584ef8b1be2dc0c5b88cf8e0c6a829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 21 Feb 2019 13:44:05 +0100 Subject: [PATCH] Minor fix/polish to gauge panel and threshold editor --- packages/grafana-ui/src/components/Gauge/Gauge.tsx | 4 ++-- .../src/components/ThresholdsEditor/ThresholdsEditor.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/grafana-ui/src/components/Gauge/Gauge.tsx b/packages/grafana-ui/src/components/Gauge/Gauge.tsx index 8dea01589f1..de09cb8e1f8 100644 --- a/packages/grafana-ui/src/components/Gauge/Gauge.tsx +++ b/packages/grafana-ui/src/components/Gauge/Gauge.tsx @@ -115,9 +115,9 @@ export class Gauge extends PureComponent { getFontScale(length: number): number { if (length > 12) { - return FONT_SCALE - (length * 5) / 120; + return FONT_SCALE - (length * 5) / 110; } - return FONT_SCALE - (length * 5) / 105; + return FONT_SCALE - (length * 5) / 100; } draw() { diff --git a/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx b/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx index b3d82982e6c..3361e1bee46 100644 --- a/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx +++ b/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx @@ -55,7 +55,7 @@ export class ThresholdsEditor extends PureComponent { const value = afterThresholdValue - (afterThresholdValue - beforeThresholdValue) / 2; // Set a color - const color = colors.filter(c => !newThresholds.some(t => t.color === c))[0]; + const color = colors.filter(c => !newThresholds.some(t => t.color === c))[1]; this.setState( {