via RT wrote:
Show quoted text> <URL:
http://rt.cpan.org/Ticket/Display.html?id=18127 >
>
>
> As it is I don't see this as a bug - if you are graphing data why would you have two fields with
> the same name, either they are the same (and should be a single field), or they are different
> (and should have distinct names)?
>
In my case, I had a bar graph with 30 entries (I'm plotting a metric
in function of the
release number of a module). As the number of bars is high, putting all
the X labels
0.0, 0.1, 0.2, ... 0.9, 1.0, 1.1, ... produces a fairly busy graph. So
what I decided to do instead
was to display only the major version numbers by doing something like:
my @fields = ( 0.0, 0.1, 0.2, 0.3, ..., 0.9, 1.0, 1.1, ... and so on
and so forth );
my $graph = SVG::TT::Graph::Bar->new({
fields => [ map { $_ == int $_ ? $_ : '' } @fields ] ,
});
Which, alas, doesn't work because all data entries with an empty strings
are collapsed into
a single value.
This being said, I found a workaround. What I do now is simply to
give a temporary name
to the fields I want to be blank an then remove them afterwards (using
Inkscape, or
potentially XML::XPathScript).