If tickprecision is set to 0 for axis Y, values (at least for me)
should be integer not with floating point .0
In pycha/chart.py after line 284 I added:
yval = (round(yval, prec),int(yval))[prec==0]
self.yticks.append((pos, yval))
so it looks like:
for i in range(self.options.axis.y.tickCount + 1):
yval = self.minyval + (i * roughSeparation)
pos = 1.0 - ((yval - self.minyval) * self.yscale)
if 0.0 <= pos <= 1.0:
yval = (round(yval, prec),int(yval))[prec==0]
self.yticks.append((pos, yval))
I'm not sure If it's 100% good, but it works for me.
Pycha rocks!
Greetz
--
keemor
> If tickprecision is set to 0 for axis Y, values (at least for me)
> should be integer not with floating point .0
>
Sounds good
> In pycha/chart.py after line 284 I added:
> yval = (round(yval, prec),int(yval))[prec==0]
> self.yticks.append((pos, yval))
>
> so it looks like:
>
> for i in range(self.options.axis.y.tickCount + 1):
> yval = self.minyval + (i * roughSeparation)
> pos = 1.0 - ((yval - self.minyval) * self.yscale)
> if 0.0 <= pos <= 1.0:
> yval = (round(yval, prec),int(yval))[prec==0]
> self.yticks.append((pos, yval))
>
>
> I'm not sure If it's 100% good, but it works for me.
I just commited a slightly different version very similar to yours but
also handle other cases.
> Pycha rocks!
Thanks a lot and thanks for your contribution!
Best regards,
Lorenzo