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 display Whole number

Thread ID:

Created:

Updated:

Platform:

Replies:

41229 Feb 24,2006 06:40 PM Feb 28,2006 07:57 AM Windows Forms 4
loading
Tags: Chart
Maggie
Asked On February 24, 2006 06:40 PM

Hi, I set my Y axis Max and Min both to a #.00 number, and with interval = 20. But the Axis label still displays something like 24.56. Is there a way to to set it to display whole number only? Also, is it possible to have the interval = 10, but only show every other label? meaning only 20, 40, 60, will be displayed? Thanks, Maggie

Geetha M [Syncfusion]
Replied On February 27, 2006 12:29 AM

Hi Maggie, Yes. You can display the label as whole number by setting the Format property of that particular axis as "#". You can have interval at 10 with the labels marked for 20, 40 etc. by setting the SmallTicksPerInterval property as 2. The following code illustrates this: this.chartControl1.PrimaryYAxis.Format ="#"; this.chartControl1.PrimaryYAxis.SmallTicksPerInterval = 2; this.chartControl1.PrimaryYAxis.SmallTickSize = new Size(2,1); Please let me know if this helps you. Thanks for your interest in Syncfusion products. Regards, Geetha

Maggie
Replied On February 27, 2006 09:38 AM

Thanks a lot for your timely reply. Maggie >Hi Maggie, > >Yes. You can display the label as whole number by setting the Format property of that particular axis as "#". > >You can have interval at 10 with the labels marked for 20, 40 etc. by setting the SmallTicksPerInterval property as 2. > >The following code illustrates this: > >this.chartControl1.PrimaryYAxis.Format ="#"; > >this.chartControl1.PrimaryYAxis.SmallTicksPerInterval = 2; > >this.chartControl1.PrimaryYAxis.SmallTickSize = new Size(2,1); > > >Please let me know if this helps you. > >Thanks for your interest in Syncfusion products. > >Regards, >Geetha

Maggie
Replied On February 27, 2006 09:57 AM

Another Question, is it possible when I have the Y axis to have intervals of 10, and display every other label, AND have grid lines every 10 points? according to the settings you said earlier, the grid lines still appear every 20 points. thanks, Maggie >Hi Maggie, > >Yes. You can display the label as whole number by setting the Format property of that particular axis as "#". > >You can have interval at 10 with the labels marked for 20, 40 etc. by setting the SmallTicksPerInterval property as 2. > >The following code illustrates this: > >this.chartControl1.PrimaryYAxis.Format ="#"; > >this.chartControl1.PrimaryYAxis.SmallTicksPerInterval = 2; > >this.chartControl1.PrimaryYAxis.SmallTickSize = new Size(2,1); > > >Please let me know if this helps you. > >Thanks for your interest in Syncfusion products. > >Regards, >Geetha

Geetha M [Syncfusion]
Replied On February 28, 2006 07:57 AM

Hi Maggie, To display the gridlines without displaying the labels you can go for the FormatAxisLabel event using which specified labels can be deleted. Please refer the attached sample which illustrates this. F41229.zip I hope this helps you. Thanks and Regards, Geetha

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.

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.

;