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

Thread ID:





12501 Mar 31,2004 05:03 PM Apr 1,2004 03:20 PM Windows Forms 1
Tags: Chart
Asked On March 31, 2004 05:03 PM

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 03:20 PM

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.

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.