Usar barras comunes en confirmación y renombrar la serie de ingreso del NCI
This commit is contained in:
@@ -202,41 +202,6 @@ export function detail(measure: Measure, r: Reading | undefined, unit = 'pacient
|
||||
|
||||
const pct = (v?: number) => (v === undefined ? '—' : `${(v * 100).toFixed(1)} %`);
|
||||
|
||||
/** A proportion as one bar of 0 to 100 % with its published 95 % interval as the error bar. */
|
||||
export function intervalBar(r: Reading, color?: string): Figure {
|
||||
const score = r.score ?? 0;
|
||||
const known = r.low !== undefined && r.high !== undefined;
|
||||
return {
|
||||
data: [
|
||||
{
|
||||
type: 'bar',
|
||||
orientation: 'h',
|
||||
x: [score],
|
||||
y: [''],
|
||||
width: [0.4],
|
||||
marker: { color: color ?? PALETTE[0] },
|
||||
hovertemplate: `${pct(r.score)}<br>IC 95 %: ${pct(r.low)}–${pct(r.high)}<extra></extra>`,
|
||||
error_x: known
|
||||
? {
|
||||
type: 'data',
|
||||
symmetric: false,
|
||||
array: [r.high! - score],
|
||||
arrayminus: [score - r.low!],
|
||||
color: '#17324d',
|
||||
thickness: 2,
|
||||
width: 10,
|
||||
}
|
||||
: undefined,
|
||||
},
|
||||
],
|
||||
layout: {
|
||||
showlegend: false,
|
||||
margin: { t: 16, r: 16, b: 32, l: 16 },
|
||||
xaxis: { range: [0, 1], tickformat: '.0%' },
|
||||
},
|
||||
} as Figure;
|
||||
}
|
||||
|
||||
/** A donut of one stratifier's counts (initial population), or of numerator vs the rest. */
|
||||
export function donut(
|
||||
measure: Measure,
|
||||
|
||||
Reference in New Issue
Block a user