Now you need to specify the exact size of the chart.
This does not allow you to fill all the available space and the resize() method without parameters also does not change the size when the parent is resized.
If you do not set the width, for example, then the chart adjusts to the width of the parent and when it is resized, you can call resize() and chart fits parent.
Added new function new_opt for constructing WasmRenderer with optional arguments.
Function new() also working.
let renderer = WasmRenderer::new_opt(None, Some(300));
renderer.render("chart", &chart).unwrap();
Now you need to specify the exact size of the chart. This does not allow you to fill all the available space and the resize() method without parameters also does not change the size when the parent is resized.
If you do not set the width, for example, then the chart adjusts to the width of the parent and when it is resized, you can call resize() and chart fits parent.
Added new function new_opt for constructing WasmRenderer with optional arguments. Function new() also working.
initial chart width set automatic to full width: