This is a migrated thread and some comments may be shown as answers.

Scroll Selected DataPoint into view

1 Answer 14 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 10 May 2019, 10:09 PM

Hello,

I'm using a RadChartView, with a spline series. I can get the index of the datapoint I'm interested in and I can set the point's IsSelected to True. I then expect that point will then scroll into view, if not already, but it doesn't. What am I missing? Is there another way to do it?

Thanks.

Alan

1 Answer, 1 is accepted

Sort by
0
Dinko
Telerik team
answered on 15 May 2019, 12:28 PM
Hi Alan,

The chart doesn't support a scroll to a specific item. You can only define the pan offset in pixels or relative units. To achieve your requirement you can manually set a property. The property that you will need is different based on your set up of the zoom. The zoom can be controlled via the Zoom and PanOffset properties of the chart or the Horizontal/VerticalZoomRangeStart and Horizontal/VerticalZoomRangeEnd properties.
  • If you use the Zoom property you can set the offset via the PanOffset property.
  • If you use the zoom range properties you can set them according to the offset you want to apply.

In both cases, custom calculations will be required. You could check the Conversion API of the chart  ConvertDataToPoint() method which returns specified data to coordinates. More specifically on the  Check more about those properties in the Scroll and Zoom help article. Specifically, you can check the Manual scroll and zoom section.

If you have further questions please let me know.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ChartView
Asked by
Alan
Top achievements
Rank 1
Answers by
Dinko
Telerik team
Share this question
or