Improve colour range of countries map

This commit is contained in:
Uku Taht 2020-10-19 13:46:08 +03:00
parent 1d0300a03a
commit 63a236508d

View File

@ -36,11 +36,10 @@ class Countries extends React.Component {
var dataset = {};
var onlyValues = this.state.countries.map(function(obj){ return obj.count });
var minValue = Math.min.apply(null, onlyValues),
maxValue = Math.max.apply(null, onlyValues);
var maxValue = Math.max.apply(null, onlyValues);
var paletteScale = d3.scale.linear()
.domain([minValue,maxValue])
.domain([0,maxValue])
.range(["#f3ebff","#a779e9"]);
this.state.countries.forEach(function(item){