Page 1 of 1

Converting from v707 to v2014

Posted: Wed Dec 24, 2014 4:46 pm
by 16470902
charts.png
charts.png (20.16 KiB) Viewed 7936 times
I am converting a program from WinXP/Delphi6/TeeChart v707 to Win7/Delphi7/TeeChart v2014.

The above attachment shows the different results.

Both charts have the same values (green is 12 and red is 99)

The TeeChart 707 for Delphi 6 correctly shows the Y value 0 at the base of the chart and the green value is at 12 red at 99
The TeeChart 2014 for Delphi 7 INCORRECTLY shows the Y value 0 up at approximately value 5 and the Green value seems to be about 5.

I cannot seem to find the chart setting to change the Y Axis to set 0 at the bottom of the chart and have the chart appear like the older version.

Any help would be appreciated

Re: Converting from v707 to v2014

Posted: Mon Dec 29, 2014 8:59 am
by narcis
Hello,

Using this code with v2014:

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=False;
  Chart1.AddSeries(TBarSeries.Create(Self));

  Chart1[0].Add(12, '', clGreen);
  Chart1[0].Add(99, '', clRed);
end;
I get this chart:
CorrectBars.jpg
CorrectBars.jpg (24.32 KiB) Viewed 7896 times
which is correct, just as your v7 chart. Does this code work fine at your end? Can you please attach a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.

Re: Converting from v707 to v2014

Posted: Mon Dec 29, 2014 6:25 pm
by 16470902
I have found the problem.

With the new version if you have the left axis labels set to 90 degree rotation it will not display correctly but if I set the rotation to 45 degrees it works fine.

Thank you for the reply.

Re: Converting from v707 to v2014

Posted: Tue Dec 30, 2014 8:31 am
by narcis
Hi Nonstop,

Thanks for the information. However, code below works fine for me here.

Code: Select all

uses Series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D := False;
  Chart1.AddSeries(TBarSeries.Create(Self));

  Chart1[0].Add(12, '', clGreen);
  Chart1[0].Add(99, '', clRed);

  Chart1.Axes.Left.LabelsAngle := 90;
end;
As you can see in this image:
CorrectBars2.jpg
CorrectBars2.jpg (41.43 KiB) Viewed 7883 times
Does this work fine for you? Can you please attach a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.

Re: Converting from v707 to v2014

Posted: Tue Dec 30, 2014 3:02 pm
by 16470902
I don't think you understand the problem.

On the chart you created look at the green bar, its value is 12 but if you look at the number it aligns with on the left axis labels it is more like 6.
The axis grid lines are correct but the axis labels are not aligned with the axis grid lines

Re: Converting from v707 to v2014

Posted: Tue Dec 30, 2014 3:12 pm
by narcis
Hello,

Thanks for the feedback.

Ok, I understand it now and added the defect (ID1067) to bugzilla. A workaround is setting the labels to 89ยบ, e.g.:

Code: Select all

  Chart1.Axes.Left.LabelsAngle := 89;