Hello,
I have two custom axis as seen on the enclosed screen shot.
If the axis scale is set from -1 to 11 (as the first custom axis), everything is displayed OK.
If the axis scale is set from -2 to 11 (as the second custom axis), the lowest label disappears!
Here is the relevant code:
for i := 1 to 2 do
begin
Chart1.Axes.Items[i+5].SetMinMax(frmGraphSettings.ViewScaleFrom, frmGraphSettings.ViewScaleTo);
Chart1.Axes.Items[i+5].Increment := (frmGraphSettings.ViewScaleTo - frmGraphSettings.ViewScaleFrom)/10;
Chart1.Axes.Items[i+5].RoundFirstLabel := False;
end;
Do I do anything wrong, that causes the lowest label to disappear??
Lowest axis label disappears
Lowest axis label disappears
- Attachments
-
- Chart axis.JPG (42.48 KiB) Viewed 7208 times
Re: Lowest axis label disappears
Hi ChartIt,
I've tried to reproduce it with the following code but couldn't:
Could you please tell us wha exact TeeChart version and IDE are you using?
I've tried to reproduce it with the following code but couldn't:
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var n, i: Integer;
begin
Chart1.Align:=alClient;
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
Chart1.MarginRight:=10;
for n:=0 to 1 do
begin
Chart1.AddSeries(TFastLineSeries);
Chart1[n].Add(Random*10);
for i:=1 to 49 do
Chart1[n].Add(Chart1[n].YValue[i-1]+Random-0.4);
Chart1.CustomAxes.Add;
Chart1[n].CustomVertAxis:=Chart1.CustomAxes[n];
Chart1.CustomAxes[n].OtherSide:=true;
Chart1.CustomAxes[n].RoundFirstLabel:=false;
Chart1.CustomAxes[n].Axis.Visible:=false;
end;
Chart1.CustomAxes[0].Increment:=1.2;
Chart1.CustomAxes[1].Increment:=1.3;
Chart1.CustomAxes[0].SetMinMax(-1,11);
Chart1.CustomAxes[1].SetMinMax(-2,11);
Chart1.CustomAxes[1].LabelsFont.Color:=clRed;
Chart1.CustomAxes[1].PositionUnits:=muPixels;
Chart1.CustomAxes[1].PositionPercent:=Chart1.CustomAxes[1].PositionPercent-30;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Lowest axis label disappears
Sorry for the missing information.
I use TChart Pro v7.08 with Delphi 2006 on Windows XP Professional SP3.
I use TChart Pro v7.08 with Delphi 2006 on Windows XP Professional SP3.
Re: Lowest axis label disappears
Hi,
I get the same bad result when trying your code.
I get the same bad result when trying your code.
- Attachments
-
- Chart axis.JPG (141.84 KiB) Viewed 7136 times
Re: Lowest axis label disappears
Hi ChartIt,
I've reproduced the issue in a system like yours and I can confirm that the latest TeeChart VCL v2010 works as in the picture I showed you before.
You can try it if you want: http://www.steema.com/evaluation/vcl
In v7 I've also seen that playing with the MinimumOffset you could work around this:
I've reproduced the issue in a system like yours and I can confirm that the latest TeeChart VCL v2010 works as in the picture I showed you before.
You can try it if you want: http://www.steema.com/evaluation/vcl
In v7 I've also seen that playing with the MinimumOffset you could work around this:
Code: Select all
Chart1.CustomAxes[1].MinimumOffset:=1;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Lowest axis label disappears
Hi again
I upgraded to v2010 and the label disappearing problem seemed to be solved.
I then upgraded further to the "non-stable" upgrade to solve a couple of other issues.
It now seems like the label disappearing problem has been reintroduced (see screen shot).
What's going on??
I upgraded to v2010 and the label disappearing problem seemed to be solved.
I then upgraded further to the "non-stable" upgrade to solve a couple of other issues.
It now seems like the label disappearing problem has been reintroduced (see screen shot).
What's going on??
- Attachments
-
- Lower label.JPG (69.77 KiB) Viewed 7064 times
Re: Lowest axis label disappears
Hi ChartIt,
First, I've ran the project I proposed above and noticed nothing irregular.
Then I saw in your picture that you've changed the axes minimum and maximum, and , after trying the same than you, I could reproduce the problem.
So it seems to be reproducible in very particular cases, and still the MinimumOffset property seems to solve the problem.
Anyway, I've added it to the defect list to be revised fur future releases (TV52015150).
First, I've ran the project I proposed above and noticed nothing irregular.
Then I saw in your picture that you've changed the axes minimum and maximum, and , after trying the same than you, I could reproduce the problem.
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var n: Integer;
begin
Chart1.Align:=alClient;
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
Chart1.MarginLeft:=20;
for n:=0 to 4 do
begin
Chart1.AddSeries(TFastLineSeries);
Chart1[n].FillSampleValues();
Chart1.CustomAxes.Add;
Chart1[n].CustomVertAxis:=Chart1.CustomAxes[n];
with Chart1.CustomAxes[n] do
begin
Axis.Visible:=false;
Ticks.Visible:=false;
PositionUnits:=muPixels;
PositionPercent:=-n*30;
LabelsFont.Color:=Chart1[n].Color;
if ((n = 0) or (n = 1) or (n = 2)) then
SetMinMax(-24, 216)
else if (n = 3) then
SetMinMax(-0.2, 1.8)
else if (n = 4) then
SetMinMax(-0.3, 2.7);
Increment:=(Maximum - Minimum) / 10;
//MinimumOffset:=1; //workaround
end;
end;
end;
Anyway, I've added it to the defect list to be revised fur future releases (TV52015150).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |