This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, How can I add empty points (missing values) to line or bar series? Please write an example in Visual Basic language. Thanks |
|
|
The bar and line series both detect a variety of empty points and other data types. As the Nothing keyword in vb.net represents the default value you need to set the generic type that your data collection holds to be nullable:
Null values in your collection will then be detected and displayed appropriately. Shown here are a few ways your null data could be represented, with a null point, a point containing null data, the Y value being NotANumber, and the X value being null, respectively:
This will of course work where Data is bound to the ItemsSource of a BarSeries or LineSeries. The former will display an empty missing bar along the X axis, while the LineSeries will show a gap in the line. Note that this also applies to other data types that can be in your Collection - we support drawing charts from a wide range of other types like collections of ints/doubles as well as our built-in DateTimeDouble and StringDouble types. As long as the '?' operator is used after the type any objects in these can be null and they will be displayed properly. |
|
|
Thank you for your response. The barseries is correct, but the line series is not. What is wrong? |
|
|
Ah, the LineSeries supports the following forms of null data items:
The other two (in the case where j = 11 and j = 19 in your screenshot) will work for BarSeries, but not for LineSeries. |
|