Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'arsatiki/master'

  • Loading branch information...
commit c542996cf9a7a097b447e1ce5a1a6b66bdad254f 2 parents fa54663 + 00a3ebf
@jacobian jacobian authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 googlecharts/templatetags/charts.py
View
4 googlecharts/templatetags/charts.py
@@ -909,7 +909,9 @@ def num2chars(n, value_range):
def norm(n, value_range):
minvalue, maxvalue = value_range
- if minvalue >= 0:
+ if minvalue == maxvalue == 0:
+ return 0
+ elif minvalue >= 0:
return int(round(float(n) / maxvalue * 4095, 0))
elif maxvalue <= 0:
return 4095 - int(round(float(n) * 4095 / minvalue))
Please sign in to comment.
Something went wrong with that request. Please try again.