Hello,
We recently upgraded to RAD Studio XE2 with TeeChart Pro 2011 for RAD XE2 (currently 32bit) and stumbled upon a bug(?): when adding an Area or a HighLow series to a graph, and setting the horizontal axis to show only a small portion between two points, the series is not drawn.
For example: if we define a normal, empty, 2d graph with a single TAreaSeries and add two data points to it: (-10000000,100) and (10000000,100) the series is drawn correctly, but if we set the bottom axis to show only the range [0..100] (rather than being automatic) the series vanishes. BTW, if we zoom in and out on an area that should be covered by the TAreaSeries's background, sometimes it reappears and sometimes it doesn't.
I know for a fact that the code worked on TeeChart 8.6 even when the edge points where defined at -MAX_DOUBLE, MAX_DOUBLE.
The reason this is a problem for us is that we use these series to display min and max borders for our graph (that look nice even when it's panned left or right). And no, we cannot use a color band because the borders are not always horizontal or even straight.
Is there some fix or workaround for this problem?
Best regards,
Shahar
Area and HighLow series not drawn
-
- Newbie
- Posts: 1
- Joined: Thu Aug 11, 2011 12:00 am
Re: Area and HighLow series not drawn
Hi Shahar,
You are right. I've reproduced it so I've added it to the defect list to be fixed in next releases (TV52015927).
The only workaround I can think on is using two TLineSeries (one for the top level and one for the bottom level of the zone to paint) and a TSeriesBandTool to paint the zone between the two series. I've seen it works a little bit better but not perfect yet. For example, for the Bottom axis range (15,55) the TAreaSeries and the THighLowSeries aren't drawn while the TSeriesBandTool is. However, if I zoom on it, it still disappears sometimes.
You are right. I've reproduced it so I've added it to the defect list to be fixed in next releases (TV52015927).
The only workaround I can think on is using two TLineSeries (one for the top level and one for the bottom level of the zone to paint) and a TSeriesBandTool to paint the zone between the two series. I've seen it works a little bit better but not perfect yet. For example, for the Bottom axis range (15,55) the TAreaSeries and the THighLowSeries aren't drawn while the TSeriesBandTool is. However, if I zoom on it, it still disappears sometimes.
Code: Select all
uses Chart, Series, TeeSeriesBandTool;
procedure TForm1.FormCreate(Sender: TObject);
var Chart1: TChart;
begin
Chart1:=TChart.Create(Self);
Chart1.Parent:=Form1;
Chart1.View3D:=false;
with Chart1.AddSeries(TLineSeries) as TLineSeries do
begin
AddXY(-10000000,100);
AddXY(10000000,100);
end;
with Chart1.AddSeries(TLineSeries) as TLineSeries do
begin
AddXY(-10000000,-100);
AddXY(10000000,-100);
end;
with Chart1.Tools.Add(TSeriesBandTool) as TSeriesBandTool do
begin
Series:=Chart1[0];
Series2:=Chart1[1];
end;
Chart1.Axes.Bottom.SetMinMax(15,55);
Chart1.Axes.Left.SetMinMax(0,200);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |