pub struct RenderOptions {
pub width: Option<f64>,
pub height: Option<f64>,
pub params: Option<ParamValues>,
}Expand description
Render-time knobs for the chartml 5.0 pipeline.
Defaults preserve every legacy behavior: width / height of None
fall through to the spec’s style.width / style.height, then to the
renderer’s default dimensions (e.g. 800×400 for cartesian charts);
params of None matches the legacy “no param overrides” path. Cloning
is cheap — fields are scalar plus a small HashMap.
Fields§
§width: Option<f64>Container width override in CSS pixels. None means “use the spec
or the renderer’s default”.
height: Option<f64>Container height override in CSS pixels. None means “use the spec
or the renderer’s default”.
params: Option<ParamValues>Interactive parameter values (e.g. dropdown selections) layered on
top of params: defaults declared in the YAML. None skips param
overrides entirely.
Implementations§
Source§impl RenderOptions
impl RenderOptions
Sourcepub fn with_size(width: Option<f64>, height: Option<f64>) -> Self
pub fn with_size(width: Option<f64>, height: Option<f64>) -> Self
Build options that only override the canvas size — no param values. Sugar for the common “I just want a different width/height” call site.
Sourcepub fn params_ref(&self) -> Option<&ParamValues>
pub fn params_ref(&self) -> Option<&ParamValues>
Borrow the parameter overrides (if any). Matches the
Option<&ParamValues> shape every internal callsite already uses.
Trait Implementations§
Source§impl Clone for RenderOptions
impl Clone for RenderOptions
Source§fn clone(&self) -> RenderOptions
fn clone(&self) -> RenderOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more