Subject: | bug/patch for ChartLines/Composite |
Date: | Mon, 13 Nov 2006 19:07:07 +0100 |
To: | bug-Chart [...] rt.cpan.org |
From: | "Peter_Siegrist(SystemLoesungen)" <PSS [...] ZweierNet.ch> |
Hi,
first of all, thanks, is a great module.
I'm using Version 2.4.1.
There is a small flaw concerning imagemap_dump in Chart::Lines and
Chart::Composite.
The endmost value of the input data array never will be shown in the
imagemap_data array.
I checked the source and found:
in Chart::Lines near line 110:
*# draw every line for this dataset
for $j (1..$self->{'num_datapoints'}) {*
should better be written as:
*# draw every line for this dataset
for $j (1..$self->{'num_datapoints'}-1) {*
because $self->{'num_datapoints'} is the number of elements in the array.
and ... vice versa ... in Chart::Composite near line 81:
*for $j (0..$#{$self->{'sub_0'}->{'imagemap_data'}->[$i]}-1) {*
should better be written as:
*for $j (0..$#{$self->{'sub_0'}->{'imagemap_data'}->[$i]}) {*
and also line 88:
* for $j (0..$#{$self->{'sub_1'}->{'imagemap_data'}->[$i]}-1) {*
should better be:
*for $j (0..$#{$self->{'sub_1'}->{'imagemap_data'}->[$i]}) {*
because $#{$self->{'sub_0/1'}->{'imagemap_data'}->[$i]} is the number of
the last element in array
and should also be appended to the imagemap_data array.
An example output with my modified Chart::Lines/Composite Modules can be
shown at
http://www.zweiernet.ch/wetter . As you can see It shows also the
endmost data value as an
over_popup based on the imagemap_data.
Peter
<pss-at-zweiernet.ch>