Back to Devexpress

LayoutOptions Class

dashboard-js-devexpress-dot-dashboard-dot-model-8c9fa4dc.md

latest3.2 KB
Original Source

LayoutOptions Class

Contains dashboard layout settings.

Declaration

ts
export class LayoutOptions extends SerializableModel

Remarks

The following code snippet specifies the height and aligns the dashboard’s content horizontally:

Handle the DashboardControlOptions.onDashboardInitializing event and call the custom setLayout function:

js
function setLayout(e) {
    if (e.dashboard.id == "dashboard2") {
        e.dashboard.layoutOptions.width.mode("Auto");
        e.dashboard.layoutOptions.height.mode("Fixed");
        e.dashboard.layoutOptions.height.value(3000);
    }

Inherited Members

disposed

Inheritance

SerializableModel LayoutOptions

constructor

Initializes a new instance of the LayoutOptions class with specified settings.

Declaration

ts
constructor(
    model?: any,
    serializer?: DevExpress.Analytics.Utils.IModelSerializer,
    info?: DevExpress.Analytics.Utils.ISerializationInfoArray
)

Parameters

NameTypeDescription
modelany

A model of the layout options.

| | serializer | IModelSerializer |

An object used for dashboard deserialization. Do not pass this parameter directly.

| | info | ISerializationInfoArray |

An array of objects that provide serialization info.

|

Properties

height Property

Provides access to the dashboard surface‘s height options.

Declaration

ts
height: DevExpress.Dashboard.Model.LayoutDimensionOptions

Property Value

TypeDescription
LayoutDimensionOptions

A LayoutDimensionOptions object that contains options for dimensions of a dashboard surface.

|

width Property

Provides access to the dashboard surface‘s width options.

Declaration

ts
width: DevExpress.Dashboard.Model.LayoutDimensionOptions

Property Value

TypeDescription
LayoutDimensionOptions

A LayoutDimensionOptions object that contains options for dimensions of a dashboard surface.

|

Methods

getInfo Method

For internal use.

Declaration

ts
getInfo(): DevExpress.Analytics.Utils.ISerializationInfoArray

Returns

TypeDescription
ISerializationInfoArray

An array of objects that provide serialization info.

|