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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting SelectedDataPointIndexProperty on SplineAreaSeries

Thread ID:

Created:

Updated:

Platform:

Replies:

121302 Nov 29,2015 10:28 PM UTC Dec 1,2015 11:08 AM UTC Xamarin.Forms 3
loading
Tags: SfChart
Steve Resnick
Asked On November 29, 2015 10:28 PM UTC

I have 2 controls an a view: sfChart and sfRangeSlider. When the user adjusts the start and end values of the range, I highlight the corresponding elements on the chart by binding to SelectedDataPointIndexProperty. This works well for a ColumnSeries, but it doesn't work for a SplineAreaSeries

Is this a bug/missing feature and if so, is there any way I can highlight specific points on the chart with a SplineAreaSeries?

Thanks,

Steve


Manivannan Elangovan [Syncfusion]
Replied On November 30, 2015 09:37 AM UTC

Hi Steve,

Thanks for using Syncfusion products.

In SplineAreaSeries, SelectedDatapointIndex property highlights the corresponding data marker label and not the corresponding segment. Please find the below code example and we have attached the screenshot for your reference.

Code Example:

SplineAreaSeries area = new SplineAreaSeries ();
area.DataMarker = new ChartDataMarker ();
area.DataMarker.ShowLabel = true;
area.EnableDataPointSelection = true;
area.SelectedDataPointIndex = 2;

Screenshot: Screenshot

Regards,
Manivannan.E

Steve Resnick
Replied On November 30, 2015 07:55 PM UTC

Hi Manivannan, thanks for answering the question, but in hindsight, I didn't ask the right question. 

My problem is the following: I'd like to show a chart (ideally SplineAreaSeries but ColumnSeries will suffice) that has 50-5000 points, where the user can select a point and see which point they selected. As they drag their finger across the range, I'd like the point (or column) to show a marker/label.

ColumnSeries works well for up to 500 points before the column is too small to see the alternate color. SplineAreaSeries doesn't work because, with so many points, I have to hide the labels.

Ideally I can use SplineAreaSeries and only show the marker/label of the selected point, and use a custom marker so it's much larger than a 1/5000 of the range.

Can you think of a solution?

Thanks,

Steve

Manivannan Elangovan [Syncfusion]
Replied On December 1, 2015 11:08 AM UTC

Hi Steve,

We have analyzed your requirement and were able to achieve your requirement by using ChartTrackballBehavior. Trackball behavior is used to show information on the nearest datapoint position, when touch and hold on the chart.

We have prepared a sample based on your requirement which can be downloaded from the below location.

Sample: Trackball

Regards,
Manivannan E

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;