PawelTroka / Computator.NET

Computator.NET is a special kind of numerical software that is fast and easy to use but not worse than others feature-wise. It's features include: - Real and complex functions charts - Real and complex calculator - Real functions numerical calculations including different methods - Over 107 Elementary functions - Over 141 Special functions - Over 21 Matrix functions and operations - Scripting language with power to easy computations including matrices - You can declare your own custom functions with scripting language
GNU General Public License v3.0
233 stars 51 forks source link

Chart2D throws System.OverflowException when using Values close to decimal.MaxValue #6

Closed PawelTroka closed 8 years ago

PawelTroka commented 8 years ago

When using Values (either xmin, xmax, ymin, ymax or f(x) value) close to decimal.MaxValue or decimal.MinValue

    System.OverflowException: Value was either too large or too small for a Decimal.
       at System.Decimal..ctor(Double value)
       at System.Windows.Forms.DataVisualization.Charting.Axis.GetRequiredLabelSize(ChartGraphics chartGraph, Single maxLabelSize, Single& resultSize)
       at System.Windows.Forms.DataVisualization.Charting.Axis.Resize(ChartGraphics chartGraph, ElementPosition chartAreaPosition, RectangleF plotArea, Single axesNumber, Boolean autoPlotPosition)
       at System.Windows.Forms.DataVisualization.Charting.ChartArea.Resize(ChartGraphics chartGraph)
PawelTroka commented 8 years ago

Resolved easily by limiting max and min values for Chart2D in commit 775b49c71278c9e1c84164ec5eaab53bcff04b86.