Is it possible to have the linear gauge pointer start from the center?

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

    Posted 22 Jul 2013 Link to this post

    Hi,

    I have a case where I measure negative and positive speed using the same linear gauge. I was wondering if it's possible to have the pointer start with the center as a zero-point? Here's my code:
    <script>
        function createSpeedGauge() {
            $("#speedBar").kendoLinearGauge({
                pointer: {
                    value: 0,
                    color: "black",
                    start: 0
                },
                scale: {
                    majorUnit: 20,
                    minorUnit: 2,
                    min: -120,
                    max: 120,
                    vertical: true,
                    reverse: true,
                    ranges: [
                        {
                            from: -120,
                            to: -30,
                            color: "#ffc700"
                        },
                        {
                            from: 120,
                            to: 30,
                            color: "#ffc700"
                        }
                    ]
                }
            });
        }
     
        $(document).ready(function() {
            createSpeedGauge();
        });
    </script>
    I've attached an image of how it's setup (the gauge in question on the right side). If this was setup the way I wanted, this gauge would've read -120 from this picture.  Hopefully, I've expressed myself clearly :)
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 23 Jul 2013 Link to this post

    Hello Nicklas,

    If I understand your scenario correctly you would like the pointer to start from 0 and go to -120? If this is the case I am afraid it is not supported and there is no a suitable workaround I can suggest you. If you are requesting different functionality please elaborate a bit more on the exact outcome you are expecting. Thank you in advance for your cooperation. 

    Regards,
    Iliana Nikolova
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Nicklas
    Nicklas avatar
    45 posts
    Member since:
    Oct 2012

    Posted 24 Jul 2013 Link to this post

    Hi Iliana,

    Thanks for your reply!

    Yes, you've understood me correctly. I'd like to move the filler either in a negative or positive direction, starting from the center and not one of the outer edges.
    I know someone has done this with the telerik linear bars, but this might require a different approach using javascript?



  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 25 Jul 2013 Link to this post

    Hi Nicklas,

    As I mentioned in my previous post, this functionality is not available in Kendo UI LinearGauge and there is no a suitable workaround I can suggest you. If you wish you may send this idea as a feature request at our UserVoice portal - this way the community would be able to evaluate it and if the suggestion gains popularity we will consider its implementation for future releases.   

    Regards,
    Iliana Nikolova
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready