::adCenter::
Sales: +1 919.481.1974
Bookmark and Share
Essential Chart Windows Forms
Subject: Axis display Whole number
Maggie at 2/24/2006 6:40:05 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 [Syncfusion] at 2/27/2006 12:29:45 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 at 2/27/2006 9:38:08 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 at 2/27/2006 9:57:40 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 [Syncfusion] at 2/28/2006 7:57:15 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