Chart - Autoscale axis
-
- Posts: 37
- Joined: Wed Oct 11, 2006 3:44 am
Chart - Autoscale axis
Is it possible to get the y-axis to autoscale depending on the range of values being displayed?
I have data which sit around 70 to 140 so would like the chart to show only 70 to 140 not zero to 140.
Is this possible?
Many thanks
Ian
I have data which sit around 70 to 140 so would like the chart to show only 70 to 140 not zero to 140.
Is this possible?
Many thanks
Ian
Chart - Autoscale axis
You can use property Range - Axis.YAxis.Range.
This property avaialble only in version 2006.4
Thank you.
This property avaialble only in version 2006.4
Thank you.
-
- Posts: 37
- Joined: Wed Oct 11, 2006 3:44 am
Chart - Autoscale axis
I have a chart on a detail data band, so this gets presented several times each with a different data set.
Can I determine the current valid data range for each chart during the render event and modify the chart range from there?
Thereby always expanding the chart to show the maximum detail.
Many thanks
Ian
Can I determine the current valid data range for each chart during the render event and modify the chart range from there?
Thereby always expanding the chart to show the maximum detail.
Many thanks
Ian
-
- Posts: 37
- Joined: Wed Oct 11, 2006 3:44 am
Chart - Autoscale axis
I can't locate Range or even YAxis as a member of StiArea.
Range doesn't appear in the design view either.
Stimulsoft.Report.Chart.StiChart chart
chart.Area.???
Where exactly can I find the range member?
Range doesn't appear in the design view either.
Stimulsoft.Report.Chart.StiChart chart
chart.Area.???
Where exactly can I find the range member?
Chart - Autoscale axis
Please use following path:
((Stimulsoft.Report.Chart.StiAxisArea)chart.Area).XAxis.Range
((Stimulsoft.Report.Chart.StiAxisArea)chart.Area).XAxis.Range
-
- Posts: 37
- Joined: Wed Oct 11, 2006 3:44 am
Chart - Autoscale axis
Get reference to chart object:
Stimulsoft.Report.Chart.StiChart chart = report.Pages[0].GetComponents()["Chart1"] as Stimulsoft.Report.Chart.StiChart;
Try to set new range (don't know if this is the right way because I can't find any relevant documentation)
((Stimulsoft.Report.Chart.StiAxisArea)chart.Area).XAxis.Range = new object[70, 140];
But compiler complains:
'Stimulsoft.Report.Chart.StiXAxis' does not contain a definition for 'Range'
Which is backed up by intellisense (no Range in list).
Ian
Stimulsoft.Report.Chart.StiChart chart = report.Pages[0].GetComponents()["Chart1"] as Stimulsoft.Report.Chart.StiChart;
Try to set new range (don't know if this is the right way because I can't find any relevant documentation)
((Stimulsoft.Report.Chart.StiAxisArea)chart.Area).XAxis.Range = new object[70, 140];
But compiler complains:
'Stimulsoft.Report.Chart.StiXAxis' does not contain a definition for 'Range'
Which is backed up by intellisense (no Range in list).
Ian
Chart - Autoscale axis
Sorry, but this code works only in StimulReport.Net 2006.4IanMcCarthy wrote:Get reference to chart object:
Stimulsoft.Report.Chart.StiChart chart = report.Pages[0].GetComponents()["Chart1"] as Stimulsoft.Report.Chart.StiChart;
Try to set new range (don't know if this is the right way because I can't find any relevant documentation)
((Stimulsoft.Report.Chart.StiAxisArea)chart.Area).XAxis.Range = new object[70, 140];
But compiler complains:
'Stimulsoft.Report.Chart.StiXAxis' does not contain a definition for 'Range'
Which is backed up by intellisense (no Range in list).
Ian
You can download it from the following links:
http://www.stimulsoft.com/RegisteredUsers.aspx (for registered users)
http://www.stimulsoft.com/DownloadsSR.aspx (demo versions)
Thank you.
-
- Posts: 37
- Joined: Wed Oct 11, 2006 3:44 am
Chart - Autoscale axis
OK, updated to latest demo dlls and range is now available.
I want to set the range based upon the actual values of the YAxis data as the detail chart is drawn.
When I put code in the BeginRender event of the databand, the data series in the chart is still the demo data [1, 2, 3] not my sql data.
Can I achieve this?
Ian
I want to set the range based upon the actual values of the YAxis data as the detail chart is drawn.
When I put code in the BeginRender event of the databand, the data series in the chart is still the demo data [1, 2, 3] not my sql data.
Can I achieve this?
Ian
Chart - Autoscale axis
Please send your report to
for analysis. If it is possible please provide your data for the chart (in any format).
Thank you.

Thank you.
Chart - Autoscale axis
Please use in version from 10.17.2006 following code in ProcessChartEvent of chart:
Thank you.
Code: Select all
Stimulsoft.Report.Chart.StiChart chart = sender as Stimulsoft.Report.Chart.StiChart;
Stimulsoft.Report.Chart.StiSeries series = chart.Series[0];
double dMax = double.MinValue;
double dMin = double.MaxValue;
foreach (double d in series.Values)
{
dMin = Math.Min(d, dMin);
dMax = Math.Max(d, dMax);
}
((Stimulsoft.Report.Chart.StiAxisArea)chart.Area).YAxis.Range.Minimum = dMin;
((Stimulsoft.Report.Chart.StiAxisArea)chart.Area).YAxis.Range.Maximum = dMax;
((Stimulsoft.Report.Chart.StiAxisArea)chart.Area).YAxis.Range.Auto = false;