Display ONLY the Pointer for a Linear Gauge

3 posts, 1 answers
  1. Chris
    Chris avatar
    2 posts
    Member since:
    Jan 2013

    Posted 21 Feb 2013 Link to this post

    I'm trying to create a linear gauge, where ONLY the pointer is shown. The scale and all other furniture needs to be hidden, as we are displaying the pointer over a custom image in our web page.
    My code for the gauge so far is as follows:

    @(Html.Kendo().LinearGauge().Name("LinGauge" + @Model.ComponentName.Replace(" ",""))
        .Pointer(pointer => pointer.Size(30.0)
                       .Color("Black")
                       .Value(@Model.ComponentScore / 1000.0)
                       .Shape(GaugeLinearPointerShape.Arrow))
        .Scale(scale => scale.Min(0.0)
                     .Max(1.0)
                     .Vertical(false)
                     .MinorTicks(t => t.Visible(false))
                     .MajorTicks(t => t.Visible(false))
                     .Labels(l=>l.Visible(false))))

    This is almost there, and displays the pointer with just a single, undecorated line where you would expect the scale to be (see attached image), but I can't seem to find in the API reference how you would switch that line off. Any help would be appreciated.

  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 21 Feb 2013 Link to this post

    Hello Chris,

    Generally speaking you can achieve this as set visible false to the Gauge's Scale Line. Unfortunately there is a bug in the current version of Kendo UI Linear Gauge for ASP.NET MVC and it is not possible to achieve the desired outcome. The good news is that our developers have managed to address it and the fix will be included in the upcoming Q1 2013 Beta version (which is expected next week). Please accept my apologies for the inconvenience caused.

    Regards,
    Iliana Nikolova
    the Telerik team
    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. Chris
    Chris avatar
    2 posts
    Member since:
    Jan 2013

    Posted 21 Feb 2013 Link to this post

    Thank you, Iliana.
    I shall keep my eyes open for the beta update!
Back to Top