I am trying to draw vertical line on category axis so that I can differentiate previous values and future from that point.
Razor view:
@(Html.Kendo().Chart()
.Name("chart")
.Title("Scheduled Info")
.Title(title => title.Font("24px Arial"))
.Transitions(false)
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom)
)
.HtmlAttributes(new {style = "border: 1px solid #1593cc;height: 400px;"})
.Legend(true)
.Legend(legend => legend.Font("medium Arial"))
.Series(series =>
{
series.Line(Model.ScheduledD0)
.Style(ChartLineStyle.Smooth)
.Color("#ee7624")
.Name("D0")
.Markers(x => x.Visible(false));
series.Line(Model.ScheduledA14)
.Style(ChartLineStyle.Smooth)
.Color("#1593cc")
.Name("A14")
.Markers(x => x.Visible(false));
})
.CategoryAxis(axis => axis
.Line(line => line.Visible(true))
.MajorGridLines(lines => lines.Visible(true))
.MajorTicks(lines => lines.Visible(false))
.Categories(Model.ScheduledPlotTime)
.Labels(labels=> labels.Step(4)))
.ValueAxis(axis => axis.Numeric()
.Max(100)
.Labels(labels => labels.Format("{0}%")))
)
Model:
public class graphs
{
public List<decimal> ScheduledA14 { get; set; }
public List<decimal> ScheduledD0 { get; set; }
public List<string> ScheduledPlotTime { get; set; }
}