guptarohit / asciigraph

Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
https://pkg.go.dev/github.com/guptarohit/asciigraph
BSD 3-Clause "New" or "Revised" License
2.68k stars 101 forks source link

is it possible to generate a svg or jpg image? #48

Closed 9cat closed 7 months ago

9cat commented 9 months ago

is it possible to generate a svg or jpg image file with fancy drawing by this project?

guptarohit commented 8 months ago

Hi, exporting svg is out of scope of this project, it only output texts.

But, if you want svg for the graph generated by this project then you can just pipe it to goat (a utility to render ASCII art to SVG diagram)

e.g. goat -i <(seq 1 72 | asciigraph -h 10 -c "plot data from stdin") -o chart.svg