Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 74950
Status: open
Priority: 0/
Queue: Chart-Clicker

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

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



Subject: Creating a new axis doesn't set default tick label format
When one just uses default axes, there is a default tick label format assigned (seems to be %0.2f); this is fine. When one creates a new axis from scratch, no such default format is assigned. Consequently, the application barfs, unless one manually defines such a format. So, either (prerefably) Chart::Clicker::Axis should do this by itself, or the docs should specify that one has do do it manually. (The automatically generated error message is not extremely helpful, because it comes from deep down; so the average user will have trouble to find out how to remedy the situation.) Here's code that displays the problem: ------------------------------------------- use Chart::Clicker; use Chart::Clicker::Axis; use Chart::Clicker::Data::DataSet; use Chart::Clicker::Data::Series; use Graphics::Primitive::Font; use Graphics::Primitive::Brush; my $lchart = Chart::Clicker->new(); my $vseries = Chart::Clicker::Data::Series->new({ keys => [ 0..23 ], values => [ 50..73], }); my $dataset = Chart::Clicker::Data::DataSet->new({ series => [ $vseries ], }); $lchart->add_to_datasets($dataset); my $yaxis = Chart::Clicker::Axis->new({ brush => Graphics::Primitive::Brush->new(), font => Graphics::Primitive::Font->new(), orientation => 'vertical', position => 'left', # format => '%0.1f', # uncomment to make it work ticks => 8, visible => 1, range => Chart::Clicker::Data::Range->new({lower => 0, upper => 80}), }); my $context = $lchart->get_context('default'); $context->range_axis($yaxis); $lchart->write_output('dummy.png');
Now defaults to %s so that it doesn't explode. Thanks! (Just uploaded 2.77)
Subject: AW: [rt.cpan.org #74950] Creating a new axis doesn't set default tick label format
Date: Mon, 13 Feb 2012 19:31:08 +0100
To: <bug-Chart-Clicker [...] rt.cpan.org>
From: "Selke, Gisbert W." <Gisbert.Selke [...] wido.bv.aok.de>
That was the fastest reply ever that I got for a bug report. I am awed! \Gisbert Show quoted text
> -----Ursprüngliche Nachricht----- > Von: Cory Watson via RT [mailto:bug-Chart-Clicker@rt.cpan.org] > Gesendet: Montag, 13. Februar 2012 19:02 > An: GWS@cpan.org > Betreff: [rt.cpan.org #74950] Creating a new axis doesn't set default tick label > format > > <URL: https://rt.cpan.org/Ticket/Display.html?id=74950 > > > Now defaults to %s so that it doesn't explode. Thanks! (Just uploaded 2.77)