Skip to content

Render Config

RenderConfig for auto-raster, scale, and output tuning.

Ferrum — a statistical visualization library with a Rust core.

RenderConfig dataclass

Per-chart rendering configuration.

Controls the auto-raster policy that transparently substitutes mark_raster for per-element marks when the mark count exceeds raster_threshold. This prevents multi-million-row charts from producing impractically large SVG output.

For one-off overrides, prefer the raster= keyword on output methods (chart.show(raster=False), chart.save(..., raster=False), chart.to_svg(raster=False)). Use RenderConfig when you want to bake the policy into the chart object itself.

Parameters:

Name Type Description Default
raster_threshold int or None

Mark count above which auto-raster fires. None disables auto-raster entirely.

500_000
raster_behavior ('warn', 'silent', 'error')

"warn" emits a UserWarning when auto-raster substitutes. "silent" substitutes without warning. "error" raises ValueError instead of substituting.

"warn"
raster_aggregate str

Aggregation function for the substituted mark_raster.

"count"
raster_scheme str or None

Colormap (color scheme) for the substituted mark_raster. None defers to the built-in "viridis" default.

None
raster_cmap str or None

Back-compat alias for raster_scheme. Pass at most one of the two; after construction it reads back as the resolved raster_scheme.

None