Hi,
I'm building a basic line chart in Kendo UI Dataviz and I'm having a
problem with the aggregation method. The goal is to group my sales data
by month and aggregate the Sum(Amount) which seems to work in my chart
but I'm experiencing a bug that causes data from the first day of
October to be included in the sum for September. Oct 2 shows in October
but Oct 1 is included in September's total.
The data is:
10/1/2013 12:00:00 AM, 22964.5000
10/2/2013 12:00:00 AM, 6762.9400
Html.Kendo().Chart(Model)
.Name("revenue")
.Title("Revenue Activity by Month")
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom)
)
.Series(series =>
{
series.Area(s => s.TotalRevenue, categoryExpression: model => model.Date).Aggregate(ChartSeriesAggregate.Sum).Name("Total Revenue").Color("#73c100");
series.Line(s => s.RevenueSubscriber, categoryExpression: model => model.Date).Aggregate(ChartSeriesAggregate.Sum).Name("Subscriber Revenue");
series.Line(s => s.RevenueNonSubscriber, categoryExpression: model => model.Date).Aggregate(ChartSeriesAggregate.Sum).Name("Non-Subscriber Revenue");
})
.CategoryAxis(axis => axis.Date()
.BaseUnit(ChartAxisBaseUnit.Months)
)
.ValueAxis(axis => axis
.Numeric("revenue")
.Labels(labels => labels.Format("{0:C}"))
.Line(line => line.Visible(false))
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0:C}")
)
What I receive is a chart with two points on the X Axis. The first
point is Sept 2013 and includes $22,964. The second point is Oct 2013
and includes $6,762.
Any ideas would be greatly appreciated.
I'm building a basic line chart in Kendo UI Dataviz and I'm having a
problem with the aggregation method. The goal is to group my sales data
by month and aggregate the Sum(Amount) which seems to work in my chart
but I'm experiencing a bug that causes data from the first day of
October to be included in the sum for September. Oct 2 shows in October
but Oct 1 is included in September's total.
The data is:
10/1/2013 12:00:00 AM, 22964.5000
10/2/2013 12:00:00 AM, 6762.9400
Html.Kendo().Chart(Model)
.Name("revenue")
.Title("Revenue Activity by Month")
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom)
)
.Series(series =>
{
series.Area(s => s.TotalRevenue, categoryExpression: model => model.Date).Aggregate(ChartSeriesAggregate.Sum).Name("Total Revenue").Color("#73c100");
series.Line(s => s.RevenueSubscriber, categoryExpression: model => model.Date).Aggregate(ChartSeriesAggregate.Sum).Name("Subscriber Revenue");
series.Line(s => s.RevenueNonSubscriber, categoryExpression: model => model.Date).Aggregate(ChartSeriesAggregate.Sum).Name("Non-Subscriber Revenue");
})
.CategoryAxis(axis => axis.Date()
.BaseUnit(ChartAxisBaseUnit.Months)
)
.ValueAxis(axis => axis
.Numeric("revenue")
.Labels(labels => labels.Format("{0:C}"))
.Line(line => line.Visible(false))
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0:C}")
)
What I receive is a chart with two points on the X Axis. The first
point is Sept 2013 and includes $22,964. The second point is Oct 2013
and includes $6,762.
Any ideas would be greatly appreciated.