This is a migrated thread and some comments may be shown as answers.

Line Chart - > DashType not working

1 Answer 101 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 2
Scott asked on 07 Dec 2012, 04:21 PM
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}%")
)


1 Answer, 1 is accepted

Sort by
0
Scott
Top achievements
Rank 2
answered on 07 Dec 2012, 05:06 PM
Nevermind... it was a version issue... the most recent version fixed the issue... it was strange... the DashType property was there... it just wasn't working... but like i said... the most recent version of Kendo UI fixes the issue... :)  v2012.3.1114.340
Tags
Charts
Asked by
Scott
Top achievements
Rank 2
Answers by
Scott
Top achievements
Rank 2
Share this question
or