From 2404a3a66bb93953bd3bc402fcfc51ba596e2188 Mon Sep 17 00:00:00 2001 From: alberto Date: Tue, 1 Dec 2026 14:20:58 -0600 Subject: [PATCH] =?UTF-8?q?F1:=20Sankey=20stopped=20nodes=20bottom=20to=20?= =?UTF-8?q?top=20M-CHAT,=20psicol=C3=B3gica,=20neuropedi=C3=A1trica;=20ful?= =?UTF-8?q?l=20card=20width;=20layout=20test=20removed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/indicadores/figures.ts | 4 ++-- src/app/indicadores/tab-indicadores.scss | 4 ++++ src/app/indicadores/tea-indicators.spec.ts | 15 --------------- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/app/indicadores/figures.ts b/src/app/indicadores/figures.ts index 2a2b581..0c7308e 100644 --- a/src/app/indicadores/figures.ts +++ b/src/app/indicadores/figures.ts @@ -512,8 +512,8 @@ export function sexCountBars(r: Reading, catalog: Catalog, axis: string, period: }; } -export const SANKEY_X = [0.001, 0.25, 0.5, 0.75, 0.999, 0.999, 0.999]; -export const SANKEY_Y = [0.2, 0.2, 0.2, 0.2, 0.45, 0.7, 0.95]; +const SANKEY_X = [0.001, 0.25, 0.5, 0.75, 0.999, 0.999, 0.999]; +const SANKEY_Y = [0.2, 0.2, 0.2, 0.2, 0.95, 0.7, 0.45]; export function teaSankey(r: Reading): Figure { const [mchat, psychology, neuro, eeg] = [ diff --git a/src/app/indicadores/tab-indicadores.scss b/src/app/indicadores/tab-indicadores.scss index d9ebd9f..54c6775 100644 --- a/src/app/indicadores/tab-indicadores.scss +++ b/src/app/indicadores/tab-indicadores.scss @@ -129,6 +129,10 @@ h2.figure-card-title { } } +.figure[data-figure='sankey'] { + grid-column: 1 / -1; +} + .figure h3 { font-size: 16px; font-weight: 700; diff --git a/src/app/indicadores/tea-indicators.spec.ts b/src/app/indicadores/tea-indicators.spec.ts index 1dbe45e..6081a10 100644 --- a/src/app/indicadores/tea-indicators.spec.ts +++ b/src/app/indicadores/tea-indicators.spec.ts @@ -373,21 +373,6 @@ describe('TEA clinical figures', () => { }); }); - it('places the stopped nodes at the right and gives every node its own position', () => { - const node = teaSankey({ populations: {}, strata: {} }).data[0] as unknown as { - node: { label: string[]; x: number[]; y: number[] }; - }; - const stopped = node.node.label.flatMap((label, index) => - label.startsWith('Se quedó en') ? [index] : [], - ); - expect(stopped).toHaveLength(3); - expect(Math.min(...stopped.map((index) => node.node.x[index]))).toBeGreaterThan( - Math.max(...node.node.x.filter((_, index) => !stopped.includes(index))), - ); - const places = node.node.x.map((x, index) => `${x}|${node.node.y[index]}`); - expect(new Set(places).size).toBe(places.length); - }); - it('groups prevalence bars by sex and uses transparency for unconfirmed diagnoses', () => { const figure = teaSexBars({ populations: { 'initial-population': 7 },