Every chart uses the shared short number format: axes, hover and bar/value text
Counts print as integers and other values with at most one decimal, in tick labels (valueAxis, percentAxis), hover templates and bar and pie text.
This commit is contained in:
@@ -249,7 +249,7 @@ export function ageNorm(rows: Centile[], metric: Metric, age: number): Figure {
|
||||
},
|
||||
],
|
||||
layout: {
|
||||
xaxis: { title: { text: 'Edad (meses)' } },
|
||||
xaxis: { title: { text: 'Edad (meses)' }, ...valueAxis([age]) },
|
||||
yaxis: {
|
||||
title: { text: metric.unit ?? 'Valor' },
|
||||
...valueAxis([metric.value, ...rows.flatMap(({ p5, median, p95 }) => [p5, median, p95])]),
|
||||
@@ -390,7 +390,7 @@ export function probabilityCurve(
|
||||
return {
|
||||
data,
|
||||
layout: {
|
||||
xaxis: { title: { text: 'Puntuación z' } },
|
||||
xaxis: { title: { text: 'Puntuación z' }, ...valueAxis([pair.z, 0]) },
|
||||
yaxis: { title: { text: 'Probabilidad (%)' }, ...valueAxis([0, 100]), range: [0, 100] },
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user