| Crates.io | zengeld-canvas |
| lib.rs | zengeld-canvas |
| version | 0.1.9 |
| created_at | 2025-12-27 03:14:08.685157+00 |
| updated_at | 2025-12-27 22:42:07.380517+00 |
| description | High-performance SVG chart rendering engine for financial data visualization |
| homepage | https://github.com/zengeld/zengeld-canvas |
| repository | https://github.com/zengeld/zengeld-canvas |
| max_upload_size | |
| id | 2006627 |
| size | 2,504,766 |
High-performance SVG chart rendering engine for financial data visualization
A platform-agnostic rendering library for financial charts. Built in Rust with zero runtime dependencies.
RenderContext trait for any rendering backendcargo add zengeld-canvas
use zengeld_canvas::{Chart, Bar, UITheme};
// Create chart with builder API
let svg = Chart::new(800, 600)
.bars(&bars)
.candlesticks()
.sma(20, "#2196F3")
.rsi(14)
.render_svg();
// With theme preset
let theme = UITheme::cyberpunk();
let svg = Chart::new(800, 600)
.bars(&bars)
.candlesticks()
.background(theme.colors.chart.background)
.colors(theme.colors.series.candle_up_body, theme.colors.series.candle_down_body)
.render_svg();
Light Theme |
High Contrast Theme |
Cyberpunk Theme |
Runtime Custom Theme |
Built-in presets: dark, light, high_contrast, cyberpunk
use zengeld_canvas::{UITheme, RuntimeTheme};
// Static themes (compile-time)
let dark = UITheme::dark();
let light = UITheme::light();
// Runtime themes (modifiable, JSON support)
let mut theme = RuntimeTheme::from_preset("dark").unwrap();
theme.colors.chart.background = "#1a0a2e".to_string();
let json = theme.to_json();
| Category | Count | Examples |
|---|---|---|
| Fibonacci | 11 | Retracement, Fan, Arcs, Circles, Channel, Spiral |
| Lines | 9 | TrendLine, HorizontalLine, Ray, ExtendedLine |
| Annotations | 11 | Text, Callout, PriceLabel, Flag, Table |
| Shapes | 10 | Rectangle, Circle, Ellipse, Triangle, Path |
| Elliott Waves | 5 | Impulse, Correction, Triangle, Combo |
| Patterns | 6 | XABCD, HeadShoulders, Cypher, ThreeDrives |
| Gann | 4 | Fan, Box, Square, SquareFixed |
| Channels | 4 | Parallel, Regression, Disjoint, FlatTopBottom |
| Pitchforks | 4 | Standard, Schiff, Modified, Inside |
| And more... | 32 | Cycles, Projections, Volume, Arrows, Events |
MIT OR Apache-2.0
If you find this library useful, consider supporting development:
| Currency | Network | Address |
|---|---|---|
| USDT | TRC20 | TNxMKsvVLYViQ5X5sgCYmkzH4qjhhh5U7X |
| USDC | Arbitrum | 0xEF3B94Fe845E21371b4C4C5F2032E1f23A13Aa6e |
| ETH | Ethereum | 0xEF3B94Fe845E21371b4C4C5F2032E1f23A13Aa6e |
| BTC | Bitcoin | bc1qjgzthxja8umt5tvrp5tfcf9zeepmhn0f6mnt40 |
| SOL | Solana | DZJjmH8Cs5wEafz5Ua86wBBkurSA4xdWXa3LWnBUR94c |