612a11fa6f
How: the catalog card no longer shows "N figuras publicadas". CaCu's
interactive view, the confirmation view and the paired counts drop their
"Filtro general aplicado: …" line: their status line or figure titles already
name the period ("2025-S2, selección: …"). The plain figure panels and the
paired times keep it, as it is their only statement of the period.
Implications: applies to every domain. The applied filter is still shown under
the general filters bar.
78 lines
6.1 KiB
HTML
78 lines
6.1 KiB
HTML
<section class="eu7" [attr.aria-label]="indicador.titulo + ' por ' + etiquetaEstrato">
|
||
<button mat-button type="button" class="methodology-toggle" [attr.aria-expanded]="helpOpen" (click)="toggleHelp()">Cómo leer</button>
|
||
@if (helpOpen) {
|
||
<div class="methodology">
|
||
@if (metadata) {
|
||
@for (guide of readingGuide; track guide.figura) {
|
||
<section class="reading-guide" [attr.aria-label]="'Cómo leer: ' + guide.nombre">
|
||
<h3>{{ guide.nombre }}</h3>
|
||
@if (guide.descripcion) { <p>{{ guide.descripcion }}</p> }
|
||
@if (guide.como_leer.length) { <ul>@for (line of guide.como_leer; track $index) { <li>{{ line }}</li> }</ul> }
|
||
</section>
|
||
} @empty { <p>El servicio no publica instrucciones de lectura para estas figuras.</p> }
|
||
} @else { <p>Metadatos publicados pendientes. Vuelve a abrir «Cómo leer» para reintentar su consulta.</p> }
|
||
</div>
|
||
}
|
||
@switch (status()) {
|
||
@case ('deferred') { <p role="status">La vista se cargará al acercarse a esta región.</p> }
|
||
@case ('loading') { <mat-progress-bar mode="indeterminate" [attr.aria-label]="'Cargando ' + indicador.titulo" /><p role="status">Cargando el mismo periodo para dona y barras…</p> }
|
||
@case ('error') { <div role="alert"><p>{{ message }}</p><button mat-stroked-button type="button" (click)="retry()">Reintentar</button></div> }
|
||
@case ('incompatible') { <div role="alert"><p>Respuesta incompatible: {{ message }}</p><button mat-stroked-button type="button" (click)="retry()">Reintentar</button></div> }
|
||
}
|
||
@if (status() === 'ready' || status() === 'empty') {
|
||
@if (periods.length > 1) {
|
||
<nav class="periods" [attr.aria-label]="'Periodos de dona y barras, ' + indicador.titulo">
|
||
<button type="button" aria-label="Periodo anterior" [disabled]="periodIndex === 0" (click)="changePeriod(-1)">‹</button>
|
||
<span role="status">{{ periods[periodIndex] }}, {{ periodIndex + 1 }} de {{ periods.length }}</span>
|
||
<button type="button" aria-label="Periodo siguiente" [disabled]="periodIndex === periods.length - 1" (click)="changePeriod(1)">›</button>
|
||
</nav>
|
||
}
|
||
@if (model; as m) {
|
||
<p class="selection-status" role="status" aria-live="polite">{{ m.periodo }}, selección: {{ selectionLabel }}</p>
|
||
@if (status() === 'empty') { <p role="status">No hay pacientes publicados para este periodo.</p> }
|
||
@else {
|
||
<div class="legend" role="group" [attr.aria-label]="'Explorar grupos y categorías, ' + indicador.titulo">
|
||
<button type="button" (click)="select('centro')" [disabled]="!selection.grupo && !selection.categoria" aria-label="Volver en la selección">Volver</button>
|
||
<div class="keys" role="group" aria-label="Grupos del anillo interior">
|
||
@for (g of m.grupos; track g.id; let i = $index) {
|
||
<button type="button" [attr.aria-pressed]="selection.grupo === g.id" (click)="select('grupos', i)"><span class="swatch" [style.background]="g.color" aria-hidden="true"></span>{{ g.etiqueta }}</button>
|
||
}
|
||
</div>
|
||
<div class="keys" role="group" aria-label="Categorías del anillo exterior">
|
||
@for (c of m.categorias; track c.id; let i = $index) {
|
||
<button type="button" [attr.aria-pressed]="selection.categoria === c.id" [disabled]="!!selection.grupo && selection.grupo !== c.grupo" (click)="select('categorias', i)"><span class="swatch" [style.background]="c.color" aria-hidden="true"></span>{{ c.etiqueta }}</button>
|
||
}
|
||
</div>
|
||
</div>
|
||
<div class="figures">
|
||
<section class="figure"><h3>Distribución de resultados, {{ m.periodo }}</h3>
|
||
@if (m.total !== null && m.total > 0 && donutFigure) {
|
||
<app-plotly-chart [figure]="donutFigure" [animated]="true" [showNotes]="false" [label]="indicador.titulo + ', dona de dos anillos, ' + m.periodo + ', ' + selectionLabel" (plotClick)="plotClicked($event)" />
|
||
} @else { <p role="status">{{ m.total === null ? 'Dona no disponible: hay celdas suprimidas o datos incompletos. No se calcula un total parcial.' : 'Sin pacientes con resultado disponible para la dona.' }}</p> }
|
||
<p>{{ sinDatoNote }}</p>
|
||
</section>
|
||
<section class="figure"><h3>{{ selectionLabel }} por {{ etiquetaEstrato }}, {{ m.periodo }}</h3>
|
||
<p>Porcentaje del total válido de cada {{ etiquetaEstrato }}; excluye «{{ m.sinDatoEtiqueta }}».</p>
|
||
@if (m.escenarios.length && barsFigure) {
|
||
<app-plotly-chart [figure]="barsFigure" [animated]="true" [showNotes]="false" [style.--plot-min-width]="'440px'" [label]="indicador.titulo + ', barras por ' + etiquetaEstrato + ', ' + m.periodo + ', ' + selectionLabel" />
|
||
}
|
||
</section>
|
||
</div>
|
||
}
|
||
@for (note of m.notas; track $index) { <p class="note">{{ note }}</p> }
|
||
<details class="published-values"><summary>Valores publicados</summary>
|
||
<div class="table-scroll" role="region" [attr.aria-label]="'Tabla de valores, ' + indicador.titulo" tabindex="0">
|
||
<table><caption>Datos generales, {{ m.periodo }}</caption>
|
||
<thead><tr><th scope="col">Categoría</th><th scope="col">Conteo</th></tr></thead>
|
||
<tbody>@for (row of generalCells; track $index) { <tr><th scope="row">{{ row.etiqueta }}</th><td>{{ cellText(row.celda) }}</td></tr> }</tbody>
|
||
</table>
|
||
<table><caption>Por {{ etiquetaEstrato }}, {{ m.periodo }}, porcentajes sin «{{ m.sinDatoEtiqueta }}»</caption>
|
||
<thead><tr><th scope="col">{{ etiquetaEstrato.charAt(0).toUpperCase() + etiquetaEstrato.slice(1) }}</th><th scope="col">Categoría</th><th scope="col">Conteo</th><th scope="col">Denominador válido</th><th scope="col">Porcentaje</th></tr></thead>
|
||
<tbody>@for (row of scenarioCells; track $index) { <tr><th scope="row">{{ row.escenario }}</th><td>{{ row.categoria }}</td><td>{{ cellText(row.celda) }}</td><td>{{ row.den === null ? 'No disponible / no aplica' : row.den }}</td><td>{{ percentText(row.pct) }}</td></tr> }</tbody>
|
||
</table>
|
||
</div>
|
||
</details>
|
||
}
|
||
}
|
||
</section>
|