Labels

A feature that lets you display a label on each side of a Gantt task bar. See Labels for more information.

new Gantt({
   features : {
       labels : {
           // Label rendered before the task bar with content from the record's `name` field
           before : {
               field  : 'name',
               editor : {
                   type : 'textfield'
               }
           },
           // Label rendered below the task bar with custom content
           // from a renderer
           bottom : {
               renderer : ({ taskRecord }) => `ID: ${taskRecord.id}`
           }
       }
   }
});

This feature is disabled by default. For info on enabling it, see GridFeatures.

Configs

19

Common

disabledInstancePlugin
listenersEvents

Other

Configuration object for the label which appears after the task bar in the current writing direction.

Configuration object for the label which appears before the task bar in the current writing direction.

Bottom label configuration object.

Left label configuration object.

Right label configuration object.

Top label configuration object.

labelClsLabels

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Properties

15

Common

disabledInstancePlugin

Class hierarchy

isLabels: Boolean= truereadonly
Identifies an object as an instance of Labels class, or subclass thereof.
isLabels: Boolean= truereadonlystatic
Identifies an object as an instance of Labels class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Other

Functions

28

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Events

5
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

5
onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

3

Configuration object for a label used by the Labels feature.

ParameterTypeDescription
fieldString

The name of a field in the TaskModel

rendererfunction

A function, that is passed an object containing taskRecord, and domConfig properties. Either return the HTML/DomConfig to display as the label, or mutate the provided domConfig object.

renderer.taskRecordTaskModel

The Task record

renderer.domConfigDomConfig

The DOMConfig representing the label

thisObjObject

The this reference to use in the renderer.

editorInputFieldConfig | Field

If the label is to be editable, a field configuration object with a type property, or an instantiated Field. The editor property is mandatory for editing to work.

CSS variables

6

Inherited