How to change chart step in runtime

Stimulsoft Reports.NET discussion
Post Reply
Joel Swift
Posts: 14
Joined: Thu Jan 25, 2007 4:23 am

How to change chart step in runtime

Post by Joel Swift »

Hello guys,
I'm using a compiled report with a chart. From my C# project I'm trying to change the chart step. The code in the report class is:
this.Chart1_Area.XAxis.Range.Auto = false;
this.Chart1_Area.XAxis.Range.Minimum = 10;
this.Chart1_Area.XAxis.Range.Maximum = 10;

The chart includes 3 series. In my code I define:
report.Chart1_seria1_item.GetListOfArguments += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.Chart1_seria1_item__GetListOfArguments); and so for each seria. Where should I set the step?

Thanks in advance.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to change chart step in runtime

Post by Edward »

Joel wrote:Hello guys,
I'm using a compiled report with a chart. From my C# project I'm trying to change the chart step. The code in the report class is:
this.Chart1_Area.XAxis.Range.Auto = false;
this.Chart1_Area.XAxis.Range.Minimum = 10;
this.Chart1_Area.XAxis.Range.Maximum = 10;

The chart includes 3 series. In my code I define:
report.Chart1_seria1_item.GetListOfArguments += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.Chart1_seria1_item__GetListOfArguments); and so for each seria. Where should I set the step?

Thanks in advance.
Especially for this situation Area of the Chart contains XAxis.Step and YAxis.Step properties. So when you define Maximum and Minimum bounds of your chart, set Range.Auto = false, the property Step allows you to set a step for the XAxis or YAxis. This parameter defines how often ticks will be signed on the appropriate XAxis or YAxis. These parameters will apply for all Series which was defined on the chart.

Thank you.
Joel Swift
Posts: 14
Joined: Thu Jan 25, 2007 4:23 am

How to change chart step in runtime

Post by Joel Swift »

When I define the Minimun and Maximum attributes in the report class, it works. But when I set those attributes in runtime, I get ArgumentOutOfRangeException:
report.Chart1_Area.XAxis.Range.Minimum = dateTime1.ToOADate();
report.Chart1_Area.XAxis.Range.Maximum = dateTime2.ToOADate();

Thanks.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to change chart step in runtime

Post by Edward »

Please take the latest build from the Prerelease versions of the Downloads section on our site.
http://www.stimulsoft.com/DownloadsSR.aspx

We've fixed this issue.

Thank you.
Joel Swift
Posts: 14
Joined: Thu Jan 25, 2007 4:23 am

How to change chart step in runtime

Post by Joel Swift »

I downloaded the latest build and the exeception is still thrown.
I saw that the C'tors of:
1. StiGridLinesHor has additional parameter minorCount. I put there 0.
2. StiAxisTicks has additional parameter step. I put there 5.

Thanks.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

How to change chart step in runtime

Post by Vital »

Please send your report (where you set step from designer) to support [at] stimulsoft [dot] com.

Thank you.
Post Reply