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

Setting SelectedDataPointIndexProperty on SplineAreaSeries

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


3 Replies

ME Manivannan Elangovan Syncfusion Team 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


SR Steve Resnick 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


ME Manivannan Elangovan Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon