Skip to main content

render_svg

Function render_svg 

Source
pub fn render_svg(
    spec: &ChartSpec,
    width: u32,
    height: u32,
    text_px: u32,
) -> String
Expand description

Render spec to an SVG string of the given dimensions, its text text_px high. Drawing errors fall back to a minimal SVG with the chart title so a broken chart never fails a page render.