or
@(Html.Kendo().Chart<GIPM.DAL.ViewModels.ProductsCountByCountryYear>() .Name("linechart") .Legend(legend => legend .Position(ChartLegendPosition.Bottom) ) .DataSource(ds => ds .Read(read => read.Action("GetProductsCountByCountry", "Products", new { country = ""})) .Group(group => group.Add(model => model.Country)) .Sort(sort => sort.Add(model => model.Year).Ascending()) ) .Series(series => { series.ScatterLine(model => model.Year, model => model.Count) .Name("Country") .GroupNameTemplate("#= group.value #"); }) .Legend(legend => legend .Position(ChartLegendPosition.Bottom) ) .YAxis(axis => axis.Numeric() .Labels(labels => labels .Format("{0}") ) .MajorUnit(1) ) .XAxis(axis => axis.Date() .Labels(labels => labels.Format("{0}")) .MajorUnit(1) ))public ActionResult GetProductsCountByCountry( string country)
{var query = _customsService.GetExportSeizedCountByCountry(country);return Json(query, JsonRequestBehavior.AllowGet);
}$("#chart").data("kendoChart").dataSource.read({ country: strcountry });@model string@using System.Collections<div style="white-space:nowrap;"> @Html.TextBoxFor(m => m, new { onclick = "setInvisible(\"SplitCountryList#=Rid#\")", onfocus = "setInvisible(\"SplitCountryList#=Rid#\")", id = "CoPrefSplit#=Rid#" }) <button id="SplitCountryDisplay" onclick="setVisibleAndFocus('\\#SplitCountryList#=Rid#','\\#SplitCountryCombo-input')" style="background-color:White; width: 20px; height:22px; font-size: 6pt">...</button></div><div id="SplitCountryList#=Rid#" style="position: absolute; overflow:visible; width:250px; z-index:99; margin-top: 0px; visibility:hidden;">@(Html.Kendo().ComboBox .Name("SplitCountryCombo#=Rid#") .BindTo(new SelectList((IEnumerable)ViewData["Countries"], "Code", "DisplayName")) .HtmlAttributes(new {@ArticleID = "#=Rid#"}) .Filter(FilterType.Contains) .Events(events => events .Change("onSplitCountryChanged") ) )</div><div> <div class="k-edit-label">Sort Code: </div> <div class="k-edit-field"> <input class="k-input k-textbox" type="text" name="SortCode" data-bind="value: SortCode" data-sortcodelength-msg="Sort Code should be empty or have 6 digits." onkeypress="return isNumber(event)" pattern="[0-9]*" type="tel"> </div> </div> <div> <div class="k-edit-label">Account Number: </div> <div class="k-edit-field"> <input class="k-input k-textbox" type="text" name="AccountNumber" data-bind="value: AccountNumber" data-accountnumberlength-msg="Account Number should be empty or between 8-10 digits." data-accountnumbervalid-msg="Account Number is invalid." onkeypress="return isNumber(event)" pattern="[0-9]*" type="tel"> </div> </div> <div> <div class="k-edit-label">Action: </div> <div class="k-edit-field"> <input name="Success" required="required" data-text-field="text" data-value-field="value" data-bind="value: Success" data-required-msg="Action is required." /> </div> </div>SorCode: { type: "string", nullable: true, validation: { sortCodeLength: function (input) { if (input.attr("name") == "SortCode") { var strSortCode = input.val(); if (strSortCode.length === 0) { return true; } if (!isNum.test(strSortCode)) { return false; } if (strSortCode.length != 6) { return false; } } return true; } } },error: function (e) { if (e.errors) { var message = "Errors:\n"; $.each(e.errors, function (key, value) { if ('errors' in value) { $.each(value.errors, function () { message += this + "\n"; }); } }); alert(message); } else { //alert("An error occured during saving call back."); } }<div data-role="grid" data-sortable="true" data-scrollable="false" data-sortable="{ allowUnsort: false }"
data-pageable="{ info: false }"
data-bind="source: drivesSource"
data-columns='[ {"field": "selected", "title": " ", "width": "auto", "sortable":false, "template": "#=runTemplate(\"drive-select-template\", data)#", "headerAttributes": {style: "text-align: right"}, "headerTemplate": "<input data-bind=\"checked: parent().parent().checkAll\" class=\"grid-checkbox\" type=\"checkbox\" title=\"@Localization.Tooltips.Select_all\" />"} ..... ]'>
</div>.DataSource(dataSource => dataSource .Ajax().Group(g => g.Add(c => c.ProjectName)) .Read(read => read.Action("GetProjectItems", "Project")))