Fast terminal charts in Rust. A YouPlot alternative.
cargo install --path tchart
# or with nix
nix run github:Uzaaft/tchart -- bar < data.tsvecho -e "A\t10\nB\t20\nC\t15" | tchart bar
tchart line data.tsv
cat data.csv | tchart scatter -d comma -w 60 --height 20
# streaming mode
tail -f metrics.log | tchart line -pbar- horizontal bar chartline- line chart with braillescatter/s- scatter plothist- histogramdensity/d- 2D density heatmapbox- box-and-whisker plotcount/c- count values and plot as bar
-d, --delimiter t(ab), c(omma), s(pace), w(hitespace)
-H, --header skip first row
-t, --title chart title
-w, --width plot width (default: 40)
--height plot height (default: 15)
--color enable/disable colors
-p, --progress streaming mode
Histogram: -n, --bins (default: 10)
Density: --xbins, --ybins (default: 10)
~/.config/tchart/config.yaml or .tchartrc:
delimiter: tab
width: 60
height: 20
color: trueuse tchart_lib::{Barplot, BarEntry, BarplotConfig, Lineplot};
let entries = [
BarEntry::new("A", 10.0),
BarEntry::new("B", 20.0),
];
let barplot = Barplot::new(&entries, BarplotConfig::default());
println!("{}", barplot.render());
let mut lineplot = Lineplot::new(40, 10);
lineplot.plot_line(&[1.0, 5.0, 3.0, 8.0]);
println!("{}", lineplot.render());MIT