char consistency layout

This commit is contained in:
Diego Imbert
2026-01-13 11:39:19 +01:00
parent 6cc0f2a6a1
commit a42075eb57
2 changed files with 13 additions and 7 deletions
@@ -235,7 +235,8 @@
display: false
},
min: minMaxTimes.min,
max: minMaxTimes.max
max: minMaxTimes.max,
ticks: { maxRotation: 0, minRotation: 0 }
},
y: {
grid: {
+11 -6
View File
@@ -12,7 +12,8 @@
LinearScale,
PointElement,
TimeScale,
LogarithmicScale
LogarithmicScale,
type ChartOptions
} from 'chart.js'
import type { CompletedJob } from '$lib/gen'
import { getDbClockNow } from '$lib/forLater'
@@ -244,7 +245,7 @@
const minMaxTime = $derived.by(() => computeMinMaxTime(jobs, minTimeSet, maxTimeSet))
let scatterOptions = $derived({
let scatterOptions: ChartOptions<'scatter'> = $derived({
responsive: true,
maintainAspectRatio: false,
plugins: {
@@ -274,8 +275,9 @@
grid: {
display: false
},
min: minMaxTime.minTime,
max: minMaxTime.maxTime
min: minMaxTime.minTime.getTime(),
max: minMaxTime.maxTime.getTime(),
ticks: { maxRotation: 0, minRotation: 0 }
},
y: {
grid: {
@@ -285,11 +287,14 @@
display: true,
text: 'job duration (ms)'
},
type: 'logarithmic'
type: 'logarithmic',
afterFit: function (axis) {
axis.width = Math.max(axis.width, 65) // min width to prevent layout flickering
}
}
},
animation: false
} as any)
})
</script>
<DarkModeObserver bind:darkMode />