Pre loader

PointMarker fill color to be changed based on clustering

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

Hello.

I have a XYRenderableDataSeries with point markers with a fill color.

I also have a DataPointSelectionModifier which allows me to select clusters up to 5 from the series.

I want that when I select a cluster from the series, the points selected from the series should be colored for that specific cluster. i.e. all the cluster colors should be different. Also, when I select another cluster, the colors in the points selected from 1st cluster or other clusters should be preserved.

Here’s the XAML code :

<s:XyScatterRenderableSeries DataSeries="{Binding ScatterData}">
                    <s:XyScatterRenderableSeries.PointMarker>
                        <s:EllipsePointMarker  Width="3" Height="3" Fill="#AAFFFFFF" Stroke="SteelBlue" StrokeThickness="2"/>
                    </s:XyScatterRenderableSeries.PointMarker>
                    <s:XyScatterRenderableSeries.SelectedPointMarker>
                        <s:EllipsePointMarker Fill="{Binding ClusterColor, Mode=TwoWay}"
                                              Width="12"
                                              Height="12" />
                    </s:XyScatterRenderableSeries.SelectedPointMarker>
                </s:XyScatterRenderableSeries>

<s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:DataPointSelectionModifier Name="PointMarkersSelectionModifier"
                                                  IsEnabled="{Binding IsManualClustering}"
                                                  SelectionChanged="PointMarkersSelectionModifier_SelectionChanged"
                                                  SelectionFill="#B1B5B2B2" 
                                                  SelectionStroke="#009E9C9C" />
                    <s:MouseWheelZoomModifier IsEnabled="True" />
                    <s:RubberBandXyZoomModifier IsEnabled="False" />
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>

I tried to find examples but could not find any. Please let me know if we can reach a solution to this in some way.

Thank you.

Version
6.3.0
  • Andrew Burnett-Thompson
    Hi Ammar, you need to combine the PaletteProvider API with DataPointSelectionModifier in order to colour series. Take a look at the bottom part of this documentation page: https://www.scichart.com/documentation/win/current/DataPoint%20Selection.html
  • Ammar Khan
    this solves the problem of what color to give when a point is selected. However, what I want to achieve is giving the cluster on which cluster is selected and preserving the colors of other previously selected clusters. I am having trouble combining the two. Could you give an example? Can we change IPointMetaData data?
  • Ammar Khan
    Hello. I still do not have the solution. Could you reply to my last question?
  • You must to post comments
0
0

Hi Ammar,

Thanks for your reply.
The easiest way to achieve the described behavior would be creating a separate XyScatterRenderableSeries for each cluster.

Please let us know if this is suitable for your project.

With best regards,
Lex
SciChart Technical Support Engineer

  • You must to post comments
0
0

I think that would not achieve the solution.

The problem is: We already have some data plotted on the chart. The user can select points from the chart and create clusters through it.
So we already have a series plotted.
How would creating separate series’ for clusters achieve this?

  • You must to post comments
0
0

Hi Ammar,

Thanks for your reply.
I am sorry for the misunderstanding.

Having a separate Renderable Series for a cluster will allow you to set the selected PointMarker Style independently for each cluster.

Is this what you are looking for?

With best regards,
Lex
SciChart Technical Support Engineer

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.