THighLowSeries problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Metman
Advanced
Posts: 113
Joined: Fri Dec 21, 2007 12:00 am

THighLowSeries problem

Post by Metman » Tue Sep 10, 2013 4:05 pm

Hi

I'm using a THighLowSeries component to show values of two diffrent colors. If its above a certain threshold then its one color if its below its another. The trouble is that the series does not mark the boundary when the line intersects with the horizontal threshold value correctly and the colors are out of alignment (see attachment).

Is there anything I can do to correct this?

I did try adding another THighLowSeries series and use one for above the threshold and one for below the threshold but ran into the same problem.

Bruce.
Attachments
Capture1.png
Capture1.png (16.23 KiB) Viewed 10603 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: THighLowSeries problem

Post by Narcís » Fri Sep 13, 2013 9:19 am

Hi Metman,

Could you please attach a simple example project we can run "as-is" to reproduce the problem here?

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Sean Palmer
Newbie
Newbie
Posts: 7
Joined: Mon Jul 29, 2013 12:00 am

Re: THighLowSeries problem

Post by Sean Palmer » Tue Sep 24, 2013 8:57 am

Hi,

I'm also getting a similar problem where the high and low values are the same the fill is not rendered from the previous point properly.

Another problem is that the fill does not render at all if the chart Renderer is set to GDI+ !!!

Sean.
HW100.jpg
HW100.jpg (113.99 KiB) Viewed 10609 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: THighLowSeries problem

Post by Narcís » Tue Sep 24, 2013 10:18 am

Hello everyone,

It might be that you have not set the brush for either High or Low values. Code snippet below works fine for me here using latest TeeChart 2013 release. Does this work fine for you? Can you please modify the code so that we can reproduce the problem here?

Code: Select all

procedure TForm2.FormCreate(Sender: TObject);
const NumPoints: Integer = 50;
var i: Integer;
begin
  Series1.HighBrush.Style:=bsSolid;
  Series1.LowBrush.Style:=bsSolid;

  for i:=0 to NumPoints-1 do
    Series1.AddHighLow(i, NumPoints-i, i);
end;
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
Image Image Image Image Image Image
Instructions - How to post in this forum

Sean Palmer
Newbie
Newbie
Posts: 7
Joined: Mon Jul 29, 2013 12:00 am

Re: THighLowSeries problem

Post by Sean Palmer » Tue Sep 24, 2013 2:41 pm

Thanks, setting the High & Low brush style to bsSolid has worked for me.

Still having problems with GDI+ not rendering the fill.

Sean.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: THighLowSeries problem

Post by Narcís » Wed Sep 25, 2013 7:53 am

Hi Sean,
Still having problems with GDI+ not rendering the fill.
From latest maintenance release, default canvas used is GDI+. Hence, I did the example I posted with GDI+ and worked fine for me. Can you please modify the code are attach a simple example project we can run "as-is" to reproduce the problem here?

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Metman
Advanced
Posts: 113
Joined: Fri Dec 21, 2007 12:00 am

Re: THighLowSeries problem

Post by Metman » Wed Sep 25, 2013 5:21 pm

Hi

Before I write a demo project perhaps you can say what I'm doing in code is actually causing the problem?
Here is the snippet that produces the screen shot I already sent you.

The parts of the graph that are above the mean are green but orange if they fall under the mean.

Code: Select all

const
  accumulation = array[0..5] of double = (960,880,895,950,860,900);
  mean = 905;
var
  idx : integer;
begin
  for idx:=0 to 5 do
  begin
    if accumulation[idx]>mean then
      Series1.AddHighLow(idx,accumulation[idx],mean,'',clLime)
    else
      Series1.AddHighLow(idx,mean,accumulation[idx],'',clWebOrange);
  end;
end;
Let me know if you have any idea - if not I'll put together a demo.

Bruce.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: THighLowSeries problem

Post by Yeray » Fri Sep 27, 2013 10:01 am

Hi Bruce,

Add this to make the Brush visible:

Code: Select all

Series1.Brush.Style:=bsSolid;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply