Hi
I have a chart with three different candle series where I'm using CandleStyle := csLine. (The only reason for using the candle series is to be able to do R.S.I.). All three series come out in the same colour (black) though. I've set the SeriesColor to clTeeColor and also UpCloseColor and DownCloseColor to SeriesColor but it still comes out in black...
I think it might be displaying using the border colour of the candle (but I'm using csLine). Any pointers on how to make sure the series gets different colours?
BRgds,
Marius
Candle Series and colours
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Marius,
Which TeeChart version are you using? It seems to works fine for me here using v8.04 VCL which has been published recently. If the problem persists could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Which TeeChart version are you using? It seems to works fine for me here using v8.04 VCL which has been published recently. If the problem persists could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Thanks Narcís
I'm using 8.04 and doing it all in code at runtime.
I've just tried doing the same in the designer and it works just fine, so I guess we'll need to look at my code.
I create the series like this:
I do this up to three times and all the series print in the same colour...
Marius
I'm using 8.04 and doing it all in code at runtime.
I've just tried doing the same in the designer and it works just fine, so I guess we'll need to look at my code.
I create the series like this:
Code: Select all
Custom1 := TCandleSeries.Create(Self);
Custom1.CandleStyle := csLine;
Custom1.SeriesColor := clTeeColor;
Custom1.UpCloseColor := Custom1.SeriesColor;
Custom1.DownCloseColor := Custom1.SeriesColor;
Custom1.Title := 'Some text';
Custom1.HorizAxis := aBottomAxis;
Custom1.VertAxis := aLeftAxis;
Custom1.Pen.Width := 2;
Custom1.XValues.DateTime := true;
Marius
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Marius,
Thanks for the information.
Using code below works fine for me here.
Thanks for the information.
Using code below works fine for me here.
Code: Select all
uses Series, CandleCh;
procedure TForm1.FormCreate(Sender: TObject);
var
Custom1 : TCandleSeries;
begin
Custom1 := TCandleSeries.Create(Self);
Custom1.CandleStyle := csLine;
//Custom1.SeriesColor := clTeeColor;
//Custom1.UpCloseColor := Custom1.SeriesColor;
//Custom1.DownCloseColor := Custom1.SeriesColor;
Custom1.Title := 'Some text';
Custom1.HorizAxis := aBottomAxis;
Custom1.VertAxis := aLeftAxis;
Custom1.Pen.Width := 2;
Custom1.XValues.DateTime := true;
Custom1.FillSampleValues();
Chart1.AddSeries(Custom1);
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Narcis
I've changed my code to look like this. The result is three lines where the Ups are red and the Downs are white. Also, the colours I get in the legend is different from the series...
To reproduce, I have dropped an empty chart on a form and doing the below in FormCreate
I need three lines with different colours and with the same colour regardless of whether the value goes up or down.
Thanks for looking into this
BRgds
Marius
I've changed my code to look like this. The result is three lines where the Ups are red and the Downs are white. Also, the colours I get in the legend is different from the series...
To reproduce, I have dropped an empty chart on a form and doing the below in FormCreate
I need three lines with different colours and with the same colour regardless of whether the value goes up or down.
Code: Select all
var
Custom1 : TCandleSeries;
Custom2 : TCandleSeries;
Custom3 : TCandleSeries;
begin
Custom1 := TCandleSeries.Create(Self);
Custom1.CandleStyle := csLine;
Custom1.Title := 'Some text';
Custom1.HorizAxis := aBottomAxis;
Custom1.VertAxis := aLeftAxis;
Custom1.Pen.Width := 2;
Custom1.XValues.DateTime := true;
Custom1.FillSampleValues(100);
Chart1.AddSeries(Custom1);
Custom2 := TCandleSeries.Create(Self);
Custom2.CandleStyle := csLine;
Custom2.Title := 'Some text';
Custom2.HorizAxis := aBottomAxis;
Custom2.VertAxis := aLeftAxis;
Custom2.Pen.Width := 2;
Custom2.XValues.DateTime := true;
Custom2.FillSampleValues(100);
Chart1.AddSeries(Custom2);
Custom3 := TCandleSeries.Create(Self);
Custom3.CandleStyle := csLine;
Custom3.Title := 'Some text';
Custom3.HorizAxis := aBottomAxis;
Custom3.VertAxis := aLeftAxis;
Custom3.Pen.Width := 2;
Custom3.XValues.DateTime := true;
Custom3.FillSampleValues(100);
Chart1.AddSeries(Custom3);
end;
BRgds
Marius
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Marius,
Ok, in that case you can do this:
Ok, in that case you can do this:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
Custom1 : TCandleSeries;
Custom2 : TCandleSeries;
Custom3 : TCandleSeries;
begin
Custom1 := TCandleSeries.Create(Self);
Custom1.CandleStyle := csLine;
Custom1.Title := 'Some text';
Custom1.HorizAxis := aBottomAxis;
Custom1.VertAxis := aLeftAxis;
Custom1.Pen.Width := 2;
Custom1.XValues.DateTime := true;
Custom1.FillSampleValues(100);
Custom1.UpCloseColor:=clRed;
Custom1.DownCloseColor:=Custom1.UpCloseColor;
Chart1.AddSeries(Custom1);
Custom2 := TCandleSeries.Create(Self);
Custom2.CandleStyle := csLine;
Custom2.Title := 'Some text';
Custom2.HorizAxis := aBottomAxis;
Custom2.VertAxis := aLeftAxis;
Custom2.Pen.Width := 2;
Custom2.XValues.DateTime := true;
Custom2.FillSampleValues(100);
Custom2.UpCloseColor:=clBlue;
Custom2.DownCloseColor:=Custom2.UpCloseColor;
Chart1.AddSeries(Custom2);
Custom3 := TCandleSeries.Create(Self);
Custom3.CandleStyle := csLine;
Custom3.Title := 'Some text';
Custom3.HorizAxis := aBottomAxis;
Custom3.VertAxis := aLeftAxis;
Custom3.Pen.Width := 2;
Custom3.XValues.DateTime := true;
Custom3.FillSampleValues(100);
Custom3.UpCloseColor:=clYellow;
Custom3.DownCloseColor:=Custom3.UpCloseColor;
Chart1.AddSeries(Custom3);
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hello Marius,
yes, to have both correctly displayed you have to assign the UpCloseColor and Series.Color :
yes, to have both correctly displayed you have to assign the UpCloseColor and Series.Color :
Code: Select all
Custom3.Color := clyellow;
Custom3.UpCloseColor:=clYellow;
Pep Jorge
http://support.steema.com
http://support.steema.com