Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1385
Repeating markers in ScatterSeries
posted

We're using a ScatterSeries to plot multiple series that are divided by ranks.  Sometimes there are 30+ ranks that are displayed, but what we are seeing is that there are roughly 10-11 unique markers (from Infragistics.Controls.Charts.MarkerType) which then repeat using the same colors.  Because they are identical, some ranks cannot be distinguished visually.

An improvement would be to switch up the colors so at least there would be some differentiating.  What would the easiest way to go about it?  Using v16.2, and the XamDataChart is using the Office2013 styling.

  • 34810
    Verified Answer
    Offline posted

    Hello Walter,

    There are a few things that you can do here. First, if you want to prevent the XamDataChart from reusing colors, know that there is a Brushes collection and a MarkerBrushes collection property on the XamDataChart. These properties take a BrushCollection element, which you can then fill with as many brushes as you would like. These brushes will then get pushed to your Series' Brush and MarkerBrush properties based on the indexed brush that exists in your brush collections. For example, the XamDataChart.Series[0] will receive a Brush of XamDataChart.Brushes[0] and a MarkerBrush of XamDataChart.MarkerBrushes[0]. You can also set these colors manually, by setting the Brush and MarkerBrush properties on the series themselves.

    If you are looking to have a different shape for each of your markers, you can use the MarkerTemplate property on the Series. You can place essentially any element that you wish as the marker for each series using a DataTemplate for this property. Doing so, you could create a unique marker for each of your series, if you wished to do so.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer