Dimensions in Blazor Linear Gauge Component

15 Dec 20221 minute to read

Size for Linear Gauge

The height and width of the Linear Gauge can be set using the Width and Height properties in SfLinearGauge class.

In Pixel

The size of the Linear Gauge can be set in pixel.

@using Syncfusion.Blazor.LinearGauge

<SfLinearGauge Width="100px" Height="350px">
    <LinearGaugeAxes>
        <LinearGaugeAxis>
            <LinearGaugePointers>
                <LinearGaugePointer></LinearGaugePointer>
            </LinearGaugePointers>
        </LinearGaugeAxis>
    </LinearGaugeAxes>
</SfLinearGauge>

Changing Blazor Linear Gauge Size in Pixel

In Percentage

By setting value in percentage, Linear Gauge receives its dimension matching to its parent. For example, when the height is set as 50%, Linear Gauge renders to half of the parent height. The Linear Gauge will be responsive when the width is set as 100%.

@using Syncfusion.Blazor.LinearGauge

<SfLinearGauge Width="100%" Height="50%">
    <LinearGaugeAxes>
        <LinearGaugeAxis>
            <LinearGaugePointers>
                <LinearGaugePointer></LinearGaugePointer>
            </LinearGaugePointers>
        </LinearGaugeAxis>
    </LinearGaugeAxes>
</SfLinearGauge>

Changing Blazor Linear Gauge Size in Percentage

NOTE

When the component’s size is not specified, the height will be 450px and the width will be the same as the parent element’s width.