pub async fn render_to_png_with_background_async(
chartml: &ChartML,
yaml: &str,
width: u32,
height: u32,
density: u32,
background: [u8; 3],
) -> Result<Vec<u8>, RenderError>Expand description
Render a ChartML YAML spec to PNG bytes (async) with an explicit canvas background color.
Identical to render_to_png_async except the pixmap is filled with
background instead of white. See render_to_png_with_background.
§Arguments
chartml— configured ChartML instance with renderers and transform middleware registeredyaml— ChartML YAML specification stringwidth— chart width in CSS pixelsheight— chart height in CSS pixelsdensity— DPI (72 = 1x, 144 = 2x for PDF)background— canvas fill color as[r, g, b]