From 08211eb2209aa4e6fb09ecbb74730556e99561ba Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Mon, 15 Jan 2018 12:43:09 +0100 Subject: [PATCH] added a variable for grid color and if statment to switch colors, fixes #10509 (#10517) --- public/app/plugins/panel/graph/graph.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/graph/graph.ts b/public/app/plugins/panel/graph/graph.ts index a4ddeec7777..91ca17c52f6 100755 --- a/public/app/plugins/panel/graph/graph.ts +++ b/public/app/plugins/panel/graph/graph.ts @@ -18,6 +18,7 @@ import GraphTooltip from './graph_tooltip'; import { ThresholdManager } from './threshold_manager'; import { EventManager } from 'app/features/annotations/all'; import { convertValuesToHistogram, getSeriesValues } from './histogram'; +import config from 'app/core/config'; /** @ngInject **/ function graphDirective(timeSrv, popoverSrv, contextSrv) { @@ -286,6 +287,10 @@ function graphDirective(timeSrv, popoverSrv, contextSrv) { } function buildFlotOptions(panel) { + let gridColor = '#c8c8c8'; + if (config.bootData.user.lightTheme === true) { + gridColor = '#a1a1a1'; + } const stack = panel.stack ? true : null; let options = { hooks: { @@ -332,7 +337,7 @@ function graphDirective(timeSrv, popoverSrv, contextSrv) { borderWidth: 0, hoverable: true, clickable: true, - color: '#c8c8c8', + color: gridColor, margin: { left: 0, right: 0 }, labelMarginX: 0, },