ScrollPager doesn't respect the margin of customaxis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: ScrollPager doesn't respect the margin of customaxis

Post by Narcís » Fri Jun 20, 2014 2:46 pm

Hello wakeup,
wakeup wrote: Thanks but I don't need this, this is for changing the lables and the labels are right in my graph automatically. That's not the problem
I'm sorry but I don't understand your problem. Please send me a simple example project reproducing the exact problem you have and I'll try to come up with a solution.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

acastro
Advanced
Posts: 204
Joined: Tue Oct 27, 2009 12:00 am

Re: ScrollPager doesn't respect the margin of customaxis

Post by acastro » Fri Jun 20, 2014 3:32 pm

It is related with your code of this post:
http://www.teechart.net/support/viewtop ... 130#p65130

In order to get the width of the labels we do this?

Code: Select all

    double maxVal = chart.Series[current].CustomVertAxis.Maximum;

          float twidth = chart.Graphics3D.TextWidth(maxVal.ToString(chart.Series[current].CustomVertAxis.Labels.ValueFormat));
But by example when maxval is 94.33, and the he label doesn’t show decimals, so the label only shows 94 (this is right). But twidth is not right because “ValueFormat” says "#,##0.###". But I don't want to change the valueformat because it is interesting to show decimals if the scale is short (That is not the main point only to clarify I cannot change the ValueFormat).

The main point is, how can I know if the maximum label is showing with or without decimals? In order to solve the problem in the calculation of twidth...

Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: ScrollPager doesn't respect the margin of customaxis

Post by Narcís » Mon Jun 23, 2014 2:50 pm

Hi wakeup,

Thanks for the information. I understood which is your exact problem and we are looking for a solution to it, which is not easy. We will get back to you when we have some news.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: ScrollPager doesn't respect the margin of customaxis

Post by Narcís » Mon Jun 23, 2014 3:16 pm

Hi wakeup,
wakeup wrote: The main point is, how can I know if the maximum label is showing with or without decimals? In order to solve the problem in the calculation of twidth...
We might be overcomplicating things here. Have you tried using MaxLabelsWidth() method?

Code: Select all

chart.Axes.Left.MaxLabelsWidth();
Does this solve your problem?

Looking at this, it is a good moment to review the control settings of the tool. We have added a new feature request to improve that: http://bugs.teechart.net/show_bug.cgi?id=811
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

acastro
Advanced
Posts: 204
Joined: Tue Oct 27, 2009 12:00 am

Re: ScrollPager doesn't respect the margin of customaxis

Post by acastro » Tue Jun 24, 2014 1:21 pm

Apparently it runs perfect. It was exactly what I needed.
Thanks

Post Reply