tick with label at the intersection of the two axes

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
cssesuc
Newbie
Newbie
Posts: 44
Joined: Wed Apr 08, 2015 12:00 am

tick with label at the intersection of the two axes

Post by cssesuc » Wed Oct 21, 2015 9:47 am

dear experts,
As it is illustrated on the attached screen capture, I need to have series with the vertical axis which has a first tick at its intersection with the horizontal axis.
In the attached example, I want to have 1E+9 displayed.
I had a careful look at the different options of the LeftAxis, but failed to come to something which is functional.
How can I force the Chart to display a first tick with label at the intersection of the x-axis and the vertical axis.
Attachments
Capture.PNG
Capture.PNG (10.92 KiB) Viewed 6980 times
thanks,
Nabil Ghodbane (PhD. Habil)

Yeray
Site Admin
Site Admin
Posts: 9534
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: tick with label at the intersection of the two axes

Post by Yeray » Wed Oct 21, 2015 2:57 pm

Hello Nabil,

You should set the Left axis AutomaticMinimum property to false it then you should be able to set a Minimum for the axis.

If you still find problems with it, please arrange a simple example project we can run as-is to reproduce the problem here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

cssesuc
Newbie
Newbie
Posts: 44
Joined: Wed Apr 08, 2015 12:00 am

Re: tick with label at the intersection of the two axes

Post by cssesuc » Wed Oct 21, 2015 4:37 pm

Hi,
many thanks for the suggestion. This is indeed what I did in the end, but this was not enough. In addition, I had to fix the minimum value of the LeftAxis, such that the label at the intersection of the horizontal and the vertical axes is displayed. To do this, I simply:
- find the minimum of the series (s_min, s_min is always positive in my case),
- search for the value of n, such that 10^n+1 > s_min >= 10^n,
- fix LeftAxis.Minimum to 10^n

thanks
Attachments
CaptureAfter.PNG
LeftAxis.AutomaticMinimum := False + LeftAxis.Minimum := set to 10^n with 10^n+1 > s_min >= 10^n,
CaptureAfter.PNG (36.74 KiB) Viewed 6941 times
CaptureBefore.PNG
LeftAxis.AutomaticMinimum := False + LeftAxis.Minimum := set to s_min
CaptureBefore.PNG (36.66 KiB) Viewed 6938 times
thanks,
Nabil Ghodbane (PhD. Habil)

Yeray
Site Admin
Site Admin
Posts: 9534
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: tick with label at the intersection of the two axes

Post by Yeray » Thu Oct 22, 2015 8:30 am

Hello Nabil,

I'm glad to hear you found how to achieve it! :D
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply