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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Axis label formatting

Thread ID:





17361 Aug 6,2004 02:41 PM UTC Aug 6,2004 08:56 PM UTC WinForms 1
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


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

Live Chat Icon For mobile
Live Chat Icon