Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing not specify size to WasmRenderer #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MikhailNazarov
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant