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

Re: [GT] Patch for Histogram coloring bug



GT/Graphics/Object/HistoGregory Margo wrote:
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.


Index: GT/Graphics/Object/Histogram.pm
===================================================================
--- GT/Graphics/Object/Histogram.pm     (revision 642)
+++ GT/Graphics/Object/Histogram.pm     (working copy)
@@ -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;





aloha greg

good to see you're still using gt.

you are right, seems the method was removed
at 553 but re-installed when testing disclosed,
the problem. unfortunately the corrected version
was never committed. my bad. sorry.

i'll revise the trunk version asap.

ras