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 Range Labels

Thread ID:





12501 Mar 31,2004 10:03 PM UTC Apr 1,2004 08:20 PM UTC WinForms 1
Tags: Chart
Asked On March 31, 2004 10:03 PM UTC

I have used the following code to generate an x-axis range - chart.PrimaryXAxis.RangeType = ChartAxisRangeType.Set; chart.PrimaryXAxis.Range = new Range(Min, Max, IntervalSize); The resulting chart has x-axis labels marked by the interval count eg. 1, 2, 3 etc. I would like the labels to be the (IntervalCount x IntervalSize), eg.10, 20, 30 (given IntervalSize = 10). Is this possible ?

Davis Jebaraj [Syncfusion]
Replied On April 1, 2004 08:20 PM UTC

Hi, The ChartFormatAxisLabel event of the ChartControl can be handled to provide custom labels for any of the Axes. this.chartControl1.ChartFormatAxisLabel += new ChartFormatAxisLabelEventHandler(this.chartControl1_ChartFormatAxisLabelEventHandler); private void chartControl1_ChartFormatAxisLabelEventHandler(object sender,ChartFormatAxisLabelEventArgs args ) { if(args.IsAxisPrimary && args.AxisOrientation == Orientation.Horizontal) { args.Label = (args.Value*10).ToString(); args.Handled = true; } } Please see the sample linked to below: http://www.syncfusion.com/support/user/uploads/chartlabelscustom.zip 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