plotters
plotters copied to clipboard
[BUG] canvas backend stroke width
Describe the bug does anyone make stoke width work?
To Reproduce
I clone this repo,and try to change style from &RED
to let style = Into::<ShapeStyle>::into(&BLUE).stroke_width(100).filled();
in example wasm-demo
but nothing changed. (color changed)
Version Information plotters 0.3
Issue persists on Canvas backends with custom WASM project, might be related to the getter/setter of bindgen implementation?
Adding support to the above comment, directly acting on the attributes seemed to work for me:
let mut style = ShapeStyle::from(RED);
style.stroke_width=4_u32;
I can confirm that the stroke_width
on CanvasBackend
isn't working on the latest main.
I build the Struct from its field directly:
ShapeStyle{
color: BLACK.into(),
filled: true,
stroke_width: 4
}
The value of the stroke_width
doesn't have any effect when using with draw_series
.
Value of 10:
Value of 5:
Value of 1:
(The colors are different because i generate a different palette at each run)
Actually it comes from the Backend code that didn't get released since the fix:
https://github.com/plotters-rs/plotters-canvas/issues/11