Skip to content

Commit

Permalink
fix: scale options rangeMax and rangeMax (#6125)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvisei authored Mar 14, 2024
1 parent 8444a63 commit f11e9f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/scale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,13 @@ function inferScaleRange(
case 'sqrt': {
const colors = categoricalColors(values, options, domain, theme, library);
const [r0, r1] = inferRangeQ(name, colors);
return [rangeMin || r0, rangeMax || r1];
return [rangeMin ?? r0, rangeMax ?? r1];
}
case 'band':
case 'point': {
const min = name === 'size' ? 5 : 0;
const max = name === 'size' ? 10 : 1;
return [rangeMin || min, rangeMax || max];
return [rangeMin ?? min, rangeMax ?? max];
}
case 'ordinal': {
return categoricalColors(values, options, domain, theme, library);
Expand Down

0 comments on commit f11e9f9

Please sign in to comment.