Multiple Items

1 Oct 20151 minute to read

The text in the Digital Gauge is positioned with position object. This object contains two attributes such as x and y. The x variable positions the text in the horizontal axis and y variable positions the text in the vertical axis.

  • HTML
  • <ej:DigitalGauge runat="server" ID="DigitalGauge1" Width="500" Height="300">
    <%-- Adding frame background image --%>
    <Frame BackgroundImageUrl="../Content/images/gauge/Board1.jpg"/>
    <%-- Adding Item 1 --%>
    <ej:DigitalGaugeItems Value="YELLOW">
    <Position X="80" Y="0"/>
    <SegmentSettings Color="Yellow"/>
    <%-- Adding Item 1 --%>
    <ej:DigitalGaugeItems Value="RED">
    <Position X="80" Y="20"/>
    <SegmentSettings Color="Red"/>
    <%-- Adding Item 1 --%>
    <ej:DigitalGaugeItems Value="GREEN">
    <Position X="80" Y="40"/>
    <SegmentSettings Color="Green"/>

    Execute the above code example to render the DigitalGauge as follows.

    Digital Gauge control with multiple items