when i have data like attachment image
can i adjust y - axis value like chart below?
i need that the space between value 300 and 800 is displayed rather upper chart than bottom.
TeeChart has some property that i could do?
Can I adjust TeeChart's y-axis like this attachment?
Can I adjust TeeChart's y-axis like this attachment?
- Attachments
-
- yaxis.jpg (76.11 KiB) Viewed 8307 times
Re: Can I adjust TeeChart's y-axis like this attachment?
Hi HCLab,
The easiest solution could be using a custom axis to separate the two parts. The above with the default left axis and the below part with the custom axis. This could be an example:
The easiest solution could be using a custom axis to separate the two parts. The above with the default left axis and the below part with the custom axis. This could be an example:
Code: Select all
uses series;
procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
begin
Chart1.View3D := false;
for i:=0 to 2 do
begin
Chart1.AddSeries(TFastLineSeries.Create(self));
if i <> 2 then
begin
Chart1[i].Add(random*300+800);
for j:=1 to 25 do
Chart1[i].Add(random*50 + Chart1[i].YValue[j-1] - 25);
end
else
for j:=0 to 25 do
Chart1[i].Add(200);
end;
Chart1.CustomAxes.Add;
Chart1[2].CustomVertAxis := Chart1.CustomAxes.Items[0];
Chart1.Axes.Left.EndPosition := 59;
Chart1.CustomAxes.Items[0].StartPosition := 61;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Can I adjust TeeChart's y-axis like this attachment?
Thanks you Yeray.
Im gonna try with it.
Hav nice day :3
Im gonna try with it.
Hav nice day :3
Re: Can I adjust TeeChart's y-axis like this attachment?
Code: Select all
Chart1.Axes.Left.EndPosition := 59;
Chart1.CustomAxes.Items[0].StartPosition := 61;
end;
Can you Explain what these property means ?
I cant read Teechart Help File on Vista ...
Re: Can I adjust TeeChart's y-axis like this attachment?
Hi HCLab,
You can download WinHlp32.exe for Windows Vista from microsoft website to continue viewing hlp files.
Here is what the help says:
You can download WinHlp32.exe for Windows Vista from microsoft website to continue viewing hlp files.
Here is what the help says:
TChartAxis.StartPosition wrote:property StartPosition: Double;
Unit
TeEngine
Description
Default = 0
The StartPosition property defines the position, as a percentage of Chart width or height (depending on whether it is applied to a Horizontal Axis or a Vertical Axis) of the Start position of the Axis to which it is applied. Left and Top are 0,0 positions.
Use with PositionPercent and EndPosition properties to define the Axis position on a Chart.
TChartAxis.EndPosition wrote:property EndPosition: Double;
Unit
TeEngine
Description
Default = 0
The EndPosition property defines the position, as a percentage of Chart width or height (depending on whether it is applied to a Horizontal Axis or a Vertical Axis) of the End position of the Axis to which it is applied. Left and Top are 0,0 positions.
Use with StartPosition and PositionPercent properties to define the Axis position on a Chart.
TChartAxis.PositionPercent wrote:property PositionPercent: Double;
Unit
TeEngine
Description
Default = 0
The PositionPercent property defines the position, (as a percentage of Chart width or height or as pixels) (depending on whether it is applied to a Horizontal Axis or a Vertical Axis) of the Position of the Axis to which it is applied.
Left and Top axis are at 0,0 positions.
Use with StartPosition and EndPosition properties to define the Axis position on a Chart.
You may use these properties with default and additional Axis, see the example below:
Example - Create a Custom Axis
Code: Select all
//Creates a new Vertical Axis and defines a position for it. procedure TForm1.BitBtn2Click(Sender: TObject); Var MyAxis : TChartAxis ; begin MyAxis := TChartAxis.Create( Chart1 ); Series2.CustomVertAxis := MyAxis; //You can modify any property of the new created axes, such as the axis color or axis title With MyAxis do begin Axis.Color:=clGreen ; Title.Caption := 'Extra axis' ; Title.Font.Style:=[fsBold]; Title.Angle := 90; PositionPercent := 20; //percentage of Chart rectangle StartPosition:=50; EndPosition:=100; end; end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Can I adjust TeeChart's y-axis like this attachment?
Thank you very much
It was very useful comment :3
It was very useful comment :3