@carto/api-client 0.5.15-alpha.raster-3 → 0.5.15-alpha.raster-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9426,9 +9426,9 @@ function calculateLayerScale(name, scaleType, range, data) {
9426
9426
  let scaleColor = [];
9427
9427
  const { colors } = range;
9428
9428
  if (scaleType === "custom") {
9429
+ domain = calculateDomain(data, name, scaleType, colors.length);
9430
+ const [min2, max2] = domain;
9429
9431
  if (range.uiCustomScaleType === "logarithmic") {
9430
- domain = calculateDomain(data, name, scaleType, colors.length);
9431
- const [min2, max2] = domain;
9432
9432
  scaleDomain = getLog10ScaleSteps({
9433
9433
  min: min2,
9434
9434
  max: max2,
@@ -9437,8 +9437,9 @@ function calculateLayerScale(name, scaleType, range, data) {
9437
9437
  scaleColor = colors;
9438
9438
  } else if (range.colorMap) {
9439
9439
  const { colorMap } = range;
9440
+ scaleDomain = [];
9440
9441
  colorMap.forEach(([value, color2]) => {
9441
- domain.push(value);
9442
+ scaleDomain.push(Number(value));
9442
9443
  scaleColor.push(color2);
9443
9444
  });
9444
9445
  }