Skip to content

Commit

Permalink
feat: reverse change of tick align
Browse files Browse the repository at this point in the history
  • Loading branch information
xuefei1313 committed Feb 11, 2025
1 parent a369845 commit d66ca30
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const tickAlign = (data: Array<Datum>, op: ITickAlignOpt) => {
// make the tickData of the current axis consistent with the tickData of the target axis
const newTicks: number[] = targetData.map((d: { value: number }) => {
const percent = (d.value - targetDomain[0]) / targetRange;
return Math.round(currentRange * percent + currentDomain[0]);
return currentRange * percent + currentDomain[0];
});
return convertDomainToTickData(newTicks);
};

0 comments on commit d66ca30

Please sign in to comment.