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. Image for the cookie policy date
close icon

Regarding x axis

I want to set the following X axis scale settings exactly as it is done in MS excel

(1) Category (Y) axis crosses at category number

(2) Number of categories between tick mark labels

(3) Number of categories between tick marks

(4) Value (Y) axis crosses between categories

Plz reply as soon as possible.

Thanks and regards,
uttreja


1 Reply

J. J.Nagarajan Syncfusion Team August 12, 2008 09:20 AM UTC

Hi Uttreja ,

Sorry for the delay in getting back to you.

You have to set the custom location of the PrimaryXAxis in the LayoutCompleted event, so that the Xaxis should cross the Yaxis value. Please refer to the below code snippet.

this.chartControl1.LayoutCompleted += new EventHandler(chartControl1_LayoutCompleted);
void chartControl1_LayoutCompleted(object sender, EventArgs e)
{
chartControl1.PrimaryYAxis.Range = new MinMaxInfo(0, 600, 100);
float AxisPosition = this.chartControl1.PrimaryYAxis.GetCoordinateFromValue(updatedAxisPsotion);
chartControl1.PrimaryXAxis.Location = new PointF(chartControl1.PrimaryXAxis.Location.X, AxisPosition);
}

Here is the working sample.

http://websamples.syncfusion.com/samples/Chart.Windows/F75112_Aug12/main.htm

Please refer to the sample and let me know if this helps.

Currently our chart control does not allow the user to set the number of categories between the tick marks and tick mark labels. We have logged a feature request in this regard and forwarded this to our development team for more analysis. I will get back to you with time frame for this feature on or before 18th August, 2008.

Thanks for your patience.

Thanks,
Nagaraj


Loader.
Live Chat Icon For mobile
Up arrow icon