Cosmetic pass: legends above plots, readable hovers and ticks, KPI qualifiers, a header that never wraps

This commit is contained in:
Roberto Treviño
2026-11-29 12:39:07 -06:00
parent 979b7cf34d
commit a93cd71126
8 changed files with 116 additions and 13 deletions
+4 -2
View File
@@ -108,6 +108,8 @@ export function nestedDonut(r: Reading, catalog: Catalog, center: string): Figur
labels: catalog.categories.map((c) => c.label),
hole: 0.74,
domain: { x: [0, 1], y: [0, 1] },
// along the thin ring, so a label fits its slice
insidetextorientation: 'tangential',
text: values.map((n, i) => (total && n / total >= 0.05 ? catalog.categories[i].label : '')),
marker: {
colors: catalog.categories.map((c) => rgba(c.color, faded.has(c.code) ? 0.3 : 1)),
@@ -150,7 +152,8 @@ export function scenarioBars(
xaxis: {
title: { text: '% de pacientes del escenario con resultado' },
ticksuffix: ' %',
range: [0, 100],
range: [0, 100.5],
dtick: 20,
},
yaxis: {
type: 'category',
@@ -159,7 +162,6 @@ export function scenarioBars(
categoryarray: y,
automargin: true,
},
legend: { orientation: 'h', y: -0.25 },
},
};
}