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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Axis label formatting

Thread ID:

Created:

Updated:

Platform:

Replies:

17361 Aug 6,2004 02:41 PM UTC Aug 6,2004 08:56 PM UTC WinForms 1
loading
Tags: Chart
Jarrod Peace
Asked On August 6, 2004 02:41 PM UTC

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 08:56 PM UTC

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.

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

;