Skip to content

Commit

Permalink
fix: clamp brushing min of last bucket (#2227)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme authored Nov 3, 2023
1 parent 10cd53b commit 155c22d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function getXBrushExtent(
const [domainStart, domainEnd] = xScale.domain;
const maxDomainValue = domainEnd + (histogramEnabled && allowBrushingLastHistogramBin ? xScale.minInterval : 0);

const minValue = clamp(minPosScaled, domainStart, maxPosScaled);
const minValue = clamp(minPosScaled, domainStart, maxDomainValue);
const maxValue = clamp(minPosScaled, maxPosScaled, maxDomainValue);

return [minValue, maxValue];
Expand Down

0 comments on commit 155c22d

Please sign in to comment.