[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GT] Patch for Histogram coloring bug
- To: devel
AT
geniustrader.org
- Subject: [GT] Patch for Histogram coloring bug
- From: Gregory Margo <greg
AT
margofamily.org>
- Date: Wed, 25 Jun 2008 12:33:21 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=margofamily.org; h=Received:Received:Message-ID:Date:From:To:Subject:MIME-Version:Content-Type:Content-Disposition:Content-Transfer-Encoding:User-Agent:X-Identified-User:DomainKey-Status; b=q304JYNehUgfLlMbIrY5sT/1tEvd65bmTlYNJRe1ha/WFqnMwoDPsuaDp31rVah3UJj09zN1eImUMyNV05nckDu0X0paQU5Em9kITxm+hdgrh4Ib8aaLwfWaHL94uWH4;
- Domainkey-status: no signature
- Message-id: <20080625123321.psf6nj16n4kkcwcs@margofamily.org>
- Reply-to: devel
AT
geniustrader.org
- User-agent: Internet Messaging Program (IMP) H3 (4.1.6)
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;