This is a migrated thread and some comments may be shown as answers.
Zooming and ZoomRectangleOpacity Issues
1 Answer 8 Views
This is a migrated thread and some comments may be shown as answers.
James Daresta
Top achievements
Rank 1
James Daresta asked on 04 Mar 2011, 04:00 PM

As I mentioned in a previous post I am converting an old Dundas chart to a Telerik chart control. I am finally at the last part which is the ability to select and highlight a section (see the screen shot labeled ZoomingHighlight.png). When one does this the section they selected is higlighted with a different color and then statistics at the bottom are updated based on the selected area ((see the screen shot labeled ZoomingHighlighted.png). For example it shows the selected start and end dates. I have ran into two issues in trying to replicate this function.

First and perhaps the easiest I bet to solve is that of the color and transparency of the rectangle selection. I can set the color to yellow, but no matter what I set the ZoomRectangleOpacity to it remains fully solid and not slightly transparent. The default settings work fine with opacity.

Second and probably much harder is capturing the starting and end points of data for the selection. I am doing only x-axis scrolling/zooming and I can easily get the XScaleNew and YScaleNew on the server side, but I cannot figure out how I can get the selected data points particularly the start and end points in the selection. Is there an example, client-side api or such that can assist me in this? This functionality of selection is one they use extensively.Thanks.

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 10 Mar 2011, 08:50 AM
Hi James Daresta,

You can customize the zoom rectangle appearance via the ZoomRectangleColor and ZoomRectangleOpacity properties as followed:
<ClientSettings ScrollMode="Both" ZoomRectangleColor="Yellow" ZoomRectangleOpacity="0.5" />

Onto your second question, the RadChart Zooming and Scrolling feature doesn't support items selection and information about the selected data. The rectangle area represents the part of the chart that will be zoomed and shown in the Plot Area. The RadChart.ClientSettings.XScale and RadChart.ClientSettings.YScale properties hold the scaling factor for the XAxis and YAxis respectively. You can find more information about Zooming and Scrolling in this help topic.

Let me know if any other questions arise.

Greetings,
Polina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Asked by
James Daresta
Top achievements
Rank 1
Answers by
Missing User
Share this question
or