deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

colorScaleType `linear` doesn't work properly on HexagonLayer

Open MarshallChen opened this issue 3 years ago • 1 comments

Description

image

I figure it out thats due to linearScale function in this case will return NaN. https://github.com/visgl/deck.gl/blob/master/modules/aggregation-layers/src/utils/scale-utils.js#L146

// Linear scale maps continuous domain to continuous range
export function linearScale(domain, range, value) {
  return ((value - domain[0]) / (domain[1] - domain[0])) * (range[1] - range[0]) + range[0];
}

MarshallChen avatar Oct 15 '21 04:10 MarshallChen

linear should only be used in height, the aggregation layer only support quantile or quantize for colorScaleType

heshan0131 avatar Oct 27 '21 23:10 heshan0131