Fix getYTicksByIndex truncating integers by using toFixed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 14:10:09 +08:00
parent 4dbed9fe56
commit c6d073e119
2 changed files with 2 additions and 6 deletions

View File

@@ -123,7 +123,7 @@ describe("getStepSizeOfYTicks", () => {
describe("getYTicksByIndex", () => {
it("formats tick label with unit", () => {
expect(getYTicksByIndex(2, 3, "h")).toBe("6h");
expect(getYTicksByIndex(2, 3, "h")).toBe("6.0h");
});
it("truncates to 1 decimal place", () => {