Hi,
I am using Scatter chart, where in I want to change the color of datapoint plot.
By default, data points are plotted using BLUE color
I tried to change color using Brush property as shown below:
@(Html.Infragistics().DataChart(dataSeries.AsQueryable()) .VerticalZoomable(true) .HorizontalZoomable(true) .Axes((axes) => { axes.NumericX("xAxis"); axes.NumericY("yAxis"); })
.Series(series => { series.Scatter("scatterSeries") .XAxis("xAxis").Brush("Black") .YAxis("yAxis").Brush("Black") .XMemberPath(dataPoint => dataPoint.X) .YMemberPath(dataPoint => dataPoint.Y) .Legend(legend => legend.ID("legend").Width("140px")) }) .DataBind() .Render() )
But it's still plotting in BLUE color.
Hi, sanjaysutar
The correct option for your use case is markerBrush since in scatter plot the chart is actually displaying only markers. Hence the MVC helper function to use in your case is MarkerBrush(), like here:
Cheers, Lazar