Jump to content
Software FX Community

Series starting with null value


kazuhiro

Recommended Posts

Hi, 

I get NullReferenceException when I bind an array of nullable intergers which starting with a null value. For instance:

 myChart.DataSourceSettings.DataSource = new ListProvider(new int?[] { null, 1, 2, 3, 4 }); // NullReferenceException thrown. 

Is there any way to walk around this problem? I do want that null value as a placeholder.

 Regards,Kazuhiro 

Link to comment
Share on other sites

The ListProvider does not support nullable value type at this point.

You will need to pass an array of doubles like this:

myChart.DataSourceSettings.DataSource = new ListProvider(new double[] { Chart.Hidden, 1, 2, 3, 4 });

Or you can use the Data API to pass the values one by one.

We will fix issue this in the next Service Pack.

Link to comment
Share on other sites

I thought ListProvider supports nullable values since it worked fine unless null value was placed at the head of the series.

Anyway, Chart.Hidden solved my problem. Thanks a lot, and I'm looking forward to the next service pack!

 Kazuhiro 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...