We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Selected DataMarker color for Line chart

Hi Syncfusion Team!

We have a Line series, which have DataMarker properties, ShowLabel="False" and ShowMarker="True". Our question is, the selected data marker color does not change on tap on data marker. We have enabled DataPointSelection and assigned color to SelectedDataPointColor property. The selected color is only reflected to Label marker of chart if ShowLabel is set to true. Is there any way to highlight the selected data marker "circle"?

Regards,

Sajid.




1 Reply

ME Manivannan Elangovan Syncfusion Team July 29, 2015 11:17 AM UTC

Hi Sajid,


Thanks for using Syncfusion products.


In our SfChart, currently we don’t have support to change the DataMarker symbol color on selection. But, we can achieve your requirement by using ScatterSeries with EnableDataPointSelection and give same ItemsSource for both LineSeries and ScatterSeries as shown in the below code snippet.


CodeSnippet:


var line = new LineSeries

{

    ItemsSource = Data,

};


var scatter = new ScatterSeries

{

    Opacity                   = 1,

    Color                       = Color.Blue,

    ScatterHeight          = 10,

    ScatterWidth           = 10,

    ItemsSource            = Data,

    EnableDataPointSelection  = true,

    SelectedDataPointColor     = Color.Red,

    SelectedDataPointIndex     = 3

  };

 

We have prepared a sample based on requirement. Please download the sample from the following location.


Sample: DataMarkerSelection


Please let us know if you require further assistance on this.


Thanks,
Manivannan.E


Loader.
Live Chat Icon For mobile
Up arrow icon