The requested page is not available for the requested platform. You are viewing the content for Default platform.

ImageItem Class

Declaration

export class ImageItem extends DashboardItem

Remarks

The image dashboard item is used to add static images to a dashboard.

Image_Web

The following documentation is available:

Examples

The following example shows how to create the Image dashboard item and provide a static image by URL. Create the ImageItem instance and use the ImageItem.urlPath property to specify a URL to a static image.

After you add the created dashboard item to the Dashboard.items collection, call the Dashboard.rebuildLayout method to rebuild the dashboard layout and display changes.

// Use the line below for a modular approach:
// import * as Model from 'devexpress-dashboard/model'
// Use the line below for an approach with global namespaces:
// var Model = DevExpress.Dashboard.Model;

public createImage(){
    var imageItem = new Model.ImageItem();
    imageItem.urlPath("https://www.devexpress.com/Products/NET/Dashboard/i/dashboard-tablet.png");
    imageItem.sizeMode("Squeeze");

    control.dashboard().items.push(imageItem);
    // ...
    control.dashboard().rebuildLayout();
}

Inheritance

DashboardItem
ImageItem
See Also

constructor

Initializes a new instance of the ImageItem class.

Declaration

constructor(modelJson?: any, serializer?: DxDesigner.Analytics.Utils.ModelSerializer)

Optional Parameters

Name Type Default Description
modelJson any null

A JSON object used for a dashboard deserialization. Do not pass this parameter directly.

serializer DxDesigner.Analytics.Utils.ModelSerializer null

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

Properties

horizontalAlignment Property

Declaration

horizontalAlignment: KnockoutObservable<ImageHorizontalAlignment>

Property Value

Type Description
KnockoutObservable<ImageHorizontalAlignment>

image64 Property

Declaration

image64: KnockoutObservable<string>

Property Value

Type Description
KnockoutObservable<string>

imageType Property

Declaration

imageType: KnockoutObservable<string>

Property Value

Type Description
KnockoutObservable<string>

sizeMode Property

Declaration

sizeMode: KnockoutObservable<ImageSizeMode>

Property Value

Type Description
KnockoutObservable<ImageSizeMode>

urlPath Property

Declaration

urlPath: KnockoutObservable<string>

Property Value

Type Description
KnockoutObservable<string>

verticalAlignment Property

Declaration

verticalAlignment: KnockoutObservable<ImageVerticalAlignment>

Property Value

Type Description
KnockoutObservable<ImageVerticalAlignment>

Methods

getInfo Method

For internal use.

Declaration

getInfo(): DxDesigner.Analytics.Utils.ISerializationsInfo

Returns

Type Description
DxDesigner.Analytics.Utils.ISerializationsInfo