Skip to content

Commit

Permalink
Fix jittering
Browse files Browse the repository at this point in the history
  • Loading branch information
JCQuintas committed Jun 6, 2024
1 parent 20168e3 commit 549bc60
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export const computeValue = (
const extremums = [axis.min ?? minData, axis.max ?? maxData];
const tickNumber = getTickNumber({ ...axis, range, domain: extremums });

const niceScale = getScale(scaleType, extremums, range).nice(tickNumber);
// Gotta remove ".nice" here to avoid jittering in zoom
const niceScale = getScale(scaleType, extremums, range);
const niceDomain = niceScale.domain();
const domain = [axis.min ?? niceDomain[0], axis.max ?? niceDomain[1]];

Expand Down

0 comments on commit 549bc60

Please sign in to comment.