I am trying to customize the Marker of a ScatterLine chart. If the data is of type A then show ChartMarkerShape.Triangle otherwise show ChartMarkerShape.Circle?
This is my current code
@(Html.Kendo().Chart(Model.DosageUnitsOfInsulin)
.Name("DosageTotal")
.Title("Total Series")
.Series(series => {
series.ScatterLine(model => model.DosageDate, model => model.DosageTotal).Width(4).ColorHandler("getColor");
})
.SeriesDefaults(seriesDefaults => seriesDefaults
.ScatterLine().Markers(markers => markers.Size(20).Type(ChartMarkerShape.Circle)).Color("#47AADF")
)
.XAxis(x => x
.Date()
.BaseUnit(ChartAxisBaseUnit.Days)
.Title(title => title.Text(""))
.Labels(m => m.DateFormats(v => v.Days("M/d/yyyy") ))
.Min(new DateTime(2021,2,7))
.Max(new DateTime(2021, 9, 28))
.MinorGridLines(m => m.Visible(true))
.MajorGridLines(m => m.Visible(true))
)
.YAxis(y => y
.Numeric()
.Title(title => title.Text("Units of Insulin"))
.Min(65)
.Max(110)
.AxisCrossingValue(-5)
)
.Theme("sass").Legend(leg => {
leg.Position(ChartLegendPosition.Bottom);
})
.Tooltip(tooltip => tooltip
.Format("{0:d}, {1}")
.Visible(true)
)
.Events(events => events.Render("onRender"))
.Zoomable()
.Pannable()
)
Is it possible to dynamically change the marker when the chart is rendered? I have subscribed to the Visual event like the Custom Visual example. However, I just want the standard Telerik circle and sometimes triangle visual not a custom image.
Thanks,
Tim