diff --git a/src/app/features/indicadores/indicadores-confirmacion-citologia.ts b/src/app/features/indicadores/indicadores-confirmacion-citologia.ts index 1cbe087..824db95 100644 --- a/src/app/features/indicadores/indicadores-confirmacion-citologia.ts +++ b/src/app/features/indicadores/indicadores-confirmacion-citologia.ts @@ -312,10 +312,13 @@ export function donaExpandible(m: ModeloConfirmacion, sel: SeleccionConfirmacion labels: m.grupos.map(g => escapar(g.etiqueta)), text: rotulos(interior, m.grupos.map(g => g.etiqueta), false), textfont: { color: '#FFFFFF' }, customdata: custom(interior), marker: { colors: m.grupos.map(g => rgba(g.color, sel.categoria ? .3 : 1)), line: { color: p.background, width: 2 } } }, + // Outer labels go outside the ring with a leader line, at full size; automargin makes room for them and + // shrinks the three rings together, so they stay concentric. { ...comun, ...hover, name: 'categorias', values: exterior, hole: .74, domain: { x: [0, 1], y: [0, 1] }, - labels: m.grados.map(g => escapar(g.etiqueta)), text: rotulos(exterior, m.grados.map(g => g.etiqueta), true), - textfont: { size: 11 }, customdata: custom(exterior), + labels: m.grados.map(g => escapar(g.etiqueta)), textposition: 'outside', automargin: true, + text: exterior.map((v, i) => v ? escapar(m.grados[i].etiqueta) + '
' + shareText(v, exterior.reduce((s, n) => s + n, 0)) : ''), + textfont: { size: 12, color: p.text }, customdata: custom(exterior), marker: { colors: m.grados.map(g => rgba(g.color, sel.categoria && g.id !== sel.categoria ? .3 : 1)), line: { color: p.background, width: 2 } } }, - ], layout: { autosize: true, height: 400, margin: { t: 10, l: 10, r: 10, b: 10 }, paper_bgcolor: p.background, font: { color: p.text } }, + ], layout: { autosize: true, height: 440, margin: { t: 30, l: 30, r: 30, b: 30 }, paper_bgcolor: p.background, font: { color: p.text } }, config: { displayModeBar: false } }; }