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

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;
}());