Expand description
§d3rs - D3.js-inspired plotting library for GPUI
A Rust plotting library that brings D3.js concepts to GPUI using idiomatic Rust patterns.
§Features
- Scales: Linear, log, power, symlog, quantize, quantile, threshold scales
- Axes: Four orientations (Top, Right, Bottom, Left) with customizable formatting
- Colors: RGB/HSL with interpolation and categorical schemes
- Shapes: Bars, lines, areas, scatter plots, arcs, pies, symbols, stacks
- Curves: Linear, step, basis, cardinal, catmull-rom, monotone, natural
- Grids: Dots and lines at tick intersections
- Legends: Configurable position and formatting
- Arrays: Statistics, search, binning, transformations (d3-array)
- Interpolation: Numeric, color (HSL/LAB/HCL/Cubehelix), transform, string, zoom (d3-interpolate)
- Contours: Marching squares, density estimation (d3-contour)
- Fetch: CSV/TSV/JSON parsing utilities (d3-fetch)
- Format: Number formatting with SI prefixes, locales (d3-format)
§Example
use d3rs::scale::{LinearScale, Scale};
let scale = LinearScale::new()
.domain(0.0, 100.0)
.range(0.0, 500.0);
let output = scale.scale(50.0); // 250.0Modules§
- array
- Array manipulation and data utilities
- axis
- Axis module for rendering chart axes
- brush
- Brush module for rectangle selection (d3-brush inspired)
- color
- Color module for color representation and manipulation
- contour
- Contour generation module
- delaunay
- d3-delaunay - Delaunay triangulation and Voronoi diagrams
- ease
- Easing functions (d3-ease)
- fetch
- Data fetching and parsing utilities
- format
- Number formatting module (d3-format)
- geo
- d3-geo - Geographic projections and paths
- grid
- Grid module for rendering background grids
- interpolate
- Interpolation utilities
- legend
- Legend module for chart legends
- polygon
- Polygon utilities (d3-polygon)
- prelude
- Prelude module for convenient imports
- quadtree
- QuadTree module for spatial indexing (d3-quadtree inspired)
- random
- Random number generators (d3-random)
- scale
- Scale module for mapping data domains to visual ranges
- shape
- Shape rendering module
- surface
- 3D Surface plot module for isometric and projected surface visualization
- text
- Vector font text rendering
- time
- Time utilities (d3-time)
- timer
- d3-timer - Animation Timing Module
- transition
- d3-transition - Animation Transitions for GPUI
- zoom
- Zoom module for chart zoom state management (d3-zoom inspired)