insightdock::charts::ChartExporter::save

Write a chart to disk.

Synopsis

Declared in <insightdock/export.h>
static
ChartResult<void>
save(
    Chart& chart,
    std::string const& path,
    ExportOptions opts = {});

Return Value

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.

Parameters

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).

Created with MrDocs