Nombrar la detección anterior y encadenar los tiempos de CaMa hasta el tratamiento
This commit is contained in:
@@ -140,7 +140,7 @@ describe('bars', () => {
|
|||||||
const t = bars(mode, () => r)!;
|
const t = bars(mode, () => r)!;
|
||||||
expect(t.rows.map((x) => x.label)).toEqual([
|
expect(t.rows.map((x) => x.label)).toEqual([
|
||||||
'Detección inicial',
|
'Detección inicial',
|
||||||
'Detección subsecuente',
|
'Con detección anterior',
|
||||||
'Sin dato',
|
'Sin dato',
|
||||||
]);
|
]);
|
||||||
expect(t.rows.map((x) => x.cells)).toEqual([
|
expect(t.rows.map((x) => x.cells)).toEqual([
|
||||||
@@ -238,7 +238,7 @@ describe('bars', () => {
|
|||||||
c === 'initial'
|
c === 'initial'
|
||||||
? 'Detección inicial'
|
? 'Detección inicial'
|
||||||
: c === 'subsequent'
|
: c === 'subsequent'
|
||||||
? 'Detección subsecuente'
|
? 'Con detección anterior'
|
||||||
: 'Sin dato',
|
: 'Sin dato',
|
||||||
['initial', 'subsequent', 'no_data'],
|
['initial', 'subsequent', 'no_data'],
|
||||||
{ fill: true },
|
{ fill: true },
|
||||||
@@ -251,14 +251,14 @@ describe('bars', () => {
|
|||||||
const y = (f.data[0] as any).y;
|
const y = (f.data[0] as any).y;
|
||||||
expect(y).toEqual([
|
expect(y).toEqual([
|
||||||
'Detección inicial<br>Pacientes: 0',
|
'Detección inicial<br>Pacientes: 0',
|
||||||
'Detección subsecuente<br>Pacientes: 8',
|
'Con detección anterior<br>Pacientes: 8',
|
||||||
'Sin dato<br>Pacientes: 2',
|
'Sin dato<br>Pacientes: 2',
|
||||||
]);
|
]);
|
||||||
expect((f.data[0] as any).x).toEqual([0, 75, 100]);
|
expect((f.data[0] as any).x).toEqual([0, 75, 100]);
|
||||||
});
|
});
|
||||||
it('leaves out a group that does not reconcile', () => {
|
it('leaves out a group that does not reconcile', () => {
|
||||||
const f = draw(reading({ 'subsequent|NILM': 6 }, 10));
|
const f = draw(reading({ 'subsequent|NILM': 6 }, 10));
|
||||||
expect((f.data[0] as any).y).toEqual(['Detección subsecuente<br>Pacientes: 6']);
|
expect((f.data[0] as any).y).toEqual(['Con detección anterior<br>Pacientes: 6']);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -375,7 +375,7 @@ describe('independent bars by group', () => {
|
|||||||
)!;
|
)!;
|
||||||
expect(g.groups.map((x) => [x.label, x.total])).toEqual([
|
expect(g.groups.map((x) => [x.label, x.total])).toEqual([
|
||||||
['Detección inicial', 4],
|
['Detección inicial', 4],
|
||||||
['Detección subsecuente', 6],
|
['Con detección anterior', 6],
|
||||||
]);
|
]);
|
||||||
expect(g.groups[0].rows.map((r) => [r.label, r.text, r.percent, r.color])).toEqual([
|
expect(g.groups[0].rows.map((r) => [r.label, r.text, r.percent, r.color])).toEqual([
|
||||||
['Normal', '3/4 · 75.0 %', 75, '#408651'],
|
['Normal', '3/4 · 75.0 %', 75, '#408651'],
|
||||||
@@ -530,7 +530,7 @@ describe('the subsequent round by last screening', () => {
|
|||||||
[25, 50, [50, 100]],
|
[25, 50, [50, 100]],
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
it('splits the subsequent round by last screening, keeping those without an answer', () => {
|
it('splits the subsequent round by last screening, drawing only those with an answer', () => {
|
||||||
const one = { 'initial-population': 1 };
|
const one = { 'initial-population': 1 };
|
||||||
const r: Reading = {
|
const r: Reading = {
|
||||||
populations: { 'initial-population': 3 },
|
populations: { 'initial-population': 3 },
|
||||||
@@ -554,7 +554,6 @@ describe('the subsequent round by last screening', () => {
|
|||||||
['within_1_year', 1],
|
['within_1_year', 1],
|
||||||
['2_years', 0],
|
['2_years', 0],
|
||||||
['3_or_more_years', 0],
|
['3_or_more_years', 0],
|
||||||
['subsequent_without_last_screening', 1],
|
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+11
-27
@@ -1,4 +1,5 @@
|
|||||||
import { CIE10 } from './cie10';
|
import { CIE10 } from './cie10';
|
||||||
|
import { chainStarts } from './durations';
|
||||||
import { NEUTRAL_DARK } from './cacu-palette';
|
import { NEUTRAL_DARK } from './cacu-palette';
|
||||||
import { name, Reading } from './measures';
|
import { name, Reading } from './measures';
|
||||||
|
|
||||||
@@ -186,7 +187,7 @@ export interface Bars {
|
|||||||
export const NOT_AVAILABLE = 'No disponible';
|
export const NOT_AVAILABLE = 'No disponible';
|
||||||
export const NO_PATIENTS = 'Sin pacientes en el periodo';
|
export const NO_PATIENTS = 'Sin pacientes en el periodo';
|
||||||
const NO_ROUND =
|
const NO_ROUND =
|
||||||
'Ninguna paciente del periodo tiene clasificación de detección inicial o subsecuente: los grupos en cero reflejan información no registrada, no ausencia de pacientes.';
|
'Ninguna paciente del periodo tiene clasificación de detección inicial o anterior: los grupos en cero reflejan información no registrada, no ausencia de pacientes.';
|
||||||
|
|
||||||
const whole = (n: unknown): n is number => typeof n === 'number' && Number.isInteger(n) && n >= 0;
|
const whole = (n: unknown): n is number => typeof n === 'number' && Number.isInteger(n) && n >= 0;
|
||||||
|
|
||||||
@@ -482,14 +483,9 @@ export function bars(mode: Mode, of: (measure: string) => Reading | undefined):
|
|||||||
|
|
||||||
/** The subsequent round split by the form's last screening, drawn in place of that round's group. */
|
/** The subsequent round split by the form's last screening, drawn in place of that round's group. */
|
||||||
const LAST_SCREENING: [string, string][] = [
|
const LAST_SCREENING: [string, string][] = [
|
||||||
['within_1_year', 'Subsecuente: última detección hace un año o menos'],
|
['within_1_year', 'Detección anterior hace un año o menos'],
|
||||||
['2_years', 'Subsecuente: última detección hace dos años'],
|
['2_years', 'Detección anterior hace dos años'],
|
||||||
['3_or_more_years', 'Subsecuente: última detección hace tres años o más'],
|
['3_or_more_years', 'Detección anterior hace tres años o más'],
|
||||||
];
|
|
||||||
/** Subsequent records whose form gives none of those answers: drawn only when there are some. */
|
|
||||||
const NO_LAST_SCREENING: [string, string] = [
|
|
||||||
'subsequent_without_last_screening',
|
|
||||||
'Subsecuente sin dato de última detección',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/** The groups of a grouped mode: each group (an age group, a follow-up status, a screening round) with
|
/** The groups of a grouped mode: each group (an age group, a follow-up status, a screening round) with
|
||||||
@@ -507,12 +503,9 @@ export function grouped(
|
|||||||
const history =
|
const history =
|
||||||
mode.stratum === 'round' ? (r?.strata['subsequent_history-category'] ?? {}) : {};
|
mode.stratum === 'round' ? (r?.strata['subsequent_history-category'] ?? {}) : {};
|
||||||
const answers = LAST_SCREENING.map(([code]) => code);
|
const answers = LAST_SCREENING.map(([code]) => code);
|
||||||
const unanswered = Object.keys(history).filter((k) => !answers.includes(k.split('|')[0]));
|
|
||||||
/** the cells that make up a group, with their category */
|
/** the cells that make up a group, with their category */
|
||||||
const cellsOf = (g: string): [string, Record<string, number>][] =>
|
const cellsOf = (g: string): [string, Record<string, number>][] =>
|
||||||
g === NO_LAST_SCREENING[0]
|
Object.entries(answers.includes(g) ? history : cells)
|
||||||
? unanswered.map((k) => [k.split('|')[1], history[k]])
|
|
||||||
: Object.entries(answers.includes(g) ? history : cells)
|
|
||||||
.filter(([k]) => k.split('|')[0] === g)
|
.filter(([k]) => k.split('|')[0] === g)
|
||||||
.map(([k, c]) => [k.split('|')[1], c]);
|
.map(([k, c]) => [k.split('|')[1], c]);
|
||||||
const n = (g: string, c: string) =>
|
const n = (g: string, c: string) =>
|
||||||
@@ -532,19 +525,14 @@ export function grouped(
|
|||||||
const at = codes.indexOf('subsequent');
|
const at = codes.indexOf('subsequent');
|
||||||
const drawn =
|
const drawn =
|
||||||
mode.stratum === 'round' && at >= 0 && r?.strata['subsequent_history-category']
|
mode.stratum === 'round' && at >= 0 && r?.strata['subsequent_history-category']
|
||||||
? [
|
? [...codes.slice(0, at), ...answers, ...codes.slice(at + 1)]
|
||||||
...codes.slice(0, at),
|
|
||||||
...answers,
|
|
||||||
...(unanswered.length ? [NO_LAST_SCREENING[0]] : []),
|
|
||||||
...codes.slice(at + 1),
|
|
||||||
]
|
|
||||||
: codes;
|
: codes;
|
||||||
const groups: Group[] = drawn.map((code) => {
|
const groups: Group[] = drawn.map((code) => {
|
||||||
const den = total(code);
|
const den = total(code);
|
||||||
return {
|
return {
|
||||||
code,
|
code,
|
||||||
label:
|
label:
|
||||||
[...LAST_SCREENING, NO_LAST_SCREENING].find(([answer]) => answer === code)?.[1] ??
|
LAST_SCREENING.find(([answer]) => answer === code)?.[1] ??
|
||||||
(mode.stratum === 'age_group' &&
|
(mode.stratum === 'age_group' &&
|
||||||
code === '<25' &&
|
code === '<25' &&
|
||||||
['CACU_EU7', 'CACU_VPH_GENOTIPO'].includes(mode.measure)
|
['CACU_EU7', 'CACU_VPH_GENOTIPO'].includes(mode.measure)
|
||||||
@@ -667,13 +655,9 @@ function medians(
|
|||||||
staggered?: boolean,
|
staggered?: boolean,
|
||||||
): Bars | undefined {
|
): Bars | undefined {
|
||||||
if (!rows.some((r) => r.score?.score !== undefined)) return undefined;
|
if (!rows.some((r) => r.score?.score !== undefined)) return undefined;
|
||||||
// a step without a median moves nothing after it
|
const starts = staggered
|
||||||
let elapsed = 0;
|
? chainStarts(rows.map((r) => ({ median: r.score?.score })))
|
||||||
const starts = rows.map((r) => {
|
: rows.map(() => 0);
|
||||||
const start = elapsed;
|
|
||||||
if (staggered) elapsed += r.score?.score ?? 0;
|
|
||||||
return start;
|
|
||||||
});
|
|
||||||
const ends = rows.map(
|
const ends = rows.map(
|
||||||
(r, i) => starts[i] + Math.max(r.score?.score ?? 0, r.score?.high ?? 0),
|
(r, i) => starts[i] + Math.max(r.score?.score ?? 0, r.score?.high ?? 0),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { durationMax, durationRows } from './durations';
|
import { chainStarts, durationMax, durationRows } from './durations';
|
||||||
import { Reading } from './measures';
|
import { Reading } from './measures';
|
||||||
|
|
||||||
const reading = (score?: number, n = 0, low?: number, high?: number): Reading => ({
|
const reading = (score?: number, n = 0, low?: number, high?: number): Reading => ({
|
||||||
@@ -53,3 +53,10 @@ describe('durationRows', () => {
|
|||||||
expect(durationMax([])).toBe(0);
|
expect(durationMax([])).toBe(0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('chainStarts', () => {
|
||||||
|
it('starts each step where the one it follows ends, two of them sharing a start', () => {
|
||||||
|
expect(chainStarts([{ median: 4 }, { median: 6 }, { median: 2, after: 0 }])).toEqual([0, 4, 4]);
|
||||||
|
expect(chainStarts([{ median: 4 }, {}, { median: 2 }])).toEqual([0, 4, 4]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import { Reading } from './measures';
|
|||||||
export interface RouteStep {
|
export interface RouteStep {
|
||||||
label: string;
|
label: string;
|
||||||
measure?: string;
|
measure?: string;
|
||||||
|
/** the step (its position) this one starts after; the previous one by default */
|
||||||
|
after?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** One row of a duration table: the median days, how many measurements and the quartiles.
|
/** One row of a duration table: the median days, how many measurements and the quartiles.
|
||||||
@@ -17,6 +19,25 @@ export interface DurationRow {
|
|||||||
observations?: number;
|
observations?: number;
|
||||||
low?: number;
|
low?: number;
|
||||||
high?: number;
|
high?: number;
|
||||||
|
after?: number;
|
||||||
|
/** where its bar starts, in days, when the steps are chained */
|
||||||
|
start?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Where each step's bar starts when drawn as a schematic sequence (a Gantt chart): where the
|
||||||
|
* step it follows ends. A step without a median moves nothing after it. */
|
||||||
|
export function chainStarts(steps: { median?: number; after?: number }[]): number[] {
|
||||||
|
const starts: number[] = [];
|
||||||
|
steps.forEach(({ after }, i) => {
|
||||||
|
const j = after ?? i - 1;
|
||||||
|
starts.push(j < 0 ? 0 : starts[j] + (steps[j].median ?? 0));
|
||||||
|
});
|
||||||
|
return starts;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function chained(rows: DurationRow[]): DurationRow[] {
|
||||||
|
const starts = chainStarts(rows);
|
||||||
|
return rows.map((row, i) => ({ ...row, start: starts[i] }));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The rows of a route in one reading; every step keeps its row. `published` says which
|
/** The rows of a route in one reading; every step keeps its row. `published` says which
|
||||||
@@ -26,12 +47,13 @@ export function durationRows(
|
|||||||
read: (measure: string) => Reading | undefined,
|
read: (measure: string) => Reading | undefined,
|
||||||
published: (measure: string) => boolean,
|
published: (measure: string) => boolean,
|
||||||
): DurationRow[] {
|
): DurationRow[] {
|
||||||
return steps.map(({ label, measure }) => {
|
return steps.map(({ label, measure, after }) => {
|
||||||
if (!measure || !published(measure)) return { label, status: 'unpublished' };
|
if (!measure || !published(measure)) return { label, after, status: 'unpublished' };
|
||||||
const r = read(measure);
|
const r = read(measure);
|
||||||
if (r?.score === undefined) return { label, status: 'empty' };
|
if (r?.score === undefined) return { label, after, status: 'empty' };
|
||||||
return {
|
return {
|
||||||
label,
|
label,
|
||||||
|
after,
|
||||||
status: 'value',
|
status: 'value',
|
||||||
median: r.score,
|
median: r.score,
|
||||||
observations: r.populations['measure-observation'],
|
observations: r.populations['measure-observation'],
|
||||||
@@ -41,6 +63,6 @@ export function durationRows(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The scale of a table of durations, from zero: the largest median or third quartile shown. */
|
/** The scale of a table of durations, from zero: the farthest median or third quartile shown. */
|
||||||
export const durationMax = (rows: DurationRow[]): number =>
|
export const durationMax = (rows: DurationRow[]): number =>
|
||||||
Math.max(0, ...rows.map((r) => Math.max(r.median ?? 0, r.high ?? 0)));
|
Math.max(0, ...rows.map((r) => (r.start ?? 0) + Math.max(r.median ?? 0, r.high ?? 0)));
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export const LABELS: Record<string, string> = {
|
|||||||
bad: 'Malo',
|
bad: 'Malo',
|
||||||
not_analyzed: 'Sin analizar',
|
not_analyzed: 'Sin analizar',
|
||||||
initial: 'Detección inicial',
|
initial: 'Detección inicial',
|
||||||
subsequent: 'Detección subsecuente',
|
subsequent: 'Con detección anterior',
|
||||||
positive: 'Positivo',
|
positive: 'Positivo',
|
||||||
negative: 'Negativo',
|
negative: 'Negativo',
|
||||||
hpv_16: 'VPH 16',
|
hpv_16: 'VPH 16',
|
||||||
@@ -188,7 +188,7 @@ export const STRATA: Record<string, string> = {
|
|||||||
cytology: 'Citología previa',
|
cytology: 'Citología previa',
|
||||||
hpv: 'VPH de la citología previa',
|
hpv: 'VPH de la citología previa',
|
||||||
level: 'Histología confirmada',
|
level: 'Histología confirmada',
|
||||||
round: 'Tamizaje inicial o subsecuente',
|
round: 'Detección inicial o anterior',
|
||||||
hpv_16: 'VPH 16',
|
hpv_16: 'VPH 16',
|
||||||
hpv_18: 'VPH 18',
|
hpv_18: 'VPH 18',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -74,13 +74,13 @@ const TINT = { bar: DURATION, mark: QUARTILE };
|
|||||||
const ROUNDS = ['initial', 'subsequent', 'no_data'];
|
const ROUNDS = ['initial', 'subsequent', 'no_data'];
|
||||||
const ROUND_CAPTION =
|
const ROUND_CAPTION =
|
||||||
'Cada paciente está en un solo grupo, según su muestra (fecha de toma): detección inicial (primera vez en la vida), ' +
|
'Cada paciente está en un solo grupo, según su muestra (fecha de toma): detección inicial (primera vez en la vida), ' +
|
||||||
'subsecuente (detección previa registrada, o ya con colposcopía o tratamiento) o «Sin dato». ' +
|
'con detección anterior (registrada, o ya con colposcopía o tratamiento) o «Sin dato». ' +
|
||||||
'Un grupo sin pacientes se muestra en cero; sin porcentaje.';
|
'Un grupo sin pacientes se muestra en cero; sin porcentaje.';
|
||||||
|
|
||||||
/** The views the cytology and HPV-by-genotype cards share (one selector for both). */
|
/** The views the cytology and HPV-by-genotype cards share (one selector for both). */
|
||||||
const GENERAL = 'General';
|
const GENERAL = 'General';
|
||||||
const BY_AGE = 'Por grupo de edad';
|
const BY_AGE = 'Por grupo de edad';
|
||||||
const BY_ROUND = 'Por detección inicial y subsecuente';
|
const BY_ROUND = 'Por detección inicial y anterior';
|
||||||
const AGE_GROUPS = ['<25', '25-34', '35-44', '45-54', '55-64', '65+', 'no_data'];
|
const AGE_GROUPS = ['<25', '25-34', '35-44', '45-54', '55-64', '65+', 'no_data'];
|
||||||
/** HPV categories the cards do not draw (their reports stay in the total and the percentages). */
|
/** HPV categories the cards do not draw (their reports stay in the total and the percentages). */
|
||||||
const HPV_HIDDEN = {
|
const HPV_HIDDEN = {
|
||||||
@@ -156,7 +156,7 @@ const ppv = (
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
kind: 'shares',
|
kind: 'shares',
|
||||||
label: 'Por detección inicial y subsecuente',
|
label: 'Por detección inicial y anterior',
|
||||||
caption: ROUND_CAPTION,
|
caption: ROUND_CAPTION,
|
||||||
measure,
|
measure,
|
||||||
stratum: 'round',
|
stratum: 'round',
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ export const PAGES: Record<string, Page> = {
|
|||||||
opportunity: [
|
opportunity: [
|
||||||
{
|
{
|
||||||
kind: 'route',
|
kind: 'route',
|
||||||
title: 'Tiempo de tamizaje a diagnóstico',
|
title: 'Tiempo de tamizaje a diagnóstico y tratamiento',
|
||||||
// from the mammography: only the two measures that start at it
|
// from the mammography: only the two measures that start at it
|
||||||
sample: [
|
sample: [
|
||||||
{ label: 'Interpretación radiológica', measure: 'CAMA_EU38A' },
|
{ label: 'Interpretación radiológica', measure: 'CAMA_EU38A' },
|
||||||
@@ -301,9 +301,15 @@ export const PAGES: Record<string, Page> = {
|
|||||||
label: 'Interpretación radiológica a diagnóstico',
|
label: 'Interpretación radiológica a diagnóstico',
|
||||||
measure: 'CAMA_DIAS_RESULTADO_DIAGNOSTICO',
|
measure: 'CAMA_DIAS_RESULTADO_DIAGNOSTICO',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Diagnóstico tras biopsia a tratamiento',
|
||||||
|
measure: 'CAMA_DIAS_DIAGNOSTICO_TRATAMIENTO',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'Interpretación radiológica a resultado de biopsia',
|
label: 'Interpretación radiológica a resultado de biopsia',
|
||||||
measure: 'CAMA_DIAS_RESULTADO_BIOPSIA',
|
measure: 'CAMA_DIAS_RESULTADO_BIOPSIA',
|
||||||
|
// from the interpretation, as the diagnosis: not after it
|
||||||
|
after: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Component, input, signal } from '@angular/core';
|
|||||||
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
||||||
import { MatCardModule } from '@angular/material/card';
|
import { MatCardModule } from '@angular/material/card';
|
||||||
import { Loading } from '../loading';
|
import { Loading } from '../loading';
|
||||||
import { DurationRow, durationMax } from './durations';
|
import { chained, DurationRow, durationMax } from './durations';
|
||||||
|
|
||||||
/** A screening route as one compact card: a bar per step with its median, its observations
|
/** A screening route as one compact card: a bar per step with its median, its observations
|
||||||
* and its quartiles, read step by step or cumulatively from the sample. A step that is not
|
* and its quartiles, read step by step or cumulatively from the sample. A step that is not
|
||||||
@@ -29,15 +29,16 @@ import { DurationRow, durationMax } from './durations';
|
|||||||
@if (loading()) {
|
@if (loading()) {
|
||||||
<app-loading what="los tiempos" [figure]="true" />
|
<app-loading what="los tiempos" [figure]="true" />
|
||||||
} @else {
|
} @else {
|
||||||
@let rows = mode() === 'sample' ? sample() : step();
|
@let rows = mode() === 'sample' ? sample() : chain(step());
|
||||||
@let max = scale(rows);
|
@let max = scale(rows);
|
||||||
<p class="state">
|
<p class="state">
|
||||||
@if (mode() === 'sample') {
|
@if (mode() === 'sample') {
|
||||||
Mediana de días desde la toma de la mastografía hasta cada etapa; cada medida se
|
Mediana de días desde la toma de la mastografía hasta cada etapa; cada medida se
|
||||||
calcula por separado.
|
calcula por separado.
|
||||||
} @else {
|
} @else {
|
||||||
Cada barra es la mediana de su paso, desde cero y por separado; los pasos pueden
|
Esquema: cada barra es la mediana de su paso y empieza donde termina el paso del que
|
||||||
corresponder a poblaciones diferentes, por lo que las medianas no se suman.
|
parte. Los pasos pueden corresponder a poblaciones diferentes, por lo que las
|
||||||
|
medianas no se suman.
|
||||||
}
|
}
|
||||||
Las marcas indican el primer y tercer cuartil.
|
Las marcas indican el primer y tercer cuartil.
|
||||||
@if (max) {
|
@if (max) {
|
||||||
@@ -62,16 +63,17 @@ import { DurationRow, durationMax } from './durations';
|
|||||||
<span class="track" aria-hidden="true">
|
<span class="track" aria-hidden="true">
|
||||||
<span
|
<span
|
||||||
class="bar"
|
class="bar"
|
||||||
|
[style.margin-left.%]="max ? (100 * (row.start ?? 0)) / max : 0"
|
||||||
[style.width.%]="max ? (100 * row.median!) / max : 0"
|
[style.width.%]="max ? (100 * row.median!) / max : 0"
|
||||||
></span>
|
></span>
|
||||||
@if (row.low !== undefined && row.high !== undefined) {
|
@if (row.low !== undefined && row.high !== undefined) {
|
||||||
<span
|
<span
|
||||||
class="mark"
|
class="mark"
|
||||||
[style.left.%]="max ? (100 * row.low) / max : 0"
|
[style.left.%]="max ? (100 * ((row.start ?? 0) + row.low)) / max : 0"
|
||||||
></span>
|
></span>
|
||||||
<span
|
<span
|
||||||
class="mark"
|
class="mark"
|
||||||
[style.left.%]="max ? (100 * row.high) / max : 0"
|
[style.left.%]="max ? (100 * ((row.start ?? 0) + row.high)) / max : 0"
|
||||||
></span>
|
></span>
|
||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
@@ -180,4 +182,5 @@ export class RouteCard {
|
|||||||
|
|
||||||
protected readonly mode = signal<'sample' | 'step'>('step');
|
protected readonly mode = signal<'sample' | 'step'>('step');
|
||||||
protected readonly scale = durationMax;
|
protected readonly scale = durationMax;
|
||||||
|
protected readonly chain = chained;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user