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
| Format | Library | Method |
|---|---|---|
| PNG | html2canvas | Client-side DOM capture |
jsPDF + html2canvas | Client-side capture + PDF layout | |
| CSV | Native | Data-only export from widget data |
| Server PDF | RenderApiClient | Server-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();