Merge parity/F1g

This commit is contained in:
2026-12-01 13:45:25 -06:00
8 changed files with 203 additions and 137 deletions
@@ -4,6 +4,7 @@ import { teaSteps } from '../paciente/tea-data';
import {
ageShare,
ageStack,
historyFigure,
nestedDonut,
sexCountBars,
shareDonut,
@@ -130,6 +131,38 @@ function fixture(): Bundle {
}
describe('TEA indicators', () => {
it('uses integer ticks and spaces them using the stacked totals', () => {
const panel = { title: 'Pacientes', measure: 'M23', kind: 'stack' } as const;
const figure = (count: number) =>
historyFigure(
panel,
[
{
label: 'Enero',
r: {
populations: {},
strata: {
category: {
confirmed: { 'initial-population': count },
in_process: { 'initial-population': count },
},
},
},
},
],
'#123456',
'Mes',
);
expect(figure(1).layout?.yaxis).toMatchObject({
tickmode: 'linear',
tick0: 0,
dtick: 1,
tickformat: '.0f',
});
expect(figure(100).layout?.yaxis?.dtick).toBe(50);
});
it('builds the category and group rings from the supplied counts', () => {
const catalog: Catalog = {
groups: [{ id: 'female', label: 'Femenino', color: '#123456' }],