Hello,
I have a TChart composed of a few TLineSeries and using automatic scaling. I added a TChartShape serie, set X0-1/Y0-1 to the correct values but the bottom axis range is now 0-3000 instead of 2600-3000 before I added the TChartShape.
Am I missing something ? Do I need to force the scale ?
TChartShape and automatic scale
Re: TChartShape and automatic scale
Hi Ael,
Note that the axes will be auto scaled to show both the shape series and the line series completely.
The following code seems to work fine here:
Note that the axes will be auto scaled to show both the shape series and the line series completely.
The following code seems to work fine here:
Code: Select all
uses Series, TeeShape;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Chart1.View3D:=false;
Chart1.AddSeries(TLineSeries);
Chart1[0].AddXY(2600,random*100);
for i:=1 to 400 do
Chart1[0].AddXY(2600+i,Chart1[0].YValue[i-1] + random*10 - 5);
with Chart1.AddSeries(TChartShape) as TChartShape do
begin
X0:=Chart1[0].XValues.MinValue;
X1:=Chart1[0].XValues.MaxValue;
Y0:=Chart1[0].YValues.MinValue;
Y1:=Chart1[0].YValues.MaxValue;
Transparency:=50;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |