MCPcopy Create free account
hub / github.com/Rello/analytics / snapshot

Function snapshot

tests/playwright/chart_export.js:31–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 chart.setDatasetVisibility(1, false);
30 chart.update();
31 const snapshot = () => JSON.stringify({
32 width: chart.canvas.width, height: chart.canvas.height,
33 ratio: chart.currentDevicePixelRatio, hidden: chart.isDatasetVisible(1),
34 min: chart.scales.y.min, max: chart.scales.y.max,
35 image: chart.toBase64Image(),
36 });
37 const before = snapshot();
38 const svg = await OCA.Analytics.Report.renderChartSvg(chart);
39 const parsed = new DOMParser().parseFromString(svg, 'image/svg+xml');

Callers 1

chart_export.jsFile · 0.85

Calls 2

isDatasetVisibleMethod · 0.80
toBase64ImageMethod · 0.80

Tested by

no test coverage detected