Clarify CaCu and CaMa chart labels
This commit is contained in:
@@ -125,7 +125,7 @@ export function scenarioBars(
|
||||
: catalog.categories.reduce((t, c) => t + n(s, c.code), 0),
|
||||
);
|
||||
const y = order
|
||||
? scenarios.map((s, i) => `${label(s)}<br>n = ${totals[i]}`)
|
||||
? scenarios.map((s, i) => `${label(s)}<br>${options.ofAll ? 'Reportes' : 'Pacientes'}: ${totals[i]}`)
|
||||
: scenarios.map(label);
|
||||
return {
|
||||
data: catalog.categories.map((c) => ({
|
||||
@@ -304,9 +304,11 @@ export function shareDonut(r: Reading, catalog: Catalog, center: string): Figure
|
||||
line: { color: '#FFFFFF', width: 2 },
|
||||
},
|
||||
// an empty slice says nothing (its label would sit on its neighbours')
|
||||
texttemplate: values.map((v) => (v ? '%{label}<br>%{percent}' : '')),
|
||||
texttemplate: values.map((v) =>
|
||||
v ? `%{label}<br>%{percent} del total de ${center}` : '',
|
||||
),
|
||||
textposition: 'outside',
|
||||
hovertemplate: '%{label}<br>%{value} (%{percent})<extra></extra>',
|
||||
hovertemplate: `%{label}<br>%{value} (%{percent} del total de ${center})<extra></extra>`,
|
||||
} as Partial<Plotly.Data>,
|
||||
],
|
||||
layout: {
|
||||
|
||||
Reference in New Issue
Block a user