Skip to content

Commit 749811c

Browse files
authored
Merge pull request #39 from stormpython/bug/#37
Support negative numbers.
2 parents f13859c + 19d2a02 commit 749811c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

public/vis/components/visualization/heatmap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function heatmap() {
5959
var colDomain = getDomain(metrics, colValue);
6060
var rowDomain = getDomain(metrics, rowValue);
6161
var colorRange = colorbrewer[colors][numberOfColors];
62-
var colorDomain = [0, Math.max(d3.max(metrics, metric), 1)];
62+
var colorDomain = [Math.min(0, d3.min(metrics, metric)), Math.max(d3.max(metrics, metric), 1)];
6363
var columnScale = d3.scale.ordinal()
6464
.domain(colDomain)
6565
.rangeBands([0, adjustedWidth], padding);

0 commit comments

Comments
 (0)