X-Git-Url: http://rtime.felk.cvut.cz/gitweb/coffee/coffee-flask.git/blobdiff_plain/314c79a3166ad415cba88bbd8b3cb110f99259ba..HEAD:/app.py diff --git a/app.py b/app.py index 0ad3298..473da29 100644 --- a/app.py +++ b/app.py @@ -200,7 +200,7 @@ def coffee_graph_flavors(): if "normalize" in matplotlib.pyplot.pie.__code__.co_varnames: # Matplotlib >= 3.3.0 ax.pie(counts, autopct=lambda p: '{:.0f}'.format(p * sum(counts)/100) if p != 0 else '', - normalize=True) + normalize=sum(counts) != 0) else: # Matplotlib < 3.3.0 ax.pie(counts, autopct=lambda p: '{:.0f}'.format(p * sum(counts)/100) if p != 0 else '')