enableStack exceptions when data is 0
Status: Beta
Brought to you by:
yoshitaka
The documentation for ISeries.enableStack states that "The series has to contain only positive values. " In one part of my code I had to reset the series to all 0, which caused ArrayIndexOutOfBounds exceptions to be thrown in SeriesSet.updateStackAndRiserData(IAxis axis). After much debugging I am fairly certain that it is because 0 is not considered a positive number. I think 0 should simply not be plotted, as is the case when the series are not stacked; or, the error message should be more explicit in mentioning that 0 is an invalid value. Thanks for your time!
The exception is thrown when the number of data points are not the same among stacked series. Setting y value to zero doesn't cause throwing the exception.
With the fix, series which have different number of data points can be stacked by padding zero accordingly.