I have a problem with a LineChart. Ich have a datatable with a datetime on the y-axis and decimals on the x-axis. If all my decimal values are 0 the chart throws a OverflowException beacuse it tries to paint a line from x1 = -2147483555 y1 = 100 to x2 = -2147483555 y2 = 41.
I have no idea why it does not simply paint a line along the x-axis. I am using Version v3.00.20033.
Thank you for this answer!
It works perfectly for me.
Again, thank you very much!
In a case where you have all 0s, you can try setting a manual range on your Y axis. Something like this:if (all zeroes) chart.Axis.Y.RangeMin = -1 chart.Axis.Y.RangeMax = 1 chart.Axis.Y.RangeType = AxisRangeType.Custom
Hi,
You can test this code with the trial version 10.3 of Infragistics components which you can download from our website at Infragistics.com.
Let me know if the issue is still present with it.
Regards,
Stefaniya
Thanks for your help, but I am getting the error again. But thats not such a tragedy because we will switch to a hight version i a few months.
But if someone might have an answer it would be great. We use Infragistics 2003 (V3) at the moment.
Again thankt for your help.
I was still unable to reproduce the problem. This actually might be something that was fixed in the past, so try the following code snippet and if it breaks, try downloading and installing the latest service release for your version of NetAdvantage.
DataTable dt = new DataTable();dt.Columns.Add("col1", typeof(DateTime));dt.Columns.Add("col2", typeof(decimal));dt.Rows.Add(new object[] { DateTime.Parse("1/1/2010"), 0 });dt.Rows.Add(new object[] { DateTime.Parse("2/1/2010"), 0 });dt.Rows.Add(new object[] { DateTime.Parse("3/1/2010"), 0 });dt.Rows.Add(new object[] { DateTime.Parse("4/1/2010"), 0 });dt.Rows.Add(new object[] { DateTime.Parse("5/1/2010"), 0 });
ultraChart1.ChartType = ChartType.LineChart;
ultraChart1.LineChart.TreatDateTimeAsString = false;ultraChart1.Data.SwapRowsAndColumns = true;ultraChart1.DataSource = dt;