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

Bar Char X-Axis Problem.

Thread ID:





73127 Apr 21,2008 03:47 PM UTC May 2,2008 05:45 PM UTC ASP.NET Web Forms (Classic) 1
Tags: Chart
Azam Ali
Asked On April 21, 2008 03:47 PM UTC


I searched alot on this forum to get a similar post, but can't find.

Please see attached image. It tells, in what format I have data. and what Graph I need.

Basically, I need to show column names "0-30","31-60","61-90" etc at X-Axis, values of these columns will be mapped with Y-axis.

I saw samples, and checked series.Points.Add(15, 225) require Integer to be passed and no string.

Please advise in this regard.



J.Nagarajan [Syncfusion]
Replied On May 2, 2008 05:45 PM UTC

Hi Azam ,

You can customize the X Axis labels by setting TickLabelsDrawingMode to UserMode , clear the existing labels and add new custom labels as follows.

[C#] this.ChartWebControl1.PrimaryXAxis.TickLabelsDrawingMode = ChartAxisTickLabelDrawingMode.UserMode;
this.ChartWebControl1.PrimaryXAxis.Labels.Add(new ChartAxisLabel("0-30", Color.Black, new Font("Caliber", 8), 1, "", ChartValueType.Custom));
this.ChartWebControl1.PrimaryXAxis.Labels.Add(new ChartAxisLabel("31-60", Color.Black, new Font("Caliber", 8), 2, "", ChartValueType.Custom));
this.ChartWebControl1.PrimaryXAxis.Labels.Add(new ChartAxisLabel("61-90", Color.Black, new Font("Caliber", 8), 3, "", ChartValueType.Custom));

Please use this code and let me know if this helps.



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