mirror of
https://github.com/plausible/analytics.git
synced 2024-11-26 23:27:54 +03:00
Improve colour range of countries map
This commit is contained in:
parent
1d0300a03a
commit
63a236508d
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user