I am trying to change the DashType on each line in the series and it is not working... no matter what i change it to... it remains solid....
I was able to change the DashType on CategoryAxis and ValueAxis however... fyi... See sample code below:
@(Html.Kendo().Chart()
.Name("SalesDollarsChart")
.Title("Sales by Fiscal Week")
.HtmlAttributes(new { style = "height: 500px; width: 1150px;" })
.Legend(legend => legend.Position(ChartLegendPosition.Bottom))
.ChartArea(chartArea => chartArea.Background("transparent"))
.Series(series =>
{
series.Line(new double[] { 15.7, 16.7, 20, 23.5, 26.6, 15.7, 16.7, 20, 23.5, 26.6 }).Name("TY Sales $").Color("Red").DashType(ChartDashType.LongDashDotDot);
series.Line(new double[] { 47.96, 48.93, 55, 54, 58, 47.96, 48.93, 55, 54, 58 }).Name("LY Sales $").Color("Blue").DashType(ChartDashType.Dot);
series.Line(new double[] { 75.7, 76.7, 80, 83.5, 86.6, 75.7, 76.7, 80, 83.5, 86.6 }).Name("TY On Hand $").Color("Green").DashType(ChartDashType.Dot);
series.Line(new double[] { 37.96, 38.93, 45, 44, 48, 37.96, 38.93, 45, 44, 48 }).Name("LY On Hand $").Color("Purple").DashType(ChartDashType.Dot);
})
.CategoryAxis(axis => axis
.Categories("5", "6", "7", "8", "9", "10", "11", "12", "13", "14")
.MajorGridLines(ml => ml.DashType(ChartDashType.Solid)))
.ValueAxis(axis => axis
.Numeric()
.Labels(labels => labels.Format("{0}%"))
.Min(0)
.Max(100)
.MajorUnit(10)
.MinorUnit(5)
.MajorGridLines(ml => ml.DashType(ChartDashType.Solid)))
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}%")
)
)
I was able to change the DashType on CategoryAxis and ValueAxis however... fyi... See sample code below:
@(Html.Kendo().Chart()
.Name("SalesDollarsChart")
.Title("Sales by Fiscal Week")
.HtmlAttributes(new { style = "height: 500px; width: 1150px;" })
.Legend(legend => legend.Position(ChartLegendPosition.Bottom))
.ChartArea(chartArea => chartArea.Background("transparent"))
.Series(series =>
{
series.Line(new double[] { 15.7, 16.7, 20, 23.5, 26.6, 15.7, 16.7, 20, 23.5, 26.6 }).Name("TY Sales $").Color("Red").DashType(ChartDashType.LongDashDotDot);
series.Line(new double[] { 47.96, 48.93, 55, 54, 58, 47.96, 48.93, 55, 54, 58 }).Name("LY Sales $").Color("Blue").DashType(ChartDashType.Dot);
series.Line(new double[] { 75.7, 76.7, 80, 83.5, 86.6, 75.7, 76.7, 80, 83.5, 86.6 }).Name("TY On Hand $").Color("Green").DashType(ChartDashType.Dot);
series.Line(new double[] { 37.96, 38.93, 45, 44, 48, 37.96, 38.93, 45, 44, 48 }).Name("LY On Hand $").Color("Purple").DashType(ChartDashType.Dot);
})
.CategoryAxis(axis => axis
.Categories("5", "6", "7", "8", "9", "10", "11", "12", "13", "14")
.MajorGridLines(ml => ml.DashType(ChartDashType.Solid)))
.ValueAxis(axis => axis
.Numeric()
.Labels(labels => labels.Format("{0}%"))
.Min(0)
.Max(100)
.MajorUnit(10)
.MinorUnit(5)
.MajorGridLines(ml => ml.DashType(ChartDashType.Solid)))
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}%")
)
)