Reverse direction of linear gauge (vertical), moving from top to bottom

2 posts, 1 answers
  1. Nicklas
    Nicklas avatar
    45 posts
    Member since:
    Oct 2012

    Posted 18 Jul 2013 Link to this post

    As the title reads, is it possible to reverse the direction of a vertical linear gauge, so it starts to move from top to bottom? My scenario is the following:
    I'm feeding the gauge with real time depth data, and I have defined top / surface to be at 0. When moving deeper, I'd like the pointer to move downwards towards the bottom of the gauge.

    It moves fine with the real time data now, but in the wrong direction :)

    Any suggestions?

    <script>
        function createGauges() {
            $("#depthBar").kendoLinearGauge({
                pointer: {
                    value: 0,
                    shape: "arrow"
                },
     
                scale: {
                    majorUnit: 1000,
                    minorUnit: 500,
                    min: 0,
                    max: 12000,
                    vertical: true,
                }
            });
        }
     
        $(document).ready(function() {
            createGauges();
        });
    </script>
  2. Answer
    Nicklas
    Nicklas avatar
    45 posts
    Member since:
    Oct 2012

    Posted 18 Jul 2013 Link to this post

    Actually solved this. Came across an option I'd missed in your docs! Setting the "reverse" attribute to "true" did the trick.
  3. Kendo UI is VS 2017 Ready
Back to Top