Write a chart to disk.
<insightdock/export.h>
static
ChartResult<void>
save(
Chart& chart,
std::string const& path,
ExportOptions opts = {});
ChartResult<void> — true on success; on failure, ChartResult::error() distinguishes ChartError::BadPath, ChartError::RenderFailure, ChartError::EncodeFailure, ChartError::PdfUnsupported, ChartError::InvalidInput, and ChartError::VectorUnsupported. Contextually converts to bool so if (!ChartExporter::save(...)) still compiles.
| Name | Description |
|---|---|
| chart | Chart to render and save. |
| path | Output file path; extension selects format if opts.format is default. |
| opts | Export options (quality, supersampling, PDF backend). |