Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saresend/Gust
A small charting/visualization tool and partial vega implementation for Rust
https://github.com/saresend/Gust
graph html rust rust-library visualization
Last synced: about 2 months ago
JSON representation
A small charting/visualization tool and partial vega implementation for Rust
- Host: GitHub
- URL: https://github.com/saresend/Gust
- Owner: saresend
- Created: 2017-10-03T16:20:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-11T13:48:43.000Z (over 5 years ago)
- Last Synced: 2024-10-07T13:18:06.640Z (2 months ago)
- Topics: graph, html, rust, rust-library, visualization
- Language: Rust
- Homepage:
- Size: 1.34 MB
- Stars: 131
- Watchers: 6
- Forks: 9
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-rust-cn - saresend/gust - ci.org/saresend/Gust.svg?branch=master">](https://travis-ci.org/saresend/Gust) (Libraries / Data visualization)
- awesome-rust - saresend/gust - ci.org/saresend/Gust.svg?branch=master">](https://travis-ci.org/saresend/Gust) (Libraries / Data visualization)
- awesome-rust - saresend/gust
- awesome-rust-cn - saresend/gust
- awesome-rust-zh - saresend/gust - [<img src="https://api.travis-ci.org/saresend/Gust.svg?branch=master">](https://travis-ci.org/saresend/Gust) (库 / 数据可视化)
- awesome-rust - saresend/gust - A small charting/visualization tool and partial vega implementation (Libraries / Data visualization)
- awesome-rust - saresend/gust - ci.org/saresend/Gust.svg?branch=master">](https://travis-ci.org/saresend/Gust) (库 Libraries / 数据可视化 Data visualization)
- fucking-awesome-rust - saresend/gust - A small charting/visualization tool and partial vega implementation (Libraries / Data visualization)
- fucking-awesome-rust - saresend/gust - A small charting/visualization tool and partial vega implementation (Libraries / Data visualization)
README
# Gust
A charting library for rust![![Build Status](https://travis-ci.org/saresend/Gust.svg?branch=master)](https://travis-ci.org/saresend/Gust.svg?branch=master)
![Crates.io](https://img.shields.io/crates/v/gust.svg)**Disclaimer**
This is still very much a work in progress! APIs are very unstable and subject to change. Contributions and suggestions are welcomed and greatly appreciated!---
## What is Gust ##
Gust is a small charting crate to make it really easy to build simple interactive data visualizations in rust. It also serves as a partial [Vega](http://vega.github.io/) implementation that will (hopefully) become more complete over time.
---
Gust allows you to render the actual visualizations themselves using D3.js, (meaning they're interactive!) as well as providing the flexibility to directly render the underlying JSON specification for Vega.
### Currently Implementations ###
Currently, Gust supports only 3 charts so far:
1. Bar Charts
2. Stacked Bar Charts
3. Line ChartsMore will be coming soon! If you're interested in contributing your own, just make a pull request. Cheers!
## [Why did you do this in rust?](https://transitiontech.ca/random/RIIR) ##
## Installation ##
` gust = "0.1.4" `## Samples and Sample Usage ##
```rust
use backend::bar_chart::BarChart;
use frontend::write::render_graph;
```### Sample Bar Chart ###
```rust
let mut b = BarChart::new();
let v = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"];
for i in 0..10 {
b.add_data(v[i].to_string(), (i * i * i) as i32);
}
render_graph(&b, FileType::HTML).unwrap();
```
### Result: **gust_build/html/bar_chart.html** ###
![bar chart](./assets/bar_chart.png)### Stacked Bar Chart example ###
```rust
use backend::stacked_bar_chart::StackedBarChart;let mut b = StackedBarChart::new();
for i in 0..10 {
b.add_data(i, i * i, 1);
b.add_data(i, i + i, 0);
}
render_graph(&b, FileType::HTML).unwrap();
```
### Result: **gust_build/html/stacked_bar_chart.html** ###
![stacked bar chart](./assets/stacked_bar.png)## Additional Docs ##
https://docs.rs/gust/0.1.4/gust/## Special Mentions ##
The rendering is all handled by Vega: https://vega.github.io/