diff --git a/src/app/indicadores/figures.ts b/src/app/indicadores/figures.ts index 832ed55..5725479 100644 --- a/src/app/indicadores/figures.ts +++ b/src/app/indicadores/figures.ts @@ -440,7 +440,7 @@ export function ageShare(r: Reading, axis: string): Figure { export function valueAxis(values: Iterable) { const found = [...values].filter((v): v is number => v != null && Number.isFinite(v)); const counts = found.every(Number.isInteger); - const narrow = found.length > 0 && Math.max(...found) - Math.min(...found) <= 5; + const narrow = found.length > 0 && Math.max(...found) - Math.min(0, ...found) <= 5; return { type: 'linear' as const, tickformat: counts ? 'd' : SHORT,