Setting x-axis with out decimal

Stimulsoft Reports.NET discussion
Post Reply
soober
Posts: 6
Joined: Tue May 15, 2012 11:25 am
Location: KSA

Setting x-axis with out decimal

Post by soober »

Dear All:
I have a report chart in which when i assign data, if the value is less then 5 so the x-axis scale is display in decimal..

e.g

0 0.5 1 1.5 2 2.5

I want like this

0 1 2 3 4 5 etc

check the below picture

Regards
Attachments
1831.report.png
1831.report.png (10.79 KiB) Viewed 1215 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Setting x-axis with out decimal

Post by HighAley »

Hello.

Please, set the Area - X Axis - Labels - Step property of the Chart to 1.

Thank you.
soober
Posts: 6
Joined: Tue May 15, 2012 11:25 am
Location: KSA

Setting x-axis with out decimal

Post by soober »

Thank you very much .. it solve my problem.. :)

but how can i set this X-Axis - Label - Step from the coding.. may be the quantity reach to 2000 so the step will be still one,, in this case i want to set it at run time, base on the quantity i have.

Regards
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Setting x-axis with out decimal

Post by HighAley »

Hello.
soober wrote:Thank you very much .. it solve my problem.. :)

but how can i set this X-Axis - Label - Step from the coding.. may be the quantity reach to 2000 so the step will be still one,, in this case i want to set it at run time, base on the quantity i have.
Please try to use next code:

Code: Select all

StiChart chart = (rep.GetComponentByName("Chart1") as StiChart);
((Stimulsoft.Report.Chart.StiAxis)(((Stimulsoft.Report.Chart.StiAxisArea)(chart.Area)).XAxis)).Labels.Step = 2;
Thank you.
soober
Posts: 6
Joined: Tue May 15, 2012 11:25 am
Location: KSA

Setting x-axis with out decimal

Post by soober »

Thank you very much .. It solve my problem :)
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Setting x-axis with out decimal

Post by Andrew »

Hello,

Great!

Have a nice day!
Thank you.
Post Reply