Skip to main content
A newer version of this page is available. .

ICustomItemMetaData Interface

When implemented, represents a custom item model.

Declaration

export interface ICustomItemMetaData

Properties

bindings Property

Specifies custom item’s data items (measures, dimensions) and its options.

Declaration

bindings?: Array<ICustomItemBinding>

Property Value

Type Description
Array<ICustomItemBinding>

An array of data items.

Remarks

The bindings property contains bindings used to provide data for the custom item.

The code snippet from the FunnelD3 custom item shows how to create custom measures (Values) and dimensions (Arguments):

  var funnelMeta = {
    bindings: [{
        propertyName: 'Values',
        dataItemType: 'Measure',
        array: true,
        enableColoring: true,
        displayName: 'DashboardWebCustomItemStringId.Values',
        emptyPlaceholder: 'DashboardWebCustomItemStringId.SetValue',
        selectedPlaceholder: 'DashboardWebCustomItemStringId.ConfigureValue'
    }, {
        propertyName: 'Arguments',
        dataItemType: 'Dimension',
        array: true,
        enableInteractivity: true,
        enableColoring: true,
        displayName: 'DashboardWebCustomItemStringId.Arguments',
        emptyPlaceholder: 'DashboardWebCustomItemStringId.SetArgument',
        selectedPlaceholder: 'DashboardWebCustomItemStringId.ConfigureArgument'
    }],
    //...
  }

Note

You can find and download the full example on GitHub: FunnelD3.

customProperties Property

Gets a collection of custom properties.

Declaration

customProperties?: Array<CustomPropertyMetadata>

Property Value

Type Description
Array<CustomPropertyMetadata>

A collection of the CustomPropertyMetadata objects.

Remarks

Tip

Documentation: Custom Properties

See Also

groupName Property

Specifies a Toolbox group name where a custom item should be located.

Declaration

groupName?: string

Property Value

Type Description
string

A string that specifies a Toolbox group name.

Remarks

You can add a custom item to an existing group or separate Custom group.

  • Set the groupName value to an existing group name to add the custom item to this group.
  • If the groupName value does not match an existing group name, the custom item is added to a separate Custom group.

To access toolbox groups in code, find ToolboxExtension and use its toolboxGroups property.

icon Property

Specifies a custom item’s icon.

Declaration

icon: string

Property Value

Type Description
string

A string that contains an id from icon’s svg definition.

Remarks

The custom item’s icon is used to identify a custom item in the Toolbox, empty dashboards and dashboard groups, etc.

See Also

index Property

Specifies an item position inside the specified Toolbox group.

Declaration

index?: number

Property Value

Type Description
number

A zero-based index that defines an item position inside the specified Toolbox group.

interactivity Property

Specifies support of the interactivity features (like Master Filtering and Drill-Down).

Declaration

interactivity?: {
    filter?: boolean;
    drillDown?: boolean;
}

Property Value

Name Type Description
drillDown boolean

true, to support drill-down; otherwise, false.

filter boolean

true, to support master-filtering; otherwise, false.

optionsPanelSections Property

Declaration

optionsPanelSections?: Array<SectionOptions>

Property Value

Type
Array<SectionOptions>

properties Property

Specifies properties used to provide specific settings for the custom item.

Declaration

properties?: Array<ICustomItemProperty>

Property Value

Type Description
Array<ICustomItemProperty>

An array of custom item’s properties.

Remarks

From v20.1, we recommend that you use the customProperties and optionsPanelSections properties when you specify the custom properties and options. These properties return arrays of the CustomPropertyMetadata or SectionOptions objects:

customProperties: <Array<CustomPropertyMetadata>>[{
    ownerType: CustomItem,
    propertyName: "backColorProperty",
    defaultValue: 'None',
    valueType: 'string',
}],
optionsPanelSections: <Array<SectionOptions>>[{
    title: 'Background Options',
    items: [{
        dataField: 'backColorProperty',
        editorType: "dxSelectBox",
        editorOptions: {
            items: [ 'None', 'Red', 'Blue' ]
        }
    }]
}]

title Property

Specifies a custom item title.

Declaration

title: string

Property Value

Type Description
string

A string value that is a custom item title.

Remarks

The title property specifies a custom item title that is used in the Toolbox, tooltips, as a default dashboard item caption, etc.