Skip to content

Commit

Permalink
Fix missing x axis label (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
kzadurska authored Mar 1, 2022
1 parent 2f998b0 commit f9666b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ describe("getXAxisLabelPosition", () => {

const result = getXAxisLabelPosition(stage, plottingStage);

expect(result).to.eql({ bottom: 100, right: 155 });
expect(result).to.eql({ bottom: 155, right: 100 });
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export function extendExtentIfNeeded(extent: number[]): number[] {
}

export function getXAxisLabelPosition(stage: Stage, plottingStage: Stage): {bottom: number, right: number} {
const bottom = stage.width - (plottingStage.width + plottingStage.x);
const right = stage.height - (plottingStage.height + plottingStage.y - X_AXIS_LABEL_OFFSET);
const right = stage.width - (plottingStage.width + plottingStage.x);
const bottom = stage.height - (plottingStage.height + plottingStage.y - X_AXIS_LABEL_OFFSET);

return { bottom, right };
}
Expand Down

0 comments on commit f9666b6

Please sign in to comment.