EOS/Views/Report/ConsolidatedReport_Chart.cshtml
Nidhi Bhargava f0c1ab20e1 code push
2025-09-04 16:25:07 +05:30

61 lines
1.9 KiB
Plaintext

@model IEnumerable<GODATA.Models.Report.ConsolidatedReportModel>
@if (ViewBag.ChartModel != null && ViewBag.ChartModel.Count > 0)
{
@*<div id="TBL"> *@
<div>
@(Html.Kendo().Chart().Name("TimeslorClosureChart").Theme("Bootstrap").Title("Consolidated Report")
.Events(events => events.DataBound("onDataBoundChart()"))
.Legend(legend => legend.Position(ChartLegendPosition.Right))
.ChartArea(chartArea => chartArea.Background("transparent").Height(400))
.SeriesDefaults(seriesDefaults => seriesDefaults.Line().Style(ChartLineStyle.Smooth))
.Series(series =>
{
series.Column(((List<GODATA.Models.Report.kendoChartModel>)ViewBag.ChartModel).Select(s => s.yAxis));
})
.CategoryAxis(axis => axis.Categories(((List<GODATA.Models.Report.kendoChartModel>)ViewBag.ChartModel).Select(s => s.xAxis)).MajorGridLines(lines => lines.Visible(false)).Labels(labels => labels.Rotation(-25)).Title("Time Slots"))
.ValueAxis(axis => axis.Numeric().Title("No. of Breakdowns").Labels(labels => labels.Format("{0}").Step(4)).Line(line => line.Visible(false)).AxisCrossingValue(-10))
.Tooltip(tooltip => tooltip.Visible(true).Template("#= category # - #= kendo.format('{0:0}', value)#"))
)
</div>
}
else
{
<div id="divmessage" class="no_data">
<span>
<p class="fs16">@*No Data Available !!!*@
@System.Configuration.ConfigurationManager.AppSettings["no_data_available"].ToString()
</p>
</span>
</div>
}
<style>
.slaMet {
box-shadow: 4px 0px 0px green inset;
}
.slaNotMet {
box-shadow: 4px 0px 0px red inset;
}
.removeLink a {
cursor: default;
color: black;
}
.k-chart {
height: 400px !important;
/*width: 390px;*/
}
</style>