mkaz / termgraph

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

Fix `math domain error` when value is 0 #92

Open frankbryce opened 2 years ago

frankbryce commented 2 years ago

math.log(0) is undefined, and I think the tool should allow values of 0 in bar charts. This is currently causing issues.

jbordoe commented 2 years ago

FYI, I tried running this, I get another error due to this line: https://github.com/mkaz/termgraph/blob/09e17cc3510b62969fc12075dd698817357a5a93/termgraph/module.py#L327

tian2992 commented 2 years ago

I can confirm the color black error