Author: spadkins
Date: Tue Apr 10 20:01:21 2007
New Revision: 9394
Modified:
p5ee/trunk/App-Widget-ChartDirector/lib/App/Widget/ChartDirector.pm
Log:
changes from 2_0
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 Tue Apr
10 20:01:21 2007
@@ -13,7 +13,6 @@
use Date::Format;
use Date::Parse;
#use Data::Dumper;
-
use strict;
=head1 NAME
@@ -422,7 +421,7 @@
$layer->addDataSet($yn->[$i], -1, $y_labels->[$i]);
}
#Enable bar label for the whole bar
- $layer->setAggregateLabelStyle();
+ $layer->setAggregateLabelStyle()->setFontAngle(90);
if ($spec->{"3D"}) {
$layer->set3D(5,0);
$layer->setBarGap(0.2, 0.03);
@@ -471,7 +470,12 @@
my (@x_date);
for (my $i = 0; $i <= $#$x; $i++) {
if ($x->[$i] =~ /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/) {
- $x_date[$i] = &perlchartdir::chartTime($1, $2, $3);
+ if ($#$x > 2) {
+ $x_date[$i] = &perlchartdir::chartTime($1, $2, $3);
+ }
+ else {
+ $x_date[$i] = $2 . "/" . $3;
+ }
}
else {
$x_date[$i] = $perlchartdir::NoValue;
@@ -482,7 +486,12 @@
$x_title .= "-$end_yr" if ($end_yr ne $begin_yr);
$x_title .= ")";
$chart->xAxis()->setLabelFormat("{value|mm/dd}");
- $layer->setXData([EMAIL PROTECTED]);
+ if ($#$x > 2) {
+ $layer->setXData([EMAIL PROTECTED]);
+ }
+ else {
+ $chart->xAxis()->setLabels([EMAIL PROTECTED]);
+ }
}
elsif ($x->[0] =~ /^[0-9]+$/) {
$layer->setXData($x);