axes offset and others

TeeChart for ActiveX, COM and ASP
Post Reply
Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Thu Feb 12, 2009 6:20 am

Hi Narcis,
how are you? I have few new requirements here now where I need your support. I am using TeeChart Actives control v8 for my web application. While plotting the chart the series starts from 0 and end to the last point avalable. I need to have some blankspace(margin) on all the sides on the chart. I mean the series should start from 0 but it should not be the starting point of the chart also. Same for all the other sides also. If the series last point is 100, I need some blank space after 100 also. Another thing is regarding the cross point series placement. I need to put them at the extreme bottom and extreem top not connected with the series. please help with the idea how to place the chart label with equal divisions, say if I have 100 data points and I need 10 label points then it should be displayed something like 0,10,20,...100 and some more extra space at the end.
Please help me out with these issues.
Thanks and regards
Ashutosh

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

Post by Yeray » Thu Feb 12, 2009 10:44 am

Hi Ashutosh,

I think what you want is to set a maximum and a minimum offset for the axes. Please, try the properties:

Code: Select all

  TChart1.Axis.Bottom.MinimumOffset = 100
  TChart1.Axis.Bottom.MaximumOffset = 100
And regarding the labels you want to display, I think that what you need is some annotation tools with custom position. Could you take a look at the demo "All Features/Tools/Annotation"?
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

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Fri Feb 13, 2009 7:36 am

Hi,
I am trying to alter the left axis(Y Axis) increment value to some custom value. The LOC I am using is:TChart1.Axis.Left.Increment = Math.Floor(Math.Abs((System.Convert.ToDouble(MinYVal) - System.Convert.ToDouble(MaxYVal)) / 5));
But it always displays the chart with difault values that is calculated automatically.
The same works fine for bottom axis but not working for left.

Please help
Thanks and regards
Ashutosh

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

Post by Yeray » Fri Feb 13, 2009 8:14 am

Hi Ashutosh,

I think you need to do something like this:

Code: Select all

TChart1.Axis.Left.Automatic = False
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

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Fri Feb 13, 2009 8:23 am

Hi Yeray,

Thanks for your response, But I have already set the TChart1.Axis.Left.Automatic value to false.

Please help...
Thanks
Ashutosh

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Fri Feb 13, 2009 8:27 am

Hi,
If I set the Increment value 5 the value appears on Left axis like:10,20,30. Same with bottom axis also. I have set the value to 50 it is appearing like:0,100,200,300. Not able to understand why.

Please suggest the needful.
Thanks
Ashutosh

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

Post by Yeray » Fri Feb 13, 2009 9:04 am

Hi Ashutosh,

Excuse me, it seems that you don't need to set the automatic axis property to false. Setting the increment it should take effect.

The increment works like a "minimum" increment. The labels will be displayed with this increment if there is enough space to draw them without overlapping.
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

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

Post by Yeray » Fri Feb 13, 2009 9:06 am

Hi again Ashutosh,

If you want to force the labels to be overlapped if necessary, you could do the following:

Code: Select all

TChart1.Axis.Left.Labels.Separation = 0
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

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Fri Feb 13, 2009 9:22 am

Hi Yeray.

Thanks a lot.

TChart1.Axis.Left.Labels.Separation = 0 is really helpful.

Regards
Ashutosh

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

Post by Yeray » Tue Feb 17, 2009 3:29 pm

Hi Ashutosh,

We splitted the last message you posted into a new thread because it was not about the same subject discussed here. The new thread is here:

http://www.teechart.net/support/viewtopic.php?t=9242
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