#Objects
Objects describe customizable properties associated with the visual. Each object can have multiple properties and each property has a type associated with it. Types refer to what the property will be. See below for more information about types.
myCustomObject
is the internal name used to reference the object within dataView
and enumerateObjectInstances
"objects": {
"myCustomObject": {
"displayName": "My Object Name",
"properties": { ... }
}
}
displayName
is the name that will be shown in the property pane.
properties
is a map of properties defined by the developer.
"properties": {
"myFirstProperty": {
"displayName": "firstPropertyName",
"type": ValueTypeDescriptor | StructuralTypeDescriptor
}
}
NOTE: show
is a special property that enables a switch to toggle the object.
Example:
"properties": {
"show": {
"displayName": "My Property Switch",
"type": {"bool": true}
}
}
There are 2 types of property types: ValueTypeDescriptor
and StructuralTypeDescriptor
.
ValueTypeDescriptor
are mostly primitive types and are typically used as a static object.
Here are some of the common ValueTypeDescriptor
export interface ValueTypeDescriptor {
text?: boolean;
numeric?: boolean;
integer?: boolean;
bool?: boolean;
}
StructuralTypeDescriptor
are mostly used for data bound objects.
Fill is the most common StructuralTypeDescriptor
export interface StructuralTypeDescriptor {
fill?: FillTypeDescriptor;
}