Skip Menu |

This queue is for tickets about the URI-GoogleChart CPAN distribution.

Report information
The Basics
Id: 61612
Status: resolved
Priority: 0/
Queue: URI-GoogleChart

People
Owner: Nobody in particular
Requestors: TIMB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Using range_round with large positive data values gives a min that's below zero! [PATCH]
Mn values that are already on a 'step' shouldn't be adjusted: --- lib/perl5/URI/GoogleChart.pm (revision 9182) +++ lib/perl5/URI/GoogleChart.pm (working copy) @@ -300,7 +300,9 @@ $step /= 10 if $step / $range >= 0.1; $step *= 5 if $step / $range < 0.05; - $min = floor($min / $step - 0.2) * $step; + # step down the min unless it's already on a good step + $min = floor($min / $step - 0.2) * $step + unless floor($min / $step) * $step == $min; $max = ceil($max / $step + 0.2) * $step; # zero based minimum is usually a good thing so make it more likely
Thanks! Applied. http://github.com/gisle/uri- googlechart/commit/7192f9c923badc1da70ecf70b8b45fc400c629e8