This is a migrated thread and some comments may be shown as answers.

Unable to set height with server-side wrapper for RadialGauge

1 Answer 104 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 21 May 2013, 09:05 PM
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");
            }
        )
    )
)

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 23 May 2013, 03:17 PM
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!
Tags
Gauge
Asked by
William
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or