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

Binding the SliderSelectionEnd and Start values to Date values somehow

1 Answer 33 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Joan
Top achievements
Rank 1
Joan asked on 24 Nov 2011, 07:41 PM
Hi all,

I have a screen with a RadChart with zooming and scrolling enabled. The values of the X-Axis are of type DateTime. The user should be able to move the scroll slider using the mouse or change the limits in a couple of DateTimePickers in the same screen.

I binded the SliderSelectionEnd and SliderSelectionStart properties from ZoomScrollSettings to some properties in my viewmodels and the Date values in the DateTimePickers too. The SliderSelection properties and the Date properties in my viewmodels are logically connected (when one changes, the other one updates accordingly).

The problem is... I know what the maximum and minimum values are since I'm in control of the data, but the SliderSelectionEnd and SliderSelectionStart 0 and 1 values don't seem to map exactly there. In fact, I can see some "blank space" in the chart after the last value. This produces very funny results once the user starts changing values.

Is there a way to know to which values do those properties map? Any other way I could bind those two controls?

Thanks,
-Tony

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 27 Nov 2011, 04:02 PM
Hello Tony,

Your questions was already answered in the Support thread started by you (Ticket ID: 486662). To avoid duplicate threads I suggest that we keep our further conversation on this in one of the threads by your choice. I'm copying my answer here:

We are known of such unwanted behavior which is experienced when the Chart is in a DataTemplate. It is logged in our PITS system here. If this is the case I suggest that you try wrapping your chart inside a UserControl and using this UserControl inside the DataTemplate.

Also you may try to use the Selection property (of type SelectionRange<double>) of the the RadSlider, instead of SelectionStart and SelectionEnd.

If you are still facing this unwanted behavior we would like to ask if you could provide us a runnable stripped down version of your project. We will inspect it locally and get back to you with our findings/suggestions based on the code.

All the best,
Evgenia
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Chart
Asked by
Joan
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or