Unable to set height with server-side wrapper for RadialGauge

2 posts, 0 answers
  1. William
    William avatar
    4 posts
    Member since:
    Jul 2012

    Posted 21 May 2013 Link to this post

    How can I set the height of a RadialGauge using the server-side wrapper if it's not exposed?
    @(
        Html.Kendo().RadialGauge()
            .Name("patientDocumentMatchThresholdGauge")
            .Pointer(pointer => pointer.Value((double)Model.PatientDocumentMatchThreshold * 100))
            .Scale(scale => scale
                .EndAngle(180)
                .MajorUnit(10)
                .Max(100)
                .Min(0)
                .MinorUnit(1)
                .StartAngle(0)
                .Ranges(ranges => {
                    ranges.Add().From(0).To(90).Color("#f00");
                    ranges.Add().From(90).To(95).Color("#ffa500");
                    ranges.Add().From(95).To(100).Color("#0c0");
                }
            )
        )
    )
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 23 May 2013 Link to this post

    Hello William,

    Basically the height is controlled by the height of the element. To control the style of the element you can use the HtmlAttributes method.
    e.g.
    @{
        ViewBag.Title = "About Us";
    }
     
    @(
     Html.Kendo().RadialGauge()
            .Name("patientDocumentMatchThresholdGauge")
            .HtmlAttributes(new { style="height:1000px"})
            .Pointer(pointer => pointer.Value(33))
            .Scale(scale => scale
                .EndAngle(180)
                .MajorUnit(10)
                .Max(100)
                .Min(0)
                .MinorUnit(1)
                .StartAngle(0)
                .Ranges(ranges =>
                {
                    ranges.Add().From(0).To(90).Color("#f00");
                    ranges.Add().From(90).To(95).Color("#ffa500");
                    ranges.Add().From(95).To(100).Color("#0c0");
                }
            )
        )
    )


    Kind Regards,
    Petur Subev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top