How dataviz-rs/dataviz works
DataViz is a multi-language plotting library. Users build figures and charts through a language-facing API; the plotting core represents charts as a backend-independent scene, then serializes or rasterizes it for output. The map preserves documented grammar, interactive/live, domain-chart, accessibility, and language-binding capabilities. Some branches are documented but their internal calls were not sampled, so those links are dashed; edges for sampled core rendering stages cite the module documentation.
Main entry points: figure.rs Figure and axes · axes.rs Axes and series · output.rs File and pixel output · scene.rs Drawing scene
Components 24
Language interfaces
- Rust API
src/lib.rs - Python API
python/python/dataviz/pyplot.py - JavaScript API
wasm/src/lib.rs - C/C++ API
capi/src/lib.rs - MCP server
mcp/src/main.rs
Chart construction
- Figure and axes
src/plot/figure.rs - Axes and series
src/plot/axes.rs - Axis mapping
src/plot/axis.rs - Graphics grammar
src/plot/grammar.rs - Data and tables
src/plot/data.rs
Plot capabilities
- Domain charts
src/plot/series - Maps and geography
src/plot/geo.rs - 3D charts
src/plot/series/three_d.rs - Accessibility
src/plot/a11y.rs
Rendering and output
- Drawing scene
src/plot/scene.rs - CPU rasterizer
src/plot/raster.rs - GPU rasterizer
src/plot/gpu.rs - File and pixel output
src/plot/output.rs - Interactive HTML
src/plot/html.rs - Text layout
src/plot/text.rs
Interaction and live
- Interactive windows
src/plot/window.rs - Window interaction
src/plot/interact.rs - Animation and live
src/plot/anim.rs
Other components
- Plot users
Connections 27
- Plot users → Rust API: use library
- Plot users → Python API: use pyplot
- Plot users → JavaScript API: use browser API
- Plot users → C/C++ API: use bindings
- Plot users → MCP server: request tools
- Rust API → Figure and axes: create figures
- Python API → Figure and axes: create plots
- JavaScript API → Figure and axes: create plots
- C/C++ API → Figure and axes: create figures
- MCP server → Figure and axes: create plots
- Figure and axes → Axes and series: provide axes
- Axes and series → Axis mapping: map coordinates
src/plot/axes.rs - Axes and series → Drawing scene: draw charts
src/plot/mod.rs - Graphics grammar → Axes and series: build charts
- Data and tables → Axes and series: supply data
- Domain charts → Axes and series: provide chart types
src/plot/series/engineering.rs - Maps and geography → Axes and series: provide map charts
src/plot/axes.rs - 3D charts → Drawing scene: draw 3D scene
src/plot/series/three_d.rs - Accessibility → Figure and axes: describe charts
src/plot/a11y.rs - Drawing scene → File and pixel output: render scene
src/plot/mod.rs - File and pixel output → CPU rasterizer: rasterize pixels
src/plot/output.rs - File and pixel output → GPU rasterizer: use GPU backend
src/plot/output.rs - File and pixel output → Interactive HTML: write HTML
src/plot/mod.rs - File and pixel output → Text layout: layout text
src/plot/output.rs - Figure and axes → Interactive windows: show window
- Interactive windows → Window interaction: handle input
- Figure and axes → Animation and live: stream and animate
src/plot/anim.rs