Events Processing

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
fischertc
Posts: 18
Joined: Wed Feb 12, 2014 6:16 am

Events Processing

Post by fischertc » Fri Feb 14, 2014 2:24 am

A couple of issues:

1. I wanted to stop the mouse wheel from zooming an intensity grid series chart's X axis in or out past certain stops. For instance, I never wanted it below .001 or above .100 in xmax - xmin width to prevent the users from scrolling in/out too far. I tried to hook into the mousewheel event but the X axis RangeChanged event is fired before the wheel event so I could not use the wheel events .Handled property to stop the x axis range from processing. In the RangeChanged event I had to do the width check and reset the range, causing another call to the RangeChanged event and do the check again instead of being able to stop it before it occurred.

2. A Band has no SetValues() method so you have to set ValueBegin and ValueEnd separately to move it programatically. This causes two ValuesChanged events to fire. I saw that scrolling a chart using a band is 1/2 as fast as a scrollbar because it has to call two events on every movement to a scroll bars one.

ArctionTero
Posts: 42
Joined: Thu Mar 28, 2013 9:20 am

Re: Events Processing

Post by ArctionTero » Fri Feb 14, 2014 1:50 pm

For 1:
You should remove RangeChanged events at the event handler, if you need to reset the range. Remember to add same handler back at the end of the method.
For 2:
Thanks for the suggestion. We have considered this also and put the method to version 6.
In the meantime, the same trick as for 1 probably works for this also: disable ValuesChanged handler before setting ValueBegin and add it back before setting ValueEnd.
LightningChart Support Team, TK

Post Reply