Pre loader

Data Point Selection Modifier on XyDataSeries

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


Hello, I am trying to use the default DataPointSelectionModifier on a line chart with a DataSeries of type XyDataSeries<‘DateTime, double’> as in the example suite HERE . It seems to work fine out of the box if the DataSeries is of type XyDataSeries<‘double, double’>. Am I missing something as to why this modifier is not working with the former data type?

Relevent code is:


<sci:SciChartSurface x:Name="customChart"

            <sci:FastLineRenderableSeries Name="lineRenderableSeries"
                    <sci:EllipsePointMarker Fill="#138A43" />
                    <sci:EllipsePointMarker Fill="#C4ECA0"
                                            Height="12" />

        <!--  Create an X Axis with GrowBy  -->
            <sci:CategoryDateTimeAxis DrawMajorBands="True"
                                      GrowBy="0.1, 0.1"
                                      AxisAlignment="Bottom" />

        <!--  Create a Y Axis with GrowBy.-->
            <sci:NumericAxis DrawMajorBands="False"
                             GrowBy="0.5, 0.5"
                             TextFormatting="$0.00" />

        <!-- Setting IsEnabled enables or disables a modifier in the Toolbar -->

                <sci:DataPointSelectionModifier Name="PointMarkersSelectionModifier"
                                                SelectionStroke="#009E9C9C" />



private void OnDataSeriesChanged(DependencyPropertyChangedEventArgs e)
      var inputDataSeries = e.NewValue as XyDataSeries<DateTime, double>;

        var dataSeries = new XyDataSeries<DateTime, double>();

        dataSeries.Append(inputDataSeries.XValues, inputDataSeries.YValues, dataSeries.YValues.Select((x) => new MyMetadata { IsSelected = false }));

        lineRenderableSeries.DataSeries = dataSeries;



public class MyMetadata : IPointMetadata
    public event PropertyChangedEventHandler PropertyChanged;
    public bool IsSelected { get; set; }

With this implementation I am able to individually select datapoints and select multiple datapoints with ctrl/shift but am unable to drag select multiple datapoints.

If, as in the example suite, I change the default XAxis to:

                             GrowBy="0.1, 0.1"
                             CursorTextFormatting="0" />

and of course change all the relevant datatypes in CustomChart.xaml.cs from XyDataSeries<‘DateTime, double’> to XyDataSeries<‘double, double’> everything behaves as expected.

Am I missing something to make the DragSelection work out of the box with the former data type without having to make a custom modifier?

Thank you in advance for your help.

  • You must to post comments

After some more testing it seems that the selection function works if the X Axis of the chart is a “DateTimeAxis” and not a “CatagoryDateTimeAxis”. Just using the DateTimeAxis is sufficient for my purposes as of now. I am unsure if this functionality is meant to work for CatagoryDateTimeAxis as well or not.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.