Hi,
I am working on the scatter chart where the data should be plotted time(example:12:45:12) vs weekday(Monday).Where X-axis is Weekdays from Monday to Friday and Time is y-axis 9:00 am to 4:00 pm with Interval of 1 hour. I did not found any examples on this unable to achieve this.
Below is the sample code Kindly help me in this regard.
Thanks & Regards,
Sampath
<div class="roundbox" style="width:450px; height:350px; border: solid 5px steelblue; float:right; margin-top:10px; margin-bottom:20px">
@(Html.Kendo().Chart<AdvantEdgePortal.Web.ViewModels.DayTimeStamp>()
.Name("chartcallTimings")
.Title("Call Timings")
.DataSource(dataSource => dataSource.Read(
read => read.Action("GetCallDataCompletionTime", "Home"))
)
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom)
)
.SeriesDefaults(seriesDefaults => seriesDefaults
.Scatter().Labels(labels => labels
.Visible(false)
)
)
.Series(series =>
{
series.Scatter(m => m.WeekDay, m => m.TimeofDay);
//series: [{ type: "scatterLine", name: "3.1C", data: [[10, 70], [13, 90], [25, 100]], dashType: "dot" }]
}
)
.CategoryAxis(axis => axis
.Categories("Monday", "Tuesday", "Wednesday", "Thrusday", "Friday")
.MajorGridLines(lines => lines.Visible(false))
.Categories(c => c.WeekDay)
)
.ValueAxis(axis => axis
.Numeric()
.MajorUnit(1)
.Min(9)
.Max(16)
.Labels(labels => labels.Format("{0:N0}:00"))
.Line(line => line.Visible(true))
)
.ChartArea(chartArea =>
{
chartArea.Height(340);
chartArea.Width(440);
chartArea.Margin(5);
})
)
</div>