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

Pass data to controller on refresh.

0 Answers 72 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Alan Mosley
Top achievements
Rank 1
Alan Mosley asked on 15 Apr 2014, 01:55 PM
I am trying to pass data to the controller using MVC wrappers. But data not being send, controller is executing but data is not passed. am I doing things correctly?
Thanks

var chart = $("#SalesChart").data("kendoChart");chart.refresh({    data: { "FromDate": $("#FromDate").data("kendoDatePicker").value(), "ToDate": $("#ToDate").data("kendoDatePicker").value() }});


Function GetSalesByDate(salesByDate As BO.Models.Statistics.SalesByDate) As JsonResult
         Return Json(BO.Factory.Statistics.GetSalesByDateData(BO.Factory.Statistics.GetSalesByDate))
     End Function



 ​
@code
          Dim SalesChart As Kendo.Mvc.UI.Chart(Of BO.Models.Statistics.SalesTimeSpan) = _
              Html.Kendo.Chart(Of BO.Models.Statistics.SalesTimeSpan).Legend(False).
          Name("SalesChart").Title("Units sold").Series(Sub(series)
                                                                series.Line(Function(model) model.Value, categoryExpression:=Function(model) model.Period).
                                                                Aggregate(ChartSeriesAggregate.Avg)
                                                        End Sub).
      CategoryAxis(Function(axis) axis.Date().BaseUnit(ChartAxisBaseUnit.Days)).
      DataSource(Function(ds) ds.Read(Function(read) read.Action("getsalesbydate", "statistics", New With {.area = String.Empty})))
 
          SalesChart.Render()
 
 
      End Code

No answers yet. Maybe you can help?

Tags
Charts
Asked by
Alan Mosley
Top achievements
Rank 1
Share this question
or