currently i have a chart line and i have specified the color for each element in it from the store proc , but for some reason the lines connecting the timelines on the chart are different colors , only the The dot right at the landmark is the correct color I specified.
Here is my code
Please help me!
Here is my code
@(Html.Kendo().Chart<Commsights.Data.DataTransferObject.DashbroadDataTransfer>()
.Name("LineChart_Customer_Processed")
.DataSource(dataSource => dataSource
.Read(read => read.Action("Chart_CountData_DaXuLyTolist", "Dashbroad").Data("FilterCompany"))
.Group(group => group.Add(model => model.CompanyName))
.Sort(sort => sort.Add(model => model.DatePublish).Ascending())
)
.Events(events => events.SeriesClick("onSeriesClick"))
.Theme("material")
.Series(series =>
{
series.Line(model => model.ID_Count)
.Name("#= group.value #")
.Style(ChartSeriesStyle.Smooth)
.CategoryField("DatePublish")
.Tooltip(tooltip => tooltip
.Visible(true)
.Template("#= kendo.toString(category, 'MM/dd') # - #= value # (#= series.name # Article)"))
.Width(3).Opacity(0.6)
.ColorField("Color");
})
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom)
)
.ValueAxis(axis => axis.Numeric()
.Labels(labels => labels
.Format("{0}")
.Skip(2)
.Step(2)
)
)
.CategoryAxis(axis => axis
.BaseUnit(ChartAxisBaseUnit.Days)
.Labels(labels => labels
.DateFormats(formats => formats.Months("MM/dd"))
.Rotation(-45)
)
)
.HtmlAttributes(new { style = "width: 100%; height: 400px;" })
)