Crate plotters_iced

source ·
Expand description

The Plotters Iced backend, for both native and wasm applications.

This is an implementation of a Iced backend for Plotters.

This backend has been optimized as for speed. Note that some specific plotting features supported in the Bitmap backend may not be implemented there, though.

See the examples for more details.

How to install?

Include plotters-iced in your Cargo.toml dependencies:

[dependencies]
plotters-iced = "0.9"
iced = { version = "0.10", features = ["canvas", "tokio"] }
plotters="0.3"

Showcase

CPU Monitor Example

WASM Example

Example

struct MyChart;
impl Chart<Message> for MyChart {
   type State = ();
   fn build_chart<DB:DrawingBackend>(&self, state: &Self::State, builder: ChartBuilder<DB>) {
      //build your chart here, please refer to plotters for more details
   }
}

impl MyChart {
   fn view(&mut self)->Element<Message> {
      ChartWidget::new(self)
      .width(Length::Unit(200))
            .height(Length::Unit(200))
            .into()
   }
}

See the examples for more details.

Re-exports

Modules

Structs

  • Chart container, turns Charts to [iced_native::Widget]s Chart container, turns Charts to [Widget]s

Enums

  • Indicates that some error occurred within the Iced backend

Traits