or
@(Html.Kendo().Grid().Name("grvInvSplit") .TableHtmlAttributes(new { style = "table-layout: fixed;" }) .ClientDetailTemplateId("ViewGridItemDetails") .DataSource(dataSource => dataSource.Ajax() .Batch(false) .ServerOperation(false) .Read(...) .Create(..) .Update(..) .Model(model => model.Id(p => p.GridRowNum)) .Model(model => model.Field(p => p.GridRowNum).DefaultValue(-1)) .Events(events => events.RequestEnd("onGridRqstEnd") .Error("onGridError")) ) .Columns(cols => { ... ... }) .EnableCustomBinding(false) .Selectable() .Pageable() .Resizable(resizing => resizing.Columns(true)) .Editable(editing => editing.Mode(Kendo.Mvc.UI.GridEditMode.InLine) .DisplayDeleteConfirmation(false) ) .Events(events => events.DataBound("onGridDataBound") .Save("onGridSave") .Edit("onGridEdit") .Change("onGridChange") .DetailExpand("gridViewChrgDetailExpand") ) ) <script id="ViewGridItemDetails" type="text/x-kendo-template"> <div id="ViewGridItemDetailsRow_#= GridRowNum #"> Loading ... </div></script><script>gridViewChrgDetailExpand: function (e) { $("#ViewGridItemDetailsRow_" + selectedGridRow.GridRowNum).html(<html>);}</script>@model IEnumerable<SIS_CSC.ViewMoldels.HorasTrabajadasTecnicosViewModel>
<div> <h2 align="centre"> REPORTE DE SERVICIOS POR EMPRESA</h2> @(Html.Kendo().Chart(Model) .Name("Chart") .Title("Gráfico de horas de servicio de los clientes por tipo de trabajo") .DataSource(datasource => datasource .Read(read => read.Action("LeerExt_GraficoServicio", "Consultas").Data("getParameter")) .Group(group => group.Add(model => model.TIPO_SERVICIO)) ) .CategoryAxis(axis => axis .Categories(model => model.EMPRESA) .Title("Cliente") .Labels(label => label.Rotation(-90)) .MajorGridLines(major => major.Visible(false)) ) .SeriesDefaults( seriesDefaults => seriesDefaults.Column().Stack(true) ) .Series(series => { series.Column(model => model.TOTAL_HORAS) .Name(""); }) .Legend(legend => legend .Position(ChartLegendPosition.Right) ) .ValueAxis(axis => axis.Numeric() .Title("Horas de servicio") .Labels(labels => labels .Format("{0}") .Skip(1) .Step(1) ) ) .Tooltip(tooltip => tooltip .Visible(true) .Format("{0,00}") .Template("#= series.name #: #= value #") ) )</div>
<script type="text/javascript">
function getParameter() {
return {
txtFechaInicio: $("#txtFechaInicio").val(),
txtFechaFin: $("#txtFechaFin").val(),
};
}
function BindChart() {
$("#Chart").data("kendoChart").dataSource.read();
$("#Chart").data("kendoChart").redraw();
//$("#Chart").data("kendoChart").refresh();
}
</script>
public ActionResult LeerExt_GraficoServicio(string txtFechaInicio, string txtFechaFin) { return Json(GetServiciosByFecha(txtFechaInicio, txtFechaFin)); }
km-root .km-pane .km-view .km-home-new { background-size: 90% 90%; -webkit-background-clip: border-box; background-color: white;}.km-home-new { -webkit-mask-box-image: url("images/53-house@2x.png"); background-color: red;}