charming icon indicating copy to clipboard operation
charming copied to clipboard

Allowing not specify size to WasmRenderer

Open MikhailNazarov opened this issue 8 months ago • 0 comments

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();

initial chart width set automatic to full width:

image image

MikhailNazarov avatar Jun 18 '24 09:06 MikhailNazarov