or
<script type="text/javascript"> $(document).ready(function () { $("#chart").kendoChart({ dataSource: { transport: { read: { type:"post", url:"http://localhost:1038/Services/ProductService.svc/jIlBazliAnaliz", dataType: "json", data: '{BasTar:"2011-01-01",SonTar:"2011-12-31"}' } } }, seriesDefaults: { type: "column" }, series: [{ field: "Sayi", name: "Sayi" }], categoryAxis: { field: "IlAdi", labels: { rotation:-90 } } }); }); </script>[OperationContract] [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "jIlBazliAnaliz")] IList<ModelIlBazliAnaliz> jIlBazliAnaliz(DateTime BasTar, DateTime SonTar);$('h1,h2,h2 a,h3,h5,h6:not(.fx-cufon)').livequery(function() { $(this).addClass('fx-cufon'); Cufon.replace($(this), { fontFamily: 'Decker', hover:true }); });public ActionResult GetProducts()
{
----------
return Json(Products, JsonRequestBehavior.AllowGet);
}
--Javascript to bind datasource
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: ('@Url.Action("GetProducts")'),
dataType: "jsonp"
}
},
pageSize: 12
});
// Model View
@model IEnumerable<Models.Product>
@{
ViewBag.Title = "Index";
}