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

Trackball display issue

3 Answers 31 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Avneesh
Top achievements
Rank 1
Avneesh asked on 06 Nov 2013, 04:26 PM
Hi,
I wanted my trackerball data display to be next to the mouse cursor rather than displaying at top of the tracker line. I did this by using trackBall.Margin = new Thickness(left, top, 0, 0); on mouse move of the chart. This works fine until the line starts to move towards the Y axis on either side.. Then the margin is not taken into account and it looks as if it leaves the space according to the width of the tracker data displayed. So if I have displayed long names in tracker template - then the width is more when it starts to ignore the margin from bit far off from Y axis. Can someone please help me to resolve this issue.

Thanks
Avneesh

3 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 11 Nov 2013, 08:02 AM
Hello Avneesh,

I suggest that for testing purposes you turn off this custom code that sets the Margin of the track ball. Then when the track ball reaches the end of the plot area you will see that it is not centered in consideration to the track line, but instead it is moved fully inside the plot area. This is done so that the track ball does not get clipped and does not overflow the chart space.

You need to take this in mind when you build your Margin work-around. You can get where the track ball will be positioned from the Canvas.Left and Canvas.Top values from the TrackBallInfoControl.

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Dev
Top achievements
Rank 1
answered on 26 Feb 2014, 06:05 PM
How can we change trackball info display location to avoid overlapping with graph line?
I am not using annotation in my project.  Sample code snippet would be really helpful.

Thanks.
0
Petar Marchev
Telerik team
answered on 03 Mar 2014, 08:07 AM
Hello Dev,

You can attach a handler to the MouseMove event and set an appropriate Margin (top) to the track info control. I have attached a simple project for demonstration.

Regards,
Petar Marchev
Telerik
Tags
Chart
Asked by
Avneesh
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Dev
Top achievements
Rank 1
Share this question
or