MATIH Platform is in active MVP development. Documentation reflects current implementation status.
15. Workbench Architecture
Export & Rendering

Export and Rendering

The BI Workbench export system provides dashboard and chart export to PDF, PNG, and CSV formats using html2canvas for screenshot capture, jsPDF for PDF generation, and the backend RenderApiClient for server-side rendering.


ExportManager

File: frontend/bi-workbench/src/components/advanced/ExportManager.tsx

The export orchestrator that provides export format selection, quality settings, and progress tracking.

Export Formats

FormatLibraryMethod
PNGhtml2canvasClient-side DOM capture
PDFjsPDF + html2canvasClient-side capture + PDF layout
CSVNativeData-only export from widget data
Server PDFRenderApiClientServer-side headless rendering

Chart Export Utilities

File: frontend/bi-workbench/src/components/charts/export.ts

Provides chart-specific export functions:

export async function exportChartToPNG(chartElement: HTMLElement): Promise<Blob>;
export async function exportChartToSVG(vegaSpec: VegaLiteSpec): Promise<string>;

useExport Hook

From the shared library, the useExport hook provides:

const { exportToPdf, exportToPng, exportToCsv, isExporting } = useExport();