https://github.com/jlyonsmith/stacked_bar_chart
Create stacked bar charts
https://github.com/jlyonsmith/stacked_bar_chart
Last synced: 5 months ago
JSON representation
Create stacked bar charts
- Host: GitHub
- URL: https://github.com/jlyonsmith/stacked_bar_chart
- Owner: jlyonsmith
- License: unlicense
- Created: 2024-05-16T15:03:59.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T02:11:28.000Z (about 2 years ago)
- Last Synced: 2025-06-19T22:55:57.157Z (about 1 year ago)
- Language: Rust
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stacked Bar Chart
[](https://github.com/jlyonsmith/stacked_bar_chart/blob/main/coverage.json)
[](https://crates.io/crates/stacked_bar_chart)
[](https://docs.rs/stacked_bar_chart)
This is a stacked bar chart generator. You provide a [JSON5](https://json5.org/) file with data and it generates an SVG file. You can convert the SVG to PNG or other bitmap formats with the [resvg](https://crates.io/crates/resvg) tool.
Here is an example of the output:

Install with `cargo install stacked_bar_chart`. Run with `stacked-bar-chart`.
Features of the tool include:
- Automatic scaling of the Y axis labels
- Automatic generation of the legend
- Automatic selection of bar colors to maximize contrast
- Uses SVG classes to enable easy changes to the generate graphs