From f8e59a0b22e218269bfe75bdc65fa44274170dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= Date: Fri, 17 Nov 2023 10:54:48 +0100 Subject: [PATCH] Fix overlapping x-axis dates on small screens --- CHANGELOG.md | 1 + src/util/LineChart/index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4556b3d33..122c3819e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ All notable changes to this project will be documented in this file. The format of parent measurements when switching between items. - The edit button for key result values is now only visible to users with the appropriate permissions. +- Fixed overlapping dates on the x-axis of some line plots on small screens. ### Security diff --git a/src/util/LineChart/index.js b/src/util/LineChart/index.js index da52a7c1f..ba788a7bd 100644 --- a/src/util/LineChart/index.js +++ b/src/util/LineChart/index.js @@ -183,7 +183,7 @@ export default class LineChart { .call( axisBottom(this.x) .tickFormat((d) => formatDate(d, daysBetween)) - .ticks(Math.min(Math.ceil(daysBetween) || 1, 6)) + .ticks(Math.min(Math.ceil(daysBetween) || 1, 5)) ) .call(styleAxisX);