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.

Bar Char X-Axis Problem.

Thread ID:

Created:

Updated:

Platform:

Replies:

73127 Apr 21,2008 11:47 AM May 2,2008 01:45 PM ASP.NET Web Forms (Classic) 1
loading
Tags: Chart
Azam Ali
Asked On April 21, 2008 11:47 AM

Hi

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.

Regards,
Azam.



graphrequired.zip

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

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.Clear();
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.

Thanks,
Nagaraj


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.

;