OptionsPanelExtensionOptions Interface
#Declaration
TypeScript
export interface OptionsPanelExtensionOptions
#Properties
#onCustomizeSections Property
A handler for the event that allows you to customize the Options menu sections.
#Declaration
TypeScript
onCustomizeSections?: (args: DevExpress.Dashboard.Designer.CustomizeSectionsEventArgs) => void
#Property Value
Type | Description |
---|---|
(args: Customize |
A function that is executed before the Options menu is rendered. |
#Remarks
The following code adds a new section to the Options menu:
- Create a custom property (an
axisMaxValueConstantProperty
object). Users can change its value in an editor displayed in the newly added section. - Handle the onCustomizeSections event and use the CustomizeSectionsEventArgs.addSection method to add the new section.
javascript
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",
}
}
]
})
}