Crate plotters_iced[][src]

Expand description

The Plotters Iced backend.

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.1"
iced = { version = "0.3", features = ["canvas", "tokio"] }
plotters="0.3"

Showcase

CPU Monitor Example

Example

struct MyChart;
impl Chart<Message> for MyChart {
   fn build_chart<DB:DrawingBackend>(&self, 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

pub extern crate plotters_backend;
pub use plotters::chart::ChartBuilder;
pub use plotters::drawing::DrawingArea;
pub use plotters_backend::DrawingBackend;

Structs

Chart container, turns Charts to Widgets

Traits

Chart View Model