I’m having some trouble adding large (8+ digit) numbers to the Y-axis of a chart at runtime. The Y-axis should display numbers (double data type) and the x-axis should display strings.
When I add a number under 8 digits (using Points.AddXY, Points.AddY, or Points.Add) I get an error saying this:
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
Additional information: The added or subtracted value results in an un-representable DateTime.’
There should be nothing date-related going on with the chart, only number values. This error occurs with and with decimals in the value I’m trying to add.
The odd thing is that the error doesn’t occur when I can the Points.Add method, but when I call Chart.Update. I can add all the data fine, but when I call update, it gives me the above error.
It seems like its treating the data as an OLE Automation Date, but I can’t imagine why. I set the Series. XValueType to String and Series. YValueType to Double at runtime for each series before adding the data.