Export widget data as CSV and chart as image #28
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
DialectTheme.baseOptions(...)sets:which disables ApexCharts' built-in toolbar — and with it the built-in PNG / SVG / CSV export. That was the right call visually (the default toolbar does not match the Dialect design system), but it means the dashboard currently offers no export at all.
Proposal
Two options, not mutually exclusive:
StreamResourcebehind anAnchoror menu action, generated from the same data the widget is rendering. Clean, testable, no client roundtrip.dataURI()on the client via a@ClientCallableroundtrip and hand the result back as a download.Either way the entry point should be the per-widget action menu rather than re-enabling the unstyled ApexCharts toolbar.
Acceptance criteria
chart.csv.Depends on
#27 (per-widget action menu, as the entry point), #20 (CSV needs the underlying data, not the rendered options map).
Scope
Small to medium. CSV first; image export is optional follow-up.
PR: #38
CSV-Export liegt im Per-Widget-Aktionsmenü („Als CSV exportieren"), serverseitig über einen
DownloadHandler— die Daten werden erst beim Klick gelesen, also inkl. aktivem globalem Filter. Dateiname = Widget-Titel + Zeitraum (umsatz-entwicklung-halbjahr.csv). ApexCharts-Toolbar bleibt aus, Chart-Styling unverändert.Der Bild-Export (
dataURI()) ist nicht dabei — das Issue nennt ihn optionalen Follow-up; kann bei Bedarf als eigenes Issue nachgezogen werden.Tests:
./mvnw test67/67 grün, inkl. echtem Browser-Download im Playwright-E2E.