Jump to content
Software FX Community

Using ListProvider with double.NaN values


Pete

Recommended Posts

I know there are several different ways I can bind the data, but I was trying to plug in a double.NaN into both business objects and arrays of arrays and getting an overflow exception when I switch to a line chart.

As an example, I modified the arrayOfArraysButton_Click in the PassingData sample.  I changed the int arrays into double arrays and changed one of the values in series2 to double.NaN.  As soon as I change the gallery to a line type, I get an overflow exception.  There isn't an overflow exception with the bar chart, though the value for that point extends to the top of the chart.

Is this a bug, or by intention?  At this point, I'm probably just going to coerce my data into a DataTable.

Link to comment
Share on other sites

The list provider does not recognize double.NaN as a "null" value. Because a CLR double can not be null (double is a value type) the only way to get a a hidden point for a field that is a double is to have it be Chart.Hidden.

When data comes from a dataset, is a different story because even if the field is of type double it can contain a null value. We interpret this null value as a hidden point.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...