Revert "Bili chart: shorter labels + wider right padding to stop clipping"

This reverts commit 110924807c412cd47c56eccf3ce9ee4053f8a7a4.
This commit is contained in:
Daniel 2026-04-14 12:27:14 +02:00
parent 1c106e71db
commit c11cfe45b7

View file

@ -1510,9 +1510,8 @@
aspectRatio: 1.6,
animation: { duration: 300 },
// Extra right padding so the threshold labels drawn past the
// last data point stay inside the canvas. 88 px fits the
// longest current label ("95th (High-Risk)") in 11 px bold.
layout: { padding: { right: 88 } },
// last data point stay inside the canvas.
layout: { padding: { right: 40 } },
scales: {
x: {
type: 'linear',
@ -1646,9 +1645,9 @@
// - Dashed crimson exchange line above (danger threshold)
var chartDatasets = [
{
label: 'Photo Tx', // shortened from "Phototherapy"
label: 'Phototherapy',
data: generateThresholdCurve(table),
borderColor: '#f97316', // orange line
borderColor: '#f97316', // orange line
borderWidth: 2.4,
borderDash: [],
fill: 'origin',
@ -1662,6 +1661,7 @@
borderColor: '#b91c1c', // crimson line
borderWidth: 2.4,
borderDash: [6, 3],
// Fill between this line and the phototherapy line (dataset 0)
fill: { target: 0 },
backgroundColor: 'rgba(252,211,77,0.22)' // amber band = "treat"
});