Page 1 of 1

THighLowSeries problem

Posted: Tue Sep 10, 2013 4:05 pm
by 10047857
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.

Re: THighLowSeries problem

Posted: Fri Sep 13, 2013 9:19 am
by narcis
Hi Metman,

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

Thanks in advance.

Re: THighLowSeries problem

Posted: Tue Sep 24, 2013 8:57 am
by 16566643
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 10607 times

Re: THighLowSeries problem

Posted: Tue Sep 24, 2013 10:18 am
by narcis
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.

Re: THighLowSeries problem

Posted: Tue Sep 24, 2013 2:41 pm
by 16566643
Thanks, setting the High & Low brush style to bsSolid has worked for me.

Still having problems with GDI+ not rendering the fill.

Sean.

Re: THighLowSeries problem

Posted: Wed Sep 25, 2013 7:53 am
by narcis
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.

Re: THighLowSeries problem

Posted: Wed Sep 25, 2013 5:21 pm
by 10047857
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.

Re: THighLowSeries problem

Posted: Fri Sep 27, 2013 10:01 am
by yeray
Hi Bruce,

Add this to make the Brush visible:

Code: Select all

Series1.Brush.Style:=bsSolid;