This is a migrated thread and some comments may be shown as answers.

Ascending - Descending Not Working in Chart Wrapper

0 Answers 26 Views
Chart
This is a migrated thread and some comments may be shown as answers.
steve
Top achievements
Rank 1
steve asked on 04 Sep 2012, 11:09 PM
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

No answers yet. Maybe you can help?

Tags
Chart
Asked by
steve
Top achievements
Rank 1
Share this question
or