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.1"
iced = { version = "0.3", features = ["canvas", "tokio"] }
plotters="0.3"
Showcase
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;
Enums
Indicates that some error occurred within the Iced backend
Traits
Chart View Model
Type Definitions
Chart container, turns Chart
s to [Widget
]s