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.
Syncfusion Feedback

Axis Range Labels

Thread ID:

Created:

Updated:

Platform:

Replies:

12501 Mar 31,2004 10:03 PM UTC Apr 1,2004 08:20 PM UTC Windows Forms 1
loading
Tags: Chart
JKato
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

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

;