When using Ascending / Descending along with the Sort method I get a compile error. For example, this works fine:
@code
Html.Kendo.Chart(Model).Name("DayChart").Title("CourtPay Daily Totals").
DataSource(Function(d) d.Read("DayTotals", "CourtPay").
Group(Function(x) x.Add(Function(m) m.ApplicationCode)).
Sort(Function(s) s.Add(Function(md) md.PaymentDate))).
Series(Function(d) d.Bar("Amount")).
CategoryAxis(Function(a) a.Categories(Function(m) m.PaymentDate)).
HtmlAttributes(New With {.style = "height:900px; width:700px;"}).
Theme("Black").
Render()
End Code
However, this throws an "Expression Does Not Produce a Value" error:
@code
Html.Kendo.Chart(Model).Name("DayChart").Title("CourtPay Daily Totals").
DataSource(Function(d) d.Read("DayTotals", "CourtPay").
Group(Function(x) x.Add(Function(m) m.ApplicationCode)).
Sort(Function(s) s.Add(Function(md) md.PaymentDate).Descending)).
Series(Function(d) d.Bar("Amount")).
CategoryAxis(Function(a) a.Categories(Function(m) m.PaymentDate)).
HtmlAttributes(New With {.style = "height:900px; width:700px;"}).
Theme("Black").
Render()
End Code
@code
Html.Kendo.Chart(Model).Name("DayChart").Title("CourtPay Daily Totals").
DataSource(Function(d) d.Read("DayTotals", "CourtPay").
Group(Function(x) x.Add(Function(m) m.ApplicationCode)).
Sort(Function(s) s.Add(Function(md) md.PaymentDate))).
Series(Function(d) d.Bar("Amount")).
CategoryAxis(Function(a) a.Categories(Function(m) m.PaymentDate)).
HtmlAttributes(New With {.style = "height:900px; width:700px;"}).
Theme("Black").
Render()
End Code
However, this throws an "Expression Does Not Produce a Value" error:
@code
Html.Kendo.Chart(Model).Name("DayChart").Title("CourtPay Daily Totals").
DataSource(Function(d) d.Read("DayTotals", "CourtPay").
Group(Function(x) x.Add(Function(m) m.ApplicationCode)).
Sort(Function(s) s.Add(Function(md) md.PaymentDate).Descending)).
Series(Function(d) d.Bar("Amount")).
CategoryAxis(Function(a) a.Categories(Function(m) m.PaymentDate)).
HtmlAttributes(New With {.style = "height:900px; width:700px;"}).
Theme("Black").
Render()
End Code