From 39e45004cd47b5160c28ff88d7b9add5e3d76554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 31 Mar 2017 16:09:00 +0200 Subject: [PATCH] heatmap: inverted the color schemes --- public/app/plugins/panel/heatmap/rendering.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/heatmap/rendering.ts b/public/app/plugins/panel/heatmap/rendering.ts index 19e6dedfdd0..93112dca496 100644 --- a/public/app/plugins/panel/heatmap/rendering.ts +++ b/public/app/plugins/panel/heatmap/rendering.ts @@ -428,7 +428,7 @@ export default function link(scope, elem, attrs, ctrl) { function setColorScale(max_value) { let colorInterpolator = d3[panel.color.colorScheme]; - colorScale = d3.scaleSequential(colorInterpolator).domain([0, max_value]); + colorScale = d3.scaleSequential(colorInterpolator).domain([max_value, 0]); } function setOpacityScale(max_value) { @@ -711,7 +711,7 @@ export default function link(scope, elem, attrs, ctrl) { let legendHeight = d3.select("#heatmap-color-legend").attr("height"); let colorInterpolator = d3[panel.color.colorScheme]; - let legendColorScale = d3.scaleSequential(colorInterpolator).domain([0, legendWidth]); + let legendColorScale = d3.scaleSequential(colorInterpolator).domain([legendWidth, 0]); let rangeStep = 2; let valuesRange = d3.range(0, legendWidth, rangeStep);