Expand description
Fluent API for creating charts with an intuitive, readable syntax.
This module provides a streamlined interface for creating charts that reduces boilerplate and makes common chart configurations more accessible. The fluent API maintains all the performance and memory characteristics of the core library while providing a more developer-friendly interface.
§Examples
§Simple Line Chart
use embedded_charts::fluent::Chart;
use embedded_charts::prelude::*;
use embedded_graphics::pixelcolor::Rgb565;
let data = [(0.0, 10.0), (1.0, 20.0), (2.0, 15.0)];
let chart = Chart::line()
.data_from_tuples(&data)
.color(Rgb565::BLUE)
.title("Temperature")
.build()?;§Professional Styled Chart
use embedded_charts::fluent::Chart;
use embedded_charts::prelude::*;
use embedded_graphics::pixelcolor::Rgb565;
let chart: LineChart<Rgb565> = Chart::line()
.preset(ChartPreset::Professional)
.data_from_tuples(&[(0.0, 10.0), (1.0, 20.0)])
.title("Sales Data")
.build()?;§Multi-Series Chart
use embedded_charts::fluent::Chart;
use embedded_charts::prelude::*;
use embedded_graphics::pixelcolor::Rgb565;
let chart: LineChart<Rgb565> = Chart::line()
.series("Temperature", &[(0.0, 22.5), (1.0, 23.1)])
.series("Humidity", &[(0.0, 65.0), (1.0, 68.0)])
.color(Rgb565::BLUE)
.build()?;Modules§
- quick
- Quick creation functions for common chart types
Structs§
- Chart
- Fluent API builder for creating charts
- Fluent
BarChart Builder - Fluent builder for bar charts
- Fluent
Line Chart Builder - Fluent builder for line charts
Enums§
- Chart
Preset - Chart presets for common styling patterns