[Bps-public-commit] r11397 - in WebChart/lib/WebChart: Renderer

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Apr 2 11:28:27 EDT 2008


Author: sunnavy
Date: Wed Apr  2 11:28:22 2008
New Revision: 11397

Modified:
   WebChart/lib/WebChart/Renderer.pm
   WebChart/lib/WebChart/Renderer/PlotKit.pm
   WebChart/lib/WebChart/Renderer/XMLSWF.pm

Log:
trivial

Modified: WebChart/lib/WebChart/Renderer.pm
==============================================================================
--- WebChart/lib/WebChart/Renderer.pm	(original)
+++ WebChart/lib/WebChart/Renderer.pm	Wed Apr  2 11:28:22 2008
@@ -34,10 +34,10 @@
 sub render {
     my $self = shift;
     my $args = shift;
-    $args->{web_img_dir} ||= '/charts';
-    $args->{web_xml_dir} = '/xml';
-    $args->{web_js_dir} ||= '/js';
-    $args->{web_css_dir} ||= '/css';
+    $args->{web_img_dir}   ||= '/charts';
+    $args->{web_xml_dir}   ||= '/xml';
+    $args->{web_js_dir}    ||= '/js';
+    $args->{web_css_dir}   ||= '/css';
     $args->{web_flash_dir} ||= '/flash';
 
     for (qw/img_dir xml_dir/) {
@@ -47,8 +47,9 @@
         }
     }
 
-    $args->{width}  = 400 unless $args->{width};
-    $args->{height} = 300 unless $args->{height};
+    $args->{width}   ||= 400;
+    $args->{height}  ||= 300;
+    $args->{options} ||= {};
 
     delete $args->{css_class}
       unless $args->{css_class} && $args->{css_class} =~ /\w/;

Modified: WebChart/lib/WebChart/Renderer/PlotKit.pm
==============================================================================
--- WebChart/lib/WebChart/Renderer/PlotKit.pm	(original)
+++ WebChart/lib/WebChart/Renderer/PlotKit.pm	Wed Apr  2 11:28:22 2008
@@ -17,7 +17,7 @@
 
 sub render {
     my $self = shift;
-    my %args = ( options => {}, @_ );
+    my %args = @_;
     $args{data} =
       [ @{ $args{data} } ];    # dump one, don't change the original value
 

Modified: WebChart/lib/WebChart/Renderer/XMLSWF.pm
==============================================================================
--- WebChart/lib/WebChart/Renderer/XMLSWF.pm	(original)
+++ WebChart/lib/WebChart/Renderer/XMLSWF.pm	Wed Apr  2 11:28:22 2008
@@ -56,7 +56,7 @@
         legend_label  => { size        => '11' },
         chart_value =>
           { position => 'cursor', size => '11', color => '666666' },
-        %{ $args{options} || {} },
+        %{ $args{options} },
         chart_data => { row => [ { string => [ {}, @$labels ], }, ], },
     );
 



More information about the Bps-public-commit mailing list