Embedded Charts
A production-ready, high-performance chart library for embedded systems and resource-constrained environments. Built on embedded-graphics, it provides comprehensive charting capabilities with full no_std support.
✨ Key Features
- 🎯 Production Ready: Memory-efficient, optimized for resource-constrained systems
- 📊 Complete Chart Suite: Line, bar, pie, donut, gauge, scatter, and smooth curve charts
- 🌊 Advanced Interpolation: Cubic spline, Catmull-Rom, and Bezier curve smoothing
- 🚀 Real-time Streaming: Live data updates with smooth animations and transitions
- 🎨 Professional Styling: Themes, gradient fills, pattern fills, and customizable appearance
- 📈 Smart Data Handling: Logarithmic scales, data aggregation, LTTB downsampling
- 🏗️ Dashboard Layouts: Grid-based composition for multi-chart displays
- 💾 Memory Efficient: Static allocation, configurable capacity, zero heap usage
- 🔧 Fully Configurable: Modular features, extensive customization options
- 🌐 Universal Compatibility: Works with any display supporting embedded-graphics
🎨 Visual Showcase
Professional Theme Collection
Complete collection of professional color themes optimized for different display types and use cases
Chart Type Gallery
Advanced Styling & Layouts
Real-time Animation Demonstrations
🔄 Real-time Data Streaming with Ring Buffers
The library includes a high-performance ring buffer implementation for efficient real-time data streaming:
use *;
use ;
// Create ring buffer with 100-point capacity
let mut data_buffer: = new;
// Configure for real-time streaming
let config = RingBufferConfig ;
let mut streaming_buffer: = with_config;
// Set up event handler
streaming_buffer.set_event_handler;
// Stream data through the buffer
loop
Key Features:
- 🚀 Zero allocation after initialization
- 📊 Chronological iteration even with wrap-around
- 📈 Built-in statistics: moving average, rate of change, downsampling
- 🎯 Event-driven architecture with configurable overflow behavior
- 📍 Automatic bounds tracking for dynamic axis scaling
- 🔧 No unsafe code - memory safe by design
🚀 Quick Start
Installation
Add to your Cargo.toml:
[]
= "0.3.0"
= "0.8"
Simple Line Chart (30 seconds to working chart)
use *;
use ;
Smooth Curve Chart (Advanced Interpolation)
use *;
use CurveChart;
use InterpolationType;
Professional Dashboard (Multi-series with Legend)
use *;
Gradient Fills Example
use *;
use ;
Chart Animations Example
use *;
use ;
Dashboard Layout Example
use *;
use ;
Data Aggregation Example
use *;
use ;
Embedded System Usage (no_std)
use *;
use ;
!
📊 Complete Feature Matrix
| Chart Type | Status | Key Features |
|---|---|---|
| Line Charts | ✅ | Multi-series, markers, area filling, smooth animations |
| Smooth Curve Charts | ✅ | Cubic spline, Catmull-Rom, Bezier interpolation, configurable tension |
| Bar Charts | ✅ | Vertical/horizontal, stacked, gradient fills, pattern support |
| Pie Charts | ✅ | Full circles, custom colors, professional styling |
| Donut Charts | ✅ | Percentage-based sizing, helper methods, center content |
| Gauge Charts | ✅ | Semicircle/full, threshold zones, needle animations |
| Scatter Charts | ✅ | Bubble charts, collision detection, clustering |
| System Feature | Status | Description |
|---|---|---|
| Real-time Animation | ✅ | Smooth transitions, easing functions, streaming data |
| Ring Buffer Streaming | ✅ | High-performance circular buffers with chronological ordering |
| Gradient Fills | ✅ | Linear/radial gradients, pattern fills, multi-stop support |
| Dashboard Layouts | ✅ | Grid-based composition, flexible positioning, presets |
| Advanced Scales | ✅ | Logarithmic, custom transformations, auto-tick generation |
| Data Aggregation | ✅ | LTTB downsampling, statistical aggregation, memory-efficient |
| Professional Styling | ✅ | Themes, gradients, patterns, advanced typography |
| Memory Management | ✅ | Static allocation, configurable capacity, zero heap |
| no_std Support | ✅ | Full embedded compatibility, minimal dependencies |
| Math Backends | ✅ | Float, fixed-point, integer-only, CORDIC |
| Display Compatibility | ✅ | OLED, TFT, E-Paper, custom displays |
🛠️ Configuration Guide
Feature Flags
Configure the library precisely for your needs:
[]
= {
version = "0.3.0-dev",
= false,
= [
# Target environment
"std", # or "no_std" for embedded
# Chart types (pick what you need)
"line", # Line charts
"bar", # Bar charts
"pie", # Pie and donut charts
"scatter", # Scatter and bubble charts
"gauge", # Gauge and dial charts
# Math backend (choose one)
"floating-point", # Full floating-point (recommended)
"fixed-point", # Fixed-point arithmetic
"integer-math", # Integer-only (most constrained)
# Enhanced features
"animations", # Real-time animations
"color-support", # Professional color palettes
"smooth-curves", # Advanced curve interpolation (cubic spline, Catmull-Rom, Bezier)
]
}
Memory Configuration Examples
// Ultra-constrained: 32 data points, minimal features
type SmallSeries = ;
// Standard embedded: 256 data points
type StandardSeries = ;
// High-capacity: 1024 data points for data logging
type LargeSeries = ;
🎯 Use Cases & Examples
📊 IoT Sensor Monitoring
Perfect for displaying sensor data on embedded displays:
- Temperature/humidity tracking
- Environmental monitoring stations
- Industrial sensor networks
- Smart home dashboards
🏭 Industrial HMI
Human-Machine Interface applications:
- Real-time process monitoring
- Equipment status dashboards
- Production line analytics
- Quality control charts
🏥 Medical Devices
Medical and health monitoring:
- Vital sign displays
- Patient monitoring systems
- Diagnostic equipment interfaces
- Portable health devices
🚗 Automotive Displays
Vehicle dashboard and infotainment:
- Instrument clusters
- Performance monitoring
- Navigation route display
- Vehicle diagnostics
🔬 Advanced Examples
Real-time Data Streaming
use *;
Multi-Chart Dashboard
use *;
Custom Styling and Themes
use *;
🛡️ Error Handling & Debugging
The library provides comprehensive error handling:
use *;
🚀 Performance & Optimization
Memory Usage Guidelines
| Configuration | Memory Usage | Use Case |
|---|---|---|
| Minimal (32 points, integer-math) | ~1KB | Ultra-constrained MCUs |
| Standard (256 points, floating-point) | ~8KB | Typical embedded systems |
| Professional (1024 points, all features) | ~32KB | High-end embedded systems |
Performance Optimization Tips
-
Choose appropriate math backend:
integer-math: Fastest, most constrainedfixed-point: Good balance of speed and precisionfloating-point: Most features, moderate performance
-
Optimize data series size:
- Use smallest capacity that meets your needs
- Consider sliding windows for continuous data
-
Minimize feature flags:
- Only enable chart types you actually use
- Disable animations on slow displays
📚 Documentation & Resources
- 📖 API Documentation - Complete API reference
- 🎯 Examples Collection - 20+ working examples
- 📋 Feature Guide - Comprehensive feature documentation
- 🔄 Changelog - Version history and updates
- 🤝 Contributing Guide - How to contribute
Example Categories
- Basic Charts: Simple chart creation and styling
- Interactive: Multi-series charts with legends and animations
- Real-time: Streaming data and live updates
- Embedded: no_std examples for constrained systems
🤝 Contributing
We welcome contributions! The library is actively maintained with:
- ✅ Comprehensive test suite (95%+ coverage)
- ✅ CI/CD pipeline with 17 feature combination tests
- ✅ Documentation examples with visual verification
- ✅ Performance benchmarks for embedded targets
To contribute:
- Check existing issues
- Read the Contributing Guide
- Submit a pull request with tests and documentation
🏆 Project Status
This library is production-ready and actively used in:
- Industrial IoT devices
- Medical monitoring equipment
- Automotive dashboard systems
- Smart home controllers
Stability Guarantees
- API Stability: Semantic versioning with clear upgrade paths
- Memory Safety: No unsafe code, comprehensive testing
- Performance: Optimized for resource-constrained environments
- Compatibility: Maintained compatibility with embedded-graphics ecosystem
📄 License
This project is dual-licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or opensource.org/licenses/MIT)
at your option.
🙏 Acknowledgments
- Built on the excellent embedded-graphics foundation
- Inspired by the embedded Rust community's needs for high-quality visualization
- Special thanks to all contributors, testers, and early adopters