feat(ui): incorporar selector de figuras KPI y fijacion de indicadores
This commit is contained in:
@@ -43,3 +43,17 @@ it('acepta extremos canónicos de año', () => {
|
||||
expect(parsePeriodos('0001-S1,9999-S2')).toEqual(['0001-S1', '9999-S2']);
|
||||
expect(parsePeriodos('0001-01,9999-12', 'mes')).toEqual(['0001-01', '9999-12']);
|
||||
});
|
||||
|
||||
it.each([
|
||||
[{ type: 'bar', orientation: 'h', x: [null], y: ['grupo'] }, true],
|
||||
[{ type: 'bar', orientation: 'h', x: [0], y: ['grupo'] }, false],
|
||||
[{ type: 'bar', y: [null], x: ['grupo'] }, true],
|
||||
[{ type: 'bar', y: [0] }, false],
|
||||
[{ type: 'pie', values: [null] }, true],
|
||||
[{ type: 'pie', values: [0] }, false],
|
||||
[{ type: 'pie', values: { bdata: 'AAAA' } }, false],
|
||||
[{ type: 'bar', orientation: 'unknown', y: [null] }, false],
|
||||
[{ type: 'bar', y: ['unknown'] }, false],
|
||||
])('interpreta magnitudes de forma conservadora %j', (trace, empty) => {
|
||||
expect(hasNoVisibleValues({ data: [trace as Record<string, unknown>], layout: {} })).toBe(empty);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user