Skip Menu |
 

This queue is for tickets about the Chart-Strip CPAN distribution.

Report information
The Basics
Id: 72288
Status: resolved
Priority: 0/
Queue: Chart-Strip

People
Owner: Nobody in particular
Requestors: davidp [...] preshweb.co.uk
Cc:
AdminCc:

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



Subject: Div by zero with < 0.5 datapoints
Download (untitled) / with headers
text/plain 330b
Trying to chart a dataset with values below 0.5, it seems the data points are being rounded down to zero then used in division at line 700. Illegal division by zero at /usr/local/share/perl/5.10.0/Chart/Strip.pm line 700. 699: $st = floor( $tp / $is ) * $is; # -> 4 - 8, ceil -> 2 - 4 700: $low = int( $min / $st ) * $st;
Download (untitled) / with headers
text/plain 131b
module has been tested with datapoints less than 0.5. cannot reproduce. please include sample code that demonstrates the problem.
Download (untitled) / with headers
text/plain 621b
Thanks for the fast reply! On 2011-11-09 00:19:31, JAW wrote: Show quoted text
> module has been tested with datapoints less than 0.5. > cannot reproduce. > > please include sample code that demonstrates the problem.
Ah - in knocking up a test case to produce, I've found it only seems to happen with lots of data points. The test case I used is attached; it generates a graph fine all the way up until it reaches the attempt with 89 data points, then crashes: [...] Testing with 87 data points Testing with 88 data points Testing with 89 data points Illegal division by zero at /usr/local/share/perl/5.10.0/Chart/Strip.pm line 700.
Subject: chart-strip-test-case.pl

Message body is not shown because it is too large.

fixed. new version should show up on cpan shortly. thanks.
Download (untitled) / with headers
text/plain 158b
Great stuff, thanks! Just tried it out and works a treat now for all the periods I was trying to graph, even when a massive amount of datapoints are given :)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.