Joylei / plotters-iced

:chart_with_upwards_trend: Iced backend for Plotters
MIT License
141 stars 27 forks source link

State? #40

Open rscarson opened 1 month ago

rscarson commented 1 month ago

The state parameter of build_chart does not appear to do anything (state always has the value of State::default) - and none of the example show it's use (_state in every single example)

Does that parameter work?

Joylei commented 1 month ago

The state parameter of build_chart does not appear to do anything (state always has the value of State::default) - and none of the example show it's use (_state in every single example)

Does that parameter work?

It should work, but its usage is limited. The widget tree will have the ownership of the state, you cannot update the state directly, unless you are handling UI events.