7 unstable releases

0.3.0 May 28, 2025
0.2.1 Jan 21, 2023
0.2.0 Dec 29, 2022
0.1.1 Dec 28, 2022
0.0.1 Dec 28, 2022

#573 in Visualization

Download history 1110/week @ 2025-12-28 95/week @ 2026-01-04 149/week @ 2026-01-11 162/week @ 2026-01-18 166/week @ 2026-01-25 83/week @ 2026-02-01 120/week @ 2026-02-08 25/week @ 2026-02-15 587/week @ 2026-02-22 335/week @ 2026-03-01 104/week @ 2026-03-08 71/week @ 2026-03-15 80/week @ 2026-03-22 231/week @ 2026-03-29 282/week @ 2026-04-05 35/week @ 2026-04-12

695 downloads per month
Used in 2 crates

MIT/Apache

12KB
249 lines

The sparklines crate provides a simple way to generate sparklines.


Sparklines

A Rust library for Sparklines.

Implementations

Sparklines exposes two indexer implementations:

  • Algorithmic – computes the tick index using a simple formula.
  • Rangemap – uses a range map to determine which tick to use.
use sparklines::{AlgorithmicSpark, RangemapSpark};

let a = AlgorithmicSpark::default();
let r = RangemapSpark::default();

assert_eq!(a.spark(&[1.0, 2.0, 3.0]), "▁▅█");
assert_eq!(r.spark(&[1.0, 2.0, 3.0]), "▁▄█");

License

Dual licensed under MIT or APACHE 2.0 at your own choice.

Dependencies

~465KB