Hi All,
I am doing a charting project and I am supposed to save the charts into its individual image files.
If I were to do a trend data of 1 to 2 months are 1 minute interval, I do not face any problem. However if I expand the trend to 3 months or more, I get an OverflowException when saving.
Any advice is greatly appreciated.
The exception trace is as follows:
at System.Decimal..ctor(Double value)
at System.Windows.Forms.DataVisualization.Charting.Axis.RoundedValues(Double inter, Boolean shouldStartFromZero, Boolean autoMax, Boolean autoMin, Double& min, Double& max)
at System.Windows.Forms.DataVisualization.Charting.Axis.EstimateNumberAxis(Double& minimumValue, Double& maximumValue, Boolean shouldStartFromZero, Int32 preferredNumberOfIntervals, Boolean autoMaximum, Boolean autoMinimum)
at System.Windows.Forms.DataVisualization.Charting.Axis.EstimateAxis(Double& minimumValue, Double& maximumValue, Boolean autoMaximum, Boolean autoMinimum)
at System.Windows.Forms.DataVisualization.Charting.Axis.EstimateAxis()
at System.Windows.Forms.DataVisualization.Charting.ChartArea.SetDefaultAxesValues()
at System.Windows.Forms.DataVisualization.Charting.ChartArea.SetData(Boolean initializeAxes, Boolean checkIndexedAligned)
at System.Windows.Forms.DataVisualization.Charting.ChartArea.ReCalcInternal()
at System.Windows.Forms.DataVisualization.Charting.ChartPicture.Paint(Graphics graph, Boolean paintTopLevelElementOnly)
at System.Windows.Forms.DataVisualization.Charting.ChartImage.GetImage(Single resolution)
at System.Windows.Forms.DataVisualization.Charting.Chart.SaveImage(Stream imageStream, ChartImageFormat format)
at System.Windows.Forms.DataVisualization.Charting.Chart.SaveImage(String imageFileName, ChartImageFormat format)
What I have tried:
I am currently using Single/float values in my series so I am not sure why this kind of exception is thrown.