Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Cvs P5ee > [svn:p5ee] r943...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 518 of 720
Post > Topic >>

[svn:p5ee] r9435 - p5ee/trunk/App-Widget-ChartDirector/lib/App/Widget

by spadkins@[EMAIL PROTECTED] Apr 18, 2007 at 09:27 AM

Author: spadkins
Date: Wed Apr 18 09:27:52 2007
New Revision: 9435

Modified:
   p5ee/trunk/App-Widget-ChartDirector/lib/App/Widget/ChartDirector.pm

Log:
Removed setAggregateLabelStyle. Date labels are now handled properly.

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	Wed
Apr 18 09:27:52 2007
@[EMAIL PROTECTED]
 -421,7 +421,7 @[EMAIL PROTECTED]
                 $layer->addDataSet($yn->[$i], -1, $y_labels->[$i]);
             }
             #Enable bar label for the whole bar
-            $layer->setAggregateLabelStyle()->setFontAngle(90);
+            #$layer->setAggregateLabelStyle()->setFontAngle(90);
             if ($spec->{"3D"}) {
                 $layer->set3D(5,0);
                 $layer->setBarGap(0.2, 0.03);
@[EMAIL PROTECTED]
 -470,12 +470,8 @[EMAIL PROTECTED]
             my (@[EMAIL PROTECTED]
);
             for (my $i = 0; $i <= $#$x; $i++) {
                 if ($x->[$i] =~ /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/) {
-                    if ($#$x > 2) {
-                    	$x_date[$i] = &perlchartdir::chartTime($1, $2, $3);
-                    }
-                    else {
-                    	$x_date[$i] = $2 . "/" . $3;
-                    }
+                    #$x_date[$i] = &perlchartdir::chartTime($1, $2, $3);
+                    $x_date[$i] = "$2/$3";
                 }
                 else {
                     $x_date[$i] = $perlchartdir::NoValue;
@[EMAIL PROTECTED]
 -485,13 +481,12 @[EMAIL PROTECTED]
             $x_title .= "($begin_yr";
             $x_title .= "-$end_yr" if ($end_yr ne $begin_yr);
             $x_title .= ")";
-            $chart->xAxis()->setLabelFormat("{value|mm/dd}");
-            if ($#$x > 2) {
-            	$layer->setXData(\@[EMAIL PROTECTED]
);
-            }
-            else {
-            	$chart->xAxis()->setLabels(\@[EMAIL PROTECTED]
);
-        	}
+
+            $chart->xAxis()->setLabels(\@[EMAIL PROTECTED]
);
+            my $r = sprintf("%.0f", $#x_date / 15);
+            my $w = sprintf("%.0f", (800 / $spec->{width}));
+            $r += $w if ($w > 1 && $r > 0);
+            $chart->xAxis()->setLabelStep($r);
         }
         elsif ($x->[0] =~ /^[0-9]+$/) {
             $layer->setXData($x);
 




 1 Posts in Topic:
[svn:p5ee] r9435 - p5ee/trunk/App-Widget-ChartDirector/lib/App/W
spadkins@[EMAIL PROTECTED  2007-04-18 09:27:55 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 4:09:29 CDT 2008.