Browse Source

Removal of force_order - not needed in final solution

pull/20/head
Wiktor Niesiobedzki 12 years ago
parent
commit
c5096359ff
  1. 11
      pygal/util.py

11
pygal/util.py

@ -143,21 +143,12 @@ def compute_logarithmic_scale(min_, max_, min_scale, max_scale):
def compute_scale(
min_, max_, logarithmic=False, order_min=None,
min_scale=4, max_scale=20, force_steps=None):
min_scale=4, max_scale=20):
"""Compute an optimal scale between min and max"""
if min_ == 0 and max_ == 0:
return [0]
if max_ - min_ == 0:
return [min_]
if force_steps:
# TODO: handle logarithmic scale
step = float(max_ - min_) / (force_steps - 1)
curr = min_
ret = []
for i in range(force_steps):
ret.append(curr)
curr += step
return ret
if logarithmic:
log_scale = compute_logarithmic_scale(
min_, max_, min_scale, max_scale)

Loading…
Cancel
Save