You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm using seed for a frontend project, and want to use plotters to render graphs.
Seed doesn't allow direct access to the elements that it creates, so drawing to a canvas through seed doesn't work.
Right now I'm using plotlib for generating graphs. I render an svg to a buffer and convert it into a blob. Then I create an <image> that points to the blob. This doesn't work in plotters because the svg and bitmap backends are completely disabled for wasm.
The easiest fix is to simply allow the in memory targets for the svg and bitmap backends in wasm and only disable the file target.
Another fix might be too create a backend specific to seed, or to have some way of accepting a canvas from seed. I think this might be a better route in the long term, but I'm not exactly sure how it would work.
The text was updated successfully, but these errors were encountered:
The WASM compile flag is too strict, I already fixed this in version 0.2.2. Feel free to play with it! It should come with SVG support which should be able to do the thing you describe.
Unfortunately, bitmap backend requires font rendering library, which doesn't supported by WASM yet. So I believe it's not easy to get bitmap backend.
For the seed support, currently we pass an element id for the canvas object. But I am planning to make it accept the canvas object directly as well, after that, I think it would be able to make the seed's canavs work.
Closing this issue, and open another issue #17 tracking the last one.
Thanks for feedback and hope that will help. Feel free to reopen it if you have any concern.
Hello, I'm using seed for a frontend project, and want to use plotters to render graphs.
Seed doesn't allow direct access to the elements that it creates, so drawing to a canvas through
seed
doesn't work.Right now I'm using
plotlib
for generating graphs. I render an svg to a buffer and convert it into a blob. Then I create an<image>
that points to the blob. This doesn't work inplotters
because the svg and bitmap backends are completely disabled for wasm.The easiest fix is to simply allow the in memory targets for the svg and bitmap backends in wasm and only disable the file target.
Another fix might be too create a backend specific to seed, or to have some way of accepting a canvas from seed. I think this might be a better route in the long term, but I'm not exactly sure how it would work.
The text was updated successfully, but these errors were encountered: