Configuration size

Specifies the size of the widget in pixels.

Type: Object
Default Value: undefined

By default, the widget occupies the entire area of the parent container. If you need to set a particular size for the widget, different from the container's size, assign a height and width in pixels to height and width properties of the size object.

Using the size object, you can hide the widget. For this purpose, simply assign 0 to both the height and width of the widget.

Show Example:
jQuery

In this example, the size of the LinearGauge widget is less than the container size.

<div id="linearGaugeContainer" style="height:150px;max-width:700px;margin:0px auto;border:1px solid black"></div>
$(function () {
    $("#linearGaugeContainer").dxLinearGauge({
        rangeContainer: { backgroundColor: 'coral' },
        scale: {
            label: { font: { color: 'chocolate' } }
        },
        valueIndicator: { color: 'salmon' },
        value: 42,
        size: {
            height: 100,
            width: 500
        }
    });
});

height

Specifies the height of the widget in pixels.

Type: Number
Default Value: undefined

width

Specifies the width of the widget in pixels.

Type: Number
Default Value: undefined