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.

Axis label formatting

Thread ID:

Created:

Updated:

Platform:

Replies:

17361 Aug 6,2004 10:41 AM Aug 6,2004 04:56 PM Windows Forms 1
loading
Tags: Chart
Jarrod Peace
Asked On August 6, 2004 10:41 AM

I am using a chart control with a PrimaryYAxis of ValueType double. When the labels are drawn, I would like to display a dollar sign in front. I can''t seem to get this to work right through the Format property of the axis. Any ideas as to how to accomplish this? Thanks a lot.

Davis Jebaraj [Syncfusion]
Replied On August 6, 2004 04:56 PM

Hi Jarrod, The ChartFormatAxisLabel event of the ChartControl can be handled to provide custom labels for any of the Axes. http://www.syncfusion.com/Support/article.aspx?id=10455 // Add the handler this.chartControl1.ChartFormatAxisLabel += new ChartFormatAxisLabelEventHandler(this.chartControl1_ChartFormatAxisLabelEventHandler); // The event handler private void chartControl1_ChartFormatAxisLabelEventHandler(object sender,ChartFormatAxisLabelEventArgs args ) { if(args.IsAxisPrimary && args.AxisOrientation == Orientation.Vertical) { if(args.Value >= 0 && args.Value < 10) args.Label = "Task " + (args.Value+1).ToString(); else args.Label = ""; args.Handled = true; } Regards, Davis

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.

;