Axis display Whole number
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
SIGN IN To post a reply.
4 Replies
GM
Geetha M
Syncfusion Team
February 27, 2006 05:29 AM UTC
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
MA
Maggie
February 27, 2006 02:38 PM UTC
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
MA
Maggie
February 27, 2006 02:57 PM UTC
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
GM
Geetha M
Syncfusion Team
February 28, 2006 12:57 PM UTC
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
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
MA Maggie
- Feb 24, 2006 11:40 PM UTC
- Feb 28, 2006 12:57 PM UTC