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
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
pub extern crate plotters_backend;
pub use plotters::chart::ChartBuilder;
pub use plotters::drawing::DrawingArea;
pub use plotters_backend::DrawingBackend;
Modules
- data point sampling
Structs
Enums
- Indicates that some error occurred within the Iced backend
Traits
- Chart View Model
- graphics renderer