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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:





58821 Mar 29,2007 07:50 AM UTC Mar 30,2007 07:14 PM UTC WinForms 2
Tags: Chart
Pisin Bootvong
Asked On March 29, 2007 07:50 AM UTC

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 10:32 AM UTC

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,

Let me know whether this helps you.

Thanks & Regards,

Pisin Bootvong
Replied On March 30, 2007 07:14 PM UTC


thank you,
the offset calculation works great.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon