pub fn element_to_svg(element: &ChartElement, width: f64, height: f64) -> StringExpand description
Convert a ChartElement tree to an SVG string.
The root element should be a ChartElement::Svg. If it’s a Div (e.g. metric cards),
the output wraps it in an SVG with a <foreignObject>.