7 Answers, 1 is accepted
0
Hi Vikram,
Thank you for writing.
Each data point has an IsSelected property that you can set.
Regards,
Victor
Telerik
Thank you for writing.
Each data point has an IsSelected property that you can set.
Regards,
Victor
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Vikram
Top achievements
Rank 1
answered on 05 Apr 2016, 02:03 PM
How do I retrieve a specific DataPoint for a series? Let's say the last one.
0
Hi Vikram,
You can get the last point like this:
Let us know if you need further assistance.
Regards,
Victor
Telerik
You can get the last point like this:
DataPointCollection points = series.model().dataPoints();
DataPoint lastPoint = (DataPoint)points.
get
(points.size() - 1);
Regards,
Victor
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Vikram
Top achievements
Rank 1
answered on 05 Apr 2016, 03:20 PM
Thank you. One more question. If I select a DataPoint programmatically, I notice that the ChartSelectionChangeListener is not notified. What API do I call to make sure the chart selection is updated? Thanks, Vikram
0
Hi Vikram,
Thanks for writing.
This appears to be a bug. The data point selection change is not propagated to the selection behavior. Currently the only way to detect the selection is to inherit from your series and override this method:
Please write again if you need further assistance.
Regards,
Victor
Telerik
Thanks for writing.
This appears to be a bug. The data point selection change is not propagated to the selection behavior. Currently the only way to detect the selection is to inherit from your series and override this method:
protected void onDataPointSelectionChanged(DataPoint point);
For example:public
class
CustomBarSeries extends BarSeries {
@Override
public
void
onDataPointIsSelectedChanged(DataPoint point) {
super.onDataPointIsSelectedChanged(point);
// Do something with selected data point.
}
}
Please write again if you need further assistance.
Regards,
Victor
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Manikandan
Top achievements
Rank 1
answered on 26 Aug 2016, 06:56 AM
Hi,
I am trying to programatically select the pie chart on click of a button. And I expect the pie chart selection behavior (The selected slice to be shown detached from the pie). I tried pieSeries.model().dataPoints().get(0).setIsSelected(true);, but I dont see the selected behavior. Can you help?
Regards,
Manikandan
0
Hello Manikandan,
Thank you for writing.
Can you please post a support ticket and attach your app so that I can debug it. I tested a pie chart and called pieSeries.dataPoints().get(0).setIsSelected(true) and the points gets selected normally.
Regards,
Victor
Telerik by Progress
Thank you for writing.
Can you please post a support ticket and attach your app so that I can debug it. I tested a pie chart and called pieSeries.dataPoints().get(0).setIsSelected(true) and the points gets selected normally.
Regards,
Victor
Telerik by Progress
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items