I am using a line series grouped on year so i get a series for each year. The data comes across from the read looking something like this for each data point
{Key: X, Year: 2013, Month: 11, Value: 100}
{Key: X, Year: 2013, Month: 12, Value: 120}
{Key: Y, Year: 2013, Month 11, Value: 200}
{Key: X, Year: 2014, Month 1, Value: 100}
{Key: Z, Year: 2013, Month 11, Value: 200}
The datasource is defined as:
So depending on what filters the user chooses, I update the filters on the data source so it could show combined data from any subset of the Keys. The Series is defined as...
The problem is that there are no data points for the months 2-12 in year 2014, but despite having it set to show missing points as a gap, it shows up as zero's on the chart. However, If I don't use the aggregate and only show the values for one Key then the missing points in 2014 are correctly shown as gaps. Is this an unavoidable consequence of using the Aggregate, or is there a way to get it to not show points for which the aggregate is NULL instead of treating it as a 0?
{Key: X, Year: 2013, Month: 11, Value: 100}
{Key: X, Year: 2013, Month: 12, Value: 120}
{Key: Y, Year: 2013, Month 11, Value: 200}
{Key: X, Year: 2014, Month 1, Value: 100}
{Key: Z, Year: 2013, Month 11, Value: 200}
The datasource is defined as:
.DataSource(ds => ds
.Read("_getAllData", "Data")
.Group(gg => gg.Add(m => m.Year))
.Filter(ff => ff.Add(m => m.Key).IsEqualTo("X").Or().IsEqualTo("Y"))
.Sort(ss => { ss.Add(m => m.Year).Ascending(); ss.Add(m => m.Month).Ascending(); }))
So depending on what filters the user chooses, I update the filters on the data source so it could show combined data from any subset of the Keys. The Series is defined as...
series.Line(m => m.Value, m => m.Month)
.Aggregate(ChartSeriesAggregate.Sum).MissingValues(ChartLineMissingValues.Gap);
The problem is that there are no data points for the months 2-12 in year 2014, but despite having it set to show missing points as a gap, it shows up as zero's on the chart. However, If I don't use the aggregate and only show the values for one Key then the missing points in 2014 are correctly shown as gaps. Is this an unavoidable consequence of using the Aggregate, or is there a way to get it to not show points for which the aggregate is NULL instead of treating it as a 0?