[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GT] SVN Commit r643 - branches/exp/GT/Graphics/Object



Author: thomas
Date: 2008-06-26 00:16:42 +0200 (Thu, 26 Jun 2008)
New Revision: 643

Modified:
   branches/exp/GT/Graphics/Object/Histogram.pm
Log:
>From Gregory Margo: Revision 553 removed the set_foreground_color()
method from GT/Graphics/Object/Histogram.pm. I believe this was an
error because the parent class' method will not set the 'color_ds'
variable.

I'm passing this parameter to Scripts/graphic.pl:
--option=Graphic::Volume::Color=Indicators::Generic::If {Signals:Generic:Below {I:Prices OPEN} {I:Prices CLOSE}} green red 
which will not work otherwise.


Modified: branches/exp/GT/Graphics/Object/Histogram.pm
===================================================================
--- branches/exp/GT/Graphics/Object/Histogram.pm	2008-06-18 03:51:55 UTC (rev 642)
+++ branches/exp/GT/Graphics/Object/Histogram.pm	2008-06-25 22:16:42 UTC (rev 643)
@@ -201,4 +201,15 @@
     }
 }
 
+sub set_foreground_color {
+    my ($self, $color) = @_;
+    if ( $self->{'calc'} ne "" && $color =~ /^\s*(Indicators|I:)/) {
+      $self->{'fg_color'} = $color;
+      $self->{'color_ds'} = GT::Graphics::DataSource::GenericIndicatorResults->new($self->{'calc'}, $color );
+    }
+    else {
+      $self->{'fg_color'} = get_color($color);
+    }
+}
+
 1;