Closed avancinirodrigo closed 3 years ago
This code can be useful
let scale = d3.scaleLinear()
.domain(this.colorDomain)
.range(this.colorRange);
let domain = scale.domain();
let domainSize = scale.domain().length;
let tickStep = (domain[domainSize-1] - scale.domain()[0]) / (this._numberOfTicks - 1);
let ticks = d3.range(scale.domain()[0], scale.domain()[domainSize-1] + tickStep, tickStep);
console.log(ticks);
console.log(scale.domain());
let legend = scale;
Currently, the number of thicks change depending on the min and max values.