mkaz / termgraph

a python command-line tool which draws basic graphs in the terminal
MIT License
3.14k stars 165 forks source link

--width only applies to the highest value with used with --stack #69

Open danielhoherd opened 3 years ago

danielhoherd commented 3 years ago

when using --stack and --width together, the width is determined by the highest single value in the series, setting all other values as a proportion of that, greatly extending the width beyond what is designated, and making it impossible to designate a desired width when working with values that are not known ahead of time.

$ cat <<EOF | termgraph --custom-tick="X" --stack --width=10
test1 10 20 40 40 40
test2 10 20 40 40 10
test3 10 10 10 10 10
EOF

test1: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 150.00
test2: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX 120.00
test3: XXXXXXXXXX 50.00
Screen Shot 2020-10-09 at 10 49 27 AM