All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

registerCustomProperty(meta) Function

Registers the custom property definition.

Declaration

export function registerCustomProperty(meta: CustomPropertyMetadata): void

Parameters

Name Type Description
meta CustomPropertyMetadata

An object that provides the custom property definition.

Returns

Type Description
void

A result is the registered custom property definition.

Remarks

If you do not register the property, you still can read and write a custom property's values. But in this case the control does not react to changes of the property's value. For example, you cannot save your actions to the control's history and use undo/redo. For example, this approach is useful when you want to record the time when a dashboard was created and other technical information.

The following example shows how to register the custom property definition for the custom Scale Break property:

var ChartScaleBreaksExtension = (function() {
    var Model = DevExpress.Dashboard.Model;

    // 1. Model
    var autoScaleBreaksProperty = {
        ownerType: Model.ChartItem,
        propertyName: 'ScaleBreaks',
        defauleValue: false,
        valueType: 'boolean'
    };

    Model.registerCustomProperty(autoScaleBreaksProperty);

    return ChartScaleBreaksExtension;
}());