mkaz / termgraph

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

Fix bug in find_min and find_max functions #56

Closed MaximeVdB closed 4 years ago

MaximeVdB commented 4 years ago

First: thanks @mkaz for this nice tool!

With this I would like to fix something that looks like a bug, unless I'm missing something.

When using the '--width' option on a dataset with multiple categories, I was not getting the expected (maximum) width because the find_max function was only looking at the last category, while in my case the highest values were in the first category. Same for find_min().

mkaz commented 4 years ago

This looks good, thanks for the fix! 👍