Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the SVG-TT-Graph CPAN distribution.

Report information
The Basics
Id: 22896
Status: resolved
Priority: 0/
Queue: SVG-TT-Graph

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

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



Subject: wrong y value when using min_scale_value in Graph::Line
SVG-TT-Graph-Line-0.09 perl, v5.8.5 built for i386-linux-thread-multi Linux S154 2.6.9-22.ELsmp When I set min_scale_value in SVG::TT:Graph::Line, the y value is too low that I can not see the line. I attach the patch, hope it's useful.
Subject: Line.pm.patch
--- /usr/lib/perl5/site_perl/5.8.5/SVG/TT/Graph/Line.pm.old 2006-11-08 14:31:09.000000000 +0800 +++ /usr/lib/perl5/site_perl/5.8.5/SVG/TT/Graph/Line.pm 2006-11-08 14:51:07.000000000 +0800 @@ -884,7 +884,7 @@ <path d="M[% x %] [% base_line %] L [% xcount = 0 %] [% FOREACH field = config.fields %] - [% (dw * xcount) + x %] [% base_line - (dataset.data.$field * divider) %] + [% (dw * xcount) + x %] [% base_line - ((dataset.data.$field - min_scale_value) * divider) %] [% xcount = xcount + 1 %] [% END %] [% (dw * (xcount - 1)) + x %] [% base_line %] Z" class="fill[% line %]"/> @@ -895,7 +895,7 @@ [% xcount = 0 %] [% FOREACH field = config.fields %] [% IF xcount == 1 %] L [% END %] - [% (dw * xcount) + x %] [% base_line - (dataset.data.$field * divider) %] + [% (dw * xcount) + x %] [% base_line - ((dataset.data.$field - min_scale_value) * divider) %] [% xcount = xcount + 1 %] [% END %]" class="line[% line %]"/> @@ -904,12 +904,12 @@ [% FOREACH field = config.fields %] [% IF config.show_data_points %] <!-- datapoint shown --> - <circle cx="[% (dw * xcount) + x %]" cy="[% base_line - (dataset.data.$field * divider) %]" r="2.5" class="fill[% line %]"/> + <circle cx="[% (dw * xcount) + x %]" cy="[% base_line - ((dataset.data.$field - min_scale_value) * divider) %]" r="2.5" class="fill[% line %]"/> [% END %] [% IF config.show_data_values %] <!-- datavalue shown --> - <text x="[% (dw * xcount) + x %]" y="[% base_line - (dataset.data.$field * divider) - 6 %]" class="dataPointLabel">[% dataset.data.$field %]</text> + <text x="[% (dw * xcount) + x %]" y="[% base_line - ((dataset.data.$field - min_scale_value) * divider) - 6 %]" class="dataPointLabel">[% dataset.data.$field %]</text> [% END %] [% xcount = xcount + 1 %] [% END %]
Subject: Re: [rt.cpan.org #22896] wrong y value when using min_scale_value in Graph::Line
Date: Wed, 8 Nov 2006 21:35:14 +0000
To: Guest via RT <bug-SVG-TT-Graph [...] rt.cpan.org>
From: Leo Lapworth <leo [...] cuckoo.org>
Thanks - I'll look at applying this. Leo On 8 Nov 2006, at 07:12, 吴昊 via RT wrote: Show quoted text
> > Wed Nov 08 02:12:57 2006: Request 22896 was acted upon. > Transaction: Ticket created by JEDY > Queue: SVG-TT-Graph > Subject: wrong y value when using min_scale_value in Graph::Line > Broken in: (no value) > Severity: Normal > Owner: Nobody > Requestors: jedy@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=22896 > > > > SVG-TT-Graph-Line-0.09 > perl, v5.8.5 built for i386-linux-thread-multi > Linux S154 2.6.9-22.ELsmp > > When I set min_scale_value in SVG::TT:Graph::Line, the y value is too > low that I can not see the line. > I attach the patch, hope it's useful. > > <Line.pm.patch>