20261118 colorfix front

Cambio de los colores de las graficas para tener una mejor armonía de colores y evitar el uso de la unión de colores que interpreten ideas falsas
This commit is contained in:
Manuel Aurrecoechea Castillo
2026-11-18 15:16:13 -06:00
parent 439a039ff4
commit 58ff3870be
11 changed files with 303 additions and 40 deletions
@@ -19,7 +19,9 @@ describe('selección local segura de barras generales C2', () => {
it('grupo conserva hijos, etiquetas, orden, colores y unidad sin cambiar el denominador', () => {
const data = c2Fixture(), source = bars(data), before = structuredClone({ data, source });
const view = c2GeneralSelection(source, data, selection, local)!;
expect(view.figure.data[0]).toMatchObject({ x: [3, 1], y: ['B', 'C'], marker: { color: ['#B8433A', '#7184A2'] } });
const marker = source.data[0]['marker'] as { color: string[] }, labels = source.data[0]['y'] as string[];
expect(view.figure.data[0]).toMatchObject({ x: [3, 1], y: ['B', 'C'],
marker: { color: ['B', 'C'].map(label => marker.color[labels.indexOf(label)]) } });
expect(view.figure.layout['yaxis']).toMatchObject({ categoryarray: ['C', 'B'] });
expect(view.figure.layout['meta']).toMatchObject({ denominator: 10, period: local.period, unit: 'paciente' });
expect(view.context).toContain('G2, 2025-S2');