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
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