Skip to content

Commit

Permalink
Merge pull request iandees#3 from tamasflamich/fix
Browse files Browse the repository at this point in the history
Fixed sparkline with same upper and lower bound
  • Loading branch information
iandees authored Dec 11, 2019
2 parents 8508390 + 8fd6e9a commit 42e84fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def sparkline(datapoints):

line = ""
for dp in datapoints:
scaled = (dp - lower) / width
scaled = 1 if width == 0 else (dp - lower) / width
which_spark = int(scaled * n_sparks)
line += (sparks[which_spark])

Expand Down

0 comments on commit 42e84fb

Please sign in to comment.