Exception when Rendering a chart with many datapoints

Stimulsoft Reports.NET discussion
Post Reply
DCollins
Posts: 9
Joined: Tue Nov 27, 2012 2:05 pm

Exception when Rendering a chart with many datapoints

Post by DCollins »

Hello dear Stimulsoft support team,

in our software we use/generate a few (line) charts which use a couple hundred data points.
In the version of stimulsoft we currently use and also ship we have encountered an exception while rendering such charts.
It doesnt happen every time – it seems like it only happens when the chart does have more than 800 datapoints and the line has got gaps.

The exception which is raised is:
System.InvalidOperationException: Nullable object must have a value.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at Stimulsoft.Report.Chart.StiBaseLineSeriesCoreXF.OptimizePoints(Nullable`1[] points)
at Stimulsoft.Report.Chart.StiBaseLineSeriesCoreXF.RenderSeries(StiContext context, RectangleF rect, StiAreaGeom geom, IStiSeries[] series)
at Stimulsoft.Report.Chart.StiAxisAreaCoreXF.RenderSeries(StiContext context, RectangleF rect, StiAreaGeom geom, List`1 seriesCollection)
at Stimulsoft.Report.Chart.StiAxisAreaCoreXF.Render(StiContext context, RectangleF rect)
at Stimulsoft.Report.Chart.StiChartCoreXF.Render(StiContext context, RectangleF rect, Boolean useMargins)
at Stimulsoft.Report.Painters.StiChartGdiPainter.DrawChart(StiChart chart, Graphics g, RectangleF rect, Boolean useMargins, Boolean useBackground)
at Stimulsoft.Report.Painters.StiChartGdiPainter.PaintChart(StiChart chart, Graphics g, RectangleF rect, Boolean drawBorder, Boolean drawFormatting)
at Stimulsoft.Report.Painters.StiChartGdiPainter.GetImage(StiComponent component, Single& zoom, StiExportFormat format)
at Stimulsoft.Report.Chart.StiChart.GetImage(Single& zoom, StiExportFormat format)
at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf1(StiReport report, Stream stream, StiPdfExportSettings settings)
at Stimulsoft.Report.Export.StiPdfExportService.ExportPdf(StiReport report, Stream stream, StiPdfExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, StiExportService exportService, Stream stream, StiExportSettings settings)
at Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, Stream stream, StiExportSettings settings)


Current Version used: 2014.2.1924
Version used before that: 2013.2.1700 (without the described exception)
Latest version tried: 2014.2.2000 (Stimulsoft-Reports-Net-2014.2-Trial)

The exception can also be raised with the designer when previewing a chart (tried with versions 2014.x and later)

Attached (in ManyDatapointsChart.zip) you can find a sample MRT file including xsd and xml data. (to raise the described exception any given <column1> line of charttable_0 can be removed or commented out from the xml data).

We use a temporary work around which avoids the call of optimizePoints but on the long run can you please look into the error/exception and fix it.

Thank you in advance,
Doreen C
Attachments
ManyDatapointsChart.zip
mrt, xsd, xml data for chart with many data points
(10.9 KiB) Downloaded 162 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Exception when Rendering a chart with many datapoints

Post by HighAley »

Hello.

We have made an improvement.
Please, check our next prerelease build that will be available on October 31.

Thank you.
Post Reply