Page 1 of 1

Axis Label Margins on 3D surface plot

Posted: Wed Sep 07, 2016 1:24 pm
by 16479009
Hi,

I would like to adjust the labels on a line chart so that they sit away from the axis itself - i.e. insert a space between the axis line and the labels for each tick. I am sure there must be a simple way to do this but I can't find it anywhere. The style of line chart I am using is a 3D surface plot but I would also like to include this feature for 2D plots. Any help would be greatly appreciated.

Regards

Re: Axis Label Margins on 3D surface plot

Posted: Thu Sep 08, 2016 10:12 am
by yeray
Hello,

I believe you are looking for this property:

Code: Select all

Chart1.Axes.Left.Texts.MarginToAxis:=100;

Re: Axis Label Margins on 3D surface plot

Posted: Thu Sep 08, 2016 10:39 am
by 16479009
Thanks but unfortunately this property is not available to me in my verion of TeeChart which is for RAD Studio XE6.

Re: Axis Label Margins on 3D surface plot

Posted: Fri Sep 09, 2016 7:14 am
by yeray
Hello,

Could you please precise what exact TeeChart version and build are you using in XE6?

Re: Axis Label Margins on 3D surface plot

Posted: Fri Sep 09, 2016 8:05 am
by 16479009
It is listed in the package list as 'TeeChart Pro 2015 VCL Components'.

Re: Axis Label Margins on 3D surface plot

Posted: Fri Sep 09, 2016 8:57 am
by yeray
Hello,
Sharpenski wrote:It is listed in the package list as 'TeeChart Pro 2015 VCL Components'.
We published three releases in 2015.

- The easiest way to know what exact design time package do you have installed in the IDE, please right click on a chart at design time. The first item in the context menu should indicate the build number of the design time package installed.

- The easiest way to know what runtime package are you using at runtime, please add the VCLTee.TeeConst unit in the uses clause and run this code:

Code: Select all

  ShowMessage(TeeMsg_Version);
Note you can have a version installed in the design time packages and another version being used at runtime (referenced in the paths), so it's worth to check if both the design time and the runtime packages match.

Re: Axis Label Margins on 3D surface plot

Posted: Fri Sep 09, 2016 9:22 am
by 16479009
TeeChart Pro v2015.14.150120 32bit VCL is what is printed.

Re: Axis Label Margins on 3D surface plot

Posted: Mon Sep 12, 2016 10:07 am
by yeray
Hello,

I've checked the MarginToAxis property was introduced in TeeChart v2016.17.

Re: Axis Label Margins on 3D surface plot

Posted: Mon Sep 12, 2016 3:59 pm
by 16479009
Oh, does that mean it's impossible or is there an alternative?

Re: Axis Label Margins on 3D surface plot

Posted: Tue Sep 13, 2016 7:44 am
by yeray
Hello,
Sharpenski wrote:, does that mean it's impossible or is there an alternative?
Since writing in this forum is restricted to customers with an active subscription, I assumed you could update to the latest version.
An alternative for version prior to v2016.17 would be to override the Axis Format.ShapeBounds at OnDrawLabel as in the following example:

Code: Select all

  //...
  Chart1.Axes.Left.OnDrawLabel:=AxisDrawLabel;
  //...
procedure TForm1.AxisDrawLabel(Sender:TChartAxis; var X,Y,Z:Integer; var Text:String;
                               var DrawLabel:Boolean);
begin
  Sender.Items.Format.ShapeBounds.Left:=Sender.Items.Format.ShapeBounds.Left-20;
end;

Re: Axis Label Margins on 3D surface plot

Posted: Tue Sep 13, 2016 8:37 am
by 16479009
Thanks, does the latest version work alongside Delphi XE6?

Re: Axis Label Margins on 3D surface plot

Posted: Wed Sep 14, 2016 10:49 am
by yeray
Hello,
Sharpenski wrote:does the latest version work alongside Delphi XE6?
Yes. See the product page:
Embarcardero IDEs supported include:
- Delphi XE to XE8, Delphi 10 Seattle, Delphi 10.1 Berlin
- C++Builder XE to XE8, C++Builder 10 Seattle, C++Builder 10.1 Berlin
- RAD Studio XE to XE8, RAD Studio 10 Seattle, RAD Studio 10.1 Berlin
- Delphi 7, Delphi/C++ Builder/RAD Studio 2007, 2009 and 2010 (sourcecode version only)