or
@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));
}
The Category Column field remains active but there is no validation message. The UI now appears broken as you can no longer edit other fields.
Note that the validation message is being activated but it is not visible as it is hidden by the grid. This can be shown by adding the css rule below.
.k-grid td{
padding-bottom
:
2em
;
!important
}