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

OptionsPanelExtensionOptions Interface

Declaration

export interface OptionsPanelExtensionOptions

Properties

onCustomizeSections Property

A handler for the event that allows you to customize the Options menu sections.

Declaration

onCustomizeSections?: (args: DevExpress.Dashboard.Designer.CustomizeSectionsEventArgs) => void

Property Value

Type Description
(args: CustomizeSectionsEventArgs) => void

A function that is executed before the Options menu is rendered.

Remarks

The following code adds a new section to the Options menu:

  1. Create a custom property (an axisMaxValueConstantProperty object). Users can change its value in an editor displayed in the newly added section.
  2. Handle the onCustomizeSections event and use the CustomizeSectionsEventArgs.addSection method to add the new section.

var Model = DevExpress.Dashboard.Model;

const axisMaxValueConstantProperty = {
    ownerType: Model.ChartItem,
    propertyName: "AxisMaxValueConstant",
    defaultValue: 100,
    valueType: 'number'
};
Model.registerCustomProperty(axisMaxValueConstantProperty);
// ...
function onCustomizeSections(args) {
    args.addSection({
        title: "Primary Axis Max Value (Custom)",
        items: [
            {
                dataField: axisMaxValueConstantProperty.propertyName,
                editorType: "dxNumberBox",
                label: {
                    text: "Value",
                }
            }
        ]
    })
}