TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
Metman
- Advanced
- Posts: 113
- Joined: Fri Dec 21, 2007 12:00 am
Post
by Metman » Wed Dec 19, 2012 3:35 pm
Hi
I am plotting a TBar3D series to display temperature anomalies. Positive values get plotted above the zero line in red whilst negative values get plotted under the zero line in blue. The problem is that the zero line is sometimes aligned with the zero grid line, other times it floats +0.1 or +0.2 above the zero line. Can you suggest a fix or a workround? I have Use Origin ticked and the value set to zero.
Code: Select all
if Grid.Floats[6,r]>0 then
Series.AddBar(Grid.Dates[0,r],Grid.Floats[6,r],0,'',clRed)
else
Series.AddBar(Grid.Dates[0,r],0,Grid.Floats[6,r],'',clBlue);
Bruce.
-
Yeray
- Site Admin
- Posts: 9612
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Dec 20, 2012 3:16 pm
Hi Bruce,
I'm trying to reproduce the problem with v2012.07, but the grid line seems to be always correctly aligned with the 0 value.
Code: Select all
uses TeeConst, Bar3D;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Caption:=TeeMsg_Version;
Chart1.View3D:=false;
with Chart1.AddSeries(TBar3DSeries) as TBar3DSeries do
begin
for i:=0 to 5 do
if (i mod 2 = 0) then
AddBar(i, random*10, 0, '', clRed)
else
AddBar(i, -random*10, 0, '', clBlue);
end;
end;
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
-
Metman
- Advanced
- Posts: 113
- Joined: Fri Dec 21, 2007 12:00 am
Post
by Metman » Thu Dec 20, 2012 10:03 pm
Hi Yeray
I fixed the problem this afternoon. I had imported the project from my old development PC and so I just deleted and added the TChart component again and hooked it all up and it's now behaving itself! I think there was a slightly older version of TeeChart on the old machine.
Thanks for looking into it for me.
Bruce.
-
Yeray
- Site Admin
- Posts: 9612
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Fri Dec 21, 2012 9:03 am
Hi Bruce,
I'm glad to see you could solve the problem