Chart builder: data-aware defaults, one-click hint fixes, canvas preview, fullscreen modal

This commit is contained in:
2026-06-10 17:10:18 +03:00
parent 68a044752f
commit 62d0697f0e
20 changed files with 1133 additions and 73 deletions
+13
View File
@@ -127,6 +127,19 @@ describe('sort / stack', () => {
});
});
describe('applyWarningFix', () => {
test('applies a hint fix to the working config (actionable hints, §06)', () => {
const id = seedDataset('Nums', [
{ a: 1, b: 2 },
{ a: 3, b: 4 },
]);
cb().init(id);
cb().setMark('bar'); // two quantitative axes on a bar → "scatter" hint with a fix
cb().applyWarningFix({ label: 'Switch to Point', apply: (c) => ({ ...c, mark: 'point' }) });
expect(cb().config.mark).toBe('point');
});
});
describe('createSnippet', () => {
test('builds a linked snippet, activates it, and resets the builder', () => {
const id = seedDataset('Sales', [