Setting values on animated marker

3 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 16 Apr 2009 Link to this post


    I found an interesting thing.
    By working on an example project i found out that Min and Max of ranges is compared.
    So I must take care with assignment that min does not become larger than max (proper sequence).
    The "safe way" is to set all min values to 0 (or what ever is the possible minimum) and than set max followed by min.

    Anyhow - I also was afraid that you also check value against LinearScale.Max.
    You don't I found out - look interesting if value exceeds max :)

    Anyhow - I thought you do this and since LinearScale.Max is dynamic (can be less than last value) I set value to 0.
    After this I set LinearScale.Max followed by value.

    Next I was investigating if I have a locking problem with my service :))

    The reason - every second call the marker shows 0 - and at the next call the correct value.

    I only guess the following occurs (pseudocode):
    if (value != oldValue)

    void StartAnimation() {
      if (AnimationIsRunning) return;

    I do:
    linMarker.Value=0;    // avoid exceed of max
    ...//set all the other values (min, ranges and so on)
    This code is fast enough (of course) to finish while the animation is still running the result is an animation to the "first different value".
    So setting the marker to zero does (at initial call) nothing - the marker is at zero.
    Since the animation is not running - the next set of value starts the animation. (in this case newVal).
    At the next call I assign 0 - the logic detects - ah, different value - animate.
    When I then set newVal - it does nothing because an animation is already running.
    The next call - setting to 0 does nothing (it's 0 from the last "mistake") - no animation.
    newVal is assigned - animation not running....

    I guess this is not intended.
    Of course - in my scenario (since I learned that linearScale.Max can be less than value) it is not needed to set value to 0 initial.
    But imagine some "fast data input" (multiple simultaneous service calls, replay of a queue...) - I guess it is possible, that data arrives faster than the animation duration - and this would result in the same problem.


  2. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 16 Apr 2009 Link to this post

    Just a follow up - I thought the problem could have something to do with this post:
    But - I use the latest version - and also found that the marker makes problems with binding too.
  3. DevCraft R3 2016 release webinar banner
  4. Andrey
    Andrey avatar
    1681 posts

    Posted 20 Apr 2009 Link to this post

    Hello Manfred,

    You can change duration of the internal indicator’s animation using the Duration property of the indicator. It should be less then interval between arriving of 2 indicator values.

    We are currently researching the new feature which will allow setting indicator value using sequential list of values using the so called “refresh rate”. If there are several updates per second, it becomes difficult to read the values as they flash by. Increasing the refresh rate will restrict the number of display updates, thus giving the user a chance to read the values as they change.

    Andrey Murzov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top