Author: spadkins
Date: Fri Apr 23 11:53:16 2010
New Revision: 13926
Modified:
p5ee/trunk/App-Widget-ChartDirector/lib/App/Widget/ChartDirector.pm
Log:
added {origin_anchor}=0 option
Modified: p5ee/trunk/App-Widget-ChartDirector/lib/App/Widget/ChartDirector.pm
==============================================================================
--- p5ee/trunk/App-Widget-ChartDirector/lib/App/Widget/ChartDirector.pm
(original)
+++ p5ee/trunk/App-Widget-ChartDirector/lib/App/Widget/ChartDirector.pm Fri Apr
23 11:53:16 2010
@@ -424,6 +424,7 @@
elsif ($legend_pos eq "bottom" ) {
$legend = $c->addLegend($right_margin, $height -
$graph_adjusted_height - $top_margin/4 , 0,"arial.ttf",10);
}
+
$legend->setBackground(hex($plot_bgcolor));
$legend->setMargin(5);
$legend->setWidth($legend_width);
@@ -505,6 +506,8 @@
}
}
+ $c->setAxisAtOrigin() if (defined $spec->{origin_anchor} &&
!$spec->{origin_anchor});
+
&App::sub_exit($c) if ($App::trace); # print STDERR Dumper $c;
return($c);
}
@@ -655,7 +658,7 @@
sub write_bar_graph_image {
&App::sub_entry if ($App::trace);
my ($self, $spec) = @_;
- my $c = $self->new_xy_chart($spec);
+ my $c = $self->new_xy_chart($spec);
my $x = $self->get_x($spec);
my $yn = $self->get_y($spec);
my ($layer);
@@ -736,7 +739,6 @@
my $x_title = $spec->{x_title} || "";
my $keys = $spec->{keys};
-
if ($x && $#$x > -1) {
my ($begin_datetime, $end_datetime, $begin_time, $end_time, $begin_yr,
$end_yr);
if ($x->[0] =~ /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/) {