Jump to content
Software FX Community

Using ListProvider with double.NaN values


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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...