plotters-rs / plotters-wasm-demo

Plotters + WebAssembly Example
43 stars 15 forks source link

Build error: variant or associated item not found in `FontTransform` #1

Open kongchenglc opened 2 years ago

kongchenglc commented 2 years ago
image
JuliDi commented 2 years ago

Something wrong with the git version that is linked. You can use the one from crates.io, though. In your Cargo.toml file you can change the dependencies to

[dependencies]
plotters = "0.3.2"
wasm-bindgen = "0.2.62"
wee_alloc = "0.4.5"
web-sys = { version = "0.3.39", features = ["HtmlCanvasElement"] }
plotters-canvas = "0.3.0"

which fixed the issue for me.

aaraney commented 2 years ago

I had the same issue and @JuliDi's solution worked for me too.

Lwfrancisco commented 1 year ago

+1 for @JuliDi 's solution.

spookyvision commented 1 year ago

another option is to use this open PR instead:

[dependencies.plotters-canvas]
git = "https://github.com/AE1020/plotters-canvas"
branch = "revert-rotateangle"
jaredmcqueen commented 1 year ago

@38 I know you are looking for participants - I can help get the canvas stuff sorted out so that it'll at least compile again natively without these workarounds

Wafol commented 1 year ago

+1 for @JuliDi 's solution.