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.

Scatter Chart

Thread ID:

Created:

Updated:

Platform:

Replies:

80536 Apr 8,2009 02:30 PM May 11,2009 02:27 AM Windows Forms 5
loading
Tags: Chart
Administrator [Syncfusion]
Asked On April 8, 2009 02:30 PM

How can I get the location of the x-axis line and y-axis line in respect to the chart area. I notice they move location depending on data.


Administrator [Syncfusion]
Replied On April 8, 2009 04:15 PM

Basically, I need the chartInterior's location and width. I can get the chartArea's location and width, but I need the chartInterior's location and width since it changes with respect to the data.


Manimala S [Syncfusion]
Replied On April 9, 2009 08:25 AM

Hi,

We have the properties of the chart axis to get the location and width of the chart interior.

This can be done in the following way.

For width of the chart interior we have:

this.chartControl1.PrimaryXAxis.RealLength.ToString();

which return the length of the X-Axis, which is the width of the chart interior.

And for getting the location of the chart interior we have the location property of the axis.

eg:
this.chartControl1.PrimaryXAxis.Location.X.ToString();
this.chartControl1.PrimaryXAxis.Location.Y.ToString();

this gives the location of the chart interior.

I have created a simple sample to demonstrate this.

Kindly, get the sample from the following location

Sample File

Kindly, let me know if it meets your requirement.

Thanks,
Manimala.




Administrator [Syncfusion]
Replied On April 9, 2009 12:31 PM

Please See attached image of what I need. When I use the:
chartControl1.ChartArea.PrimaryXAxis.Location.X
chartControl1.ChartArea.PrimaryXAxis.Location.Y

These don't give me the actual location of the X and Y axis. I need the width of the area in green.

using this.chartControl1.PrimaryXAxis.RealLength, I get a value of 750 but, the area in green seems to be only 725. Does the
this.chartControl1.PrimaryXAxis.RealLength include the areas in yellow, too?

The area in green changes dynamically based on data and labels on the x and y axis line.

Thanks,
Aymiee



ScatterImage_58cf5976.zip

Administrator [Syncfusion]
Replied On April 11, 2009 01:09 PM

Thanks, your solution did the trick. I had to take into consideration the margins.


Manimala S [Syncfusion]
Replied On May 11, 2009 02:27 AM

Hi Aymiee,

That was great. Thanks for the update.

Thanks for your continuous support.

Thanks,
Manimala.


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.

;