We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to determine size of axis (+ label + title)

Thread ID:

Created:

Updated:

Platform:

Replies:

58821 Mar 29,2007 03:50 AM Mar 30,2007 03:14 PM Windows Forms 2
loading
Tags: Chart
Pisin Bootvong
Asked On March 29, 2007 03:50 AM

When my chart have multiple Y-axis, I knew I should manually add more right margin, so that there are enough space to display all the axis.

The problem is I don't know how big each axis is, is there any way to determine the size of each axis, plus its label and title, so that I can correctly add the margin?

Administrator [Syncfusion]
Replied On March 30, 2007 06:32 AM

Hi Pisin,

My apologies for the delay in responding to you.

If your intention is to view all the axes at the left side of Chart then it can be done by adjusting the margin of ChartArea as shown in the code snippet below,

this.chartControl1.ChartArea.ChartAreaMargins.Left = (int)(this.chartControl1.PrimaryYAxis.Location.X - axis1.Location.X);
// Here axis1 is the last secondaryaxis.
//The PrimaryYAxis's and last secondaryaxis's location should be used for the calculation of ChartAreaMargin.

Kindly take a look at the attached sample.

You can download the sample from the below given Webpage link,
http://websamples.syncfusion.com/samples/Chart.Windows/F58821/main.htm

Let me know whether this helps you.

Thanks & Regards,
Ramya.

Pisin Bootvong
Replied On March 30, 2007 03:14 PM

Hi,

thank you,
the offset calculation works great.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;