here is my code
I used colorfield() to specify the color of the elements on the chart but I don't understand why the dots at the landmarks are the correct color I specified to load from the store proc, but the lines connect them together wrong color.
Pls help me.
@(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;" })
)
I used colorfield() to specify the color of the elements on the chart but I don't understand why the dots at the landmarks are the correct color I specified to load from the store proc, but the lines connect them together wrong color.
Pls help me.