ResourceHistogram

This view displays a read-only timeline report of the workload for the resources in a project. The resource allocation is visualized as bars along the time axis with an optional line indicating the maximum available time for each resource. A ScaleColumn is also added automatically.

To create a standalone histogram, simply configure it with a Project instance:

const project = new ProjectModel({
    autoLoad : true,
    loadUrl  : 'examples/schedulerpro/view/data.json'
});

const histogram = new ResourceHistogram({
    project,
    appendTo    : 'targetDiv',
    rowHeight   : 60,
    minHeight   : '20em',
    flex        : '1 1 50%',
    showBarTip  : true,
    columns     : [
        {
            width : 200,
            field : 'name',
            text  : 'Resource'
        }
    ]
});

Resource histogram
//<code-header>
fiddle.title = 'Resource histogram';
//</code-header>
const histogram = new ResourceHistogram({
    project : {
        loadUrl  : 'data/SchedulerPro/examples/view/ResourceHistogram.json',
        autoLoad : true
    },
    resourceImagePath : 'data/Scheduler/images/transparent-users/',
    startDate         : new Date(2020, 3, 19),
    endDate           : new Date(2020, 4, 15),
    appendTo          : targetElement,
    rowHeight         : 60,
    autoHeight        : true,
    minHeight         : '20em',
    showBarTip        : true,
    columns           : [
        {
            type  : 'resourceInfo',
            width : 200,
            field : 'name',
            text  : 'Resource'
        }
    ]
});

Pairing the component

You can also pair the histogram with other timeline views such as the Gantt or Scheduler, using the partner config.

You can configure (or hide completely) the built-in scale column easily:

const histogram = new ResourceHistogram({
   project,
   appendTo    : 'targetDiv',
   columns     : [
       {
           width : 200,
           field : 'name',
           text  : 'Resource'
       },
       // Hide the scale column (or add any other column configs)
       {
           type   : 'scale',
           hidden : true
       }
   ]
});

Changing displayed values

To change the histogram bar texts, supply a getBarText function. Here for example the provided function displays resources time left instead of allocated time

new ResourceHistogram({
    getBarText(datum) {
        const resourceHistogram = this.owner;

        // get default bar text
        let result = resourceHistogram.getBarTextDefault(...arguments);

        // and if some work is done in the tick
        if (result) {

            const unit = resourceHistogram.getBarTextEffortUnit();

            // display the resource available time
            result = resourceHistogram.getEffortText(datum.maxEffort - datum.effort, unit);
        }

        return result;
    },
    ...
})

Configs

245

Common

columnsGridBase
dataGridBase
emptyTextGridBase
endDateTimelineBase
featuresGridBase
keyMapGridBase
listenersEvents
maxDateTimelineBase
minDateTimelineBase
presetsTimelineViewPresets
rowHeightGridBase
startDateTimelineBase
storeGridBase
viewPresetTimelineViewPresets
visibleDateTimelineBase

Other

A function that if provided decides whether an assignment should be taken into account or not when collecting allocation.

The function is recommended to be a generator so it can attach to the Engine and track the involved field changes automatically. It accepts two arguments: assignment record and ResourceAllocationInfo class instance collecting allocation. The instance has a special readField method that should be yielded to read the needed field value. The method also subscribes to further changes of the field triggering automatic allocation recollecting once the field gets changed:

new ResourceHistogram({
    // custom filtering function
    * assignmentFilterFn(assignment, allocationInfo) {
        // get the assignment event
        const event = yield assignment.$.event;

        // include only allocation of events having "type" field set to "Meeting"
        if (event) {
            // get "type" field value and bind to its changes
            // to refresh the histogram automatically
            const type = yield* allocationInfo.readField(event, 'type');

            return type === 'Meeting';
        }
    }
    ...
});
ParameterTypeDescription
assignmentAssignmentModel

Assignment to consider

resourceAllocationInfoResourceAllocationInfo

Resource allocation instance

Returns: Boolean -

true to include the assignment data and false to not

Default time unit used for displaying resources effort in bars. Yet the effective time unit used might change dynamically when zooming in the histogram so its ticks unit gets smaller than the default unit. Please use barTipEffortUnit to customize default units for tooltips (or effortUnit to customize both texts and tooltips default units).

Default time unit used when displaying resources effort in tooltips. Yet the effective time unit used might change dynamically when zooming in the histogram so its ticks unit gets smaller than the default unit. Please use barTextEffortUnit to customize default units for bar texts (or effortUnit to customize both texts and tooltips default units).

A Function which returns the tooltip text to display when hovering a bar. The following parameters are passed:

ParameterTypeDescription
contextObject

The tooltip context info

context.datumResourceAllocationInterval

The histogram bar being hovered info

context.tipTooltip

The tooltip instance

context.elementHTMLElement

The Element for which the Tooltip is monitoring mouse movement

context.activeTargetHTMLElement

The target element that triggered the show

context.eventEvent

The raw DOM event

context.recordResourceModel

The record which effort the hovered bar displays.

Returns: String -

Tooltip HTML content

Specifies a format to use for displaying cost values. Default value is:

costFormat : {
    style    : 'currency',
    currency : 'USD'
},

See NumberFormat docs for details on the supported config values. Please keep in mind that currency value will be automatically set to the loaded project currency.

effortFormat: String= 0.#

Effort value format string. Must be a template supported by NumberFormat class.

Default time unit to display resources effort values. The value is used as default when displaying effort in tooltips and bars text. Yet the effective time unit used might change dynamically when zooming in the histogram so its ticks unit gets smaller than the default unit. Please use barTipEffortUnit to customize default units for tooltips only and barTextEffortUnit to customize default units in bar texts.

getBarClass: function

A Function which returns a CSS class name to add to a bar's rectangle element. The following parameters are passed:

ParameterTypeDescription
seriesHistogramSeries

The series being rendered

domConfigDomConfig

The rectangle configuration object

datumResourceAllocationInterval

The datum being rendered

indexNumber

The index of the datum being rendered

renderDataResourceHistogramRenderData

Current render data giving access to the record, row and cell being rendered.

Returns: String -

CSS classes of the rectangle element

getBarDOMConfig: function

A Function which if provided returns DOM configuration object for a bar (a RECT element representing a single "bar"-type value). The function accepts default prepared DOM configuration in an argument which then can be processed and returned.

new ResourceHistogram({
    // Let's add left & right margins to bars
    getBarDOMConfig(series, domConfig) {
        // margin size is 10% of the bar width
        const xMargin = 0.1 * domConfig.width;

        // adjust the bar x-coordinate
        domConfig.x += xMargin;
        // reduce the bar width respectively
        domConfig.width -= 2 * xMargin;

        // return the edited domConfig
        return domConfig;
    },
    ...
})

Please note that it's important to return a DOM configuration object. If the function doesn't do that the corresponding bar won't be displayed.

The function will be injected into the underlying Histogram component that is used under the hood to render charts. So this will refer to the Histogram instance, not this class instance. To access the view please use this.owner in the function:

new ResourceHistogram({
    getBarText(datum) {
        // "this" in the method refers core Histogram instance
        // get the view instance
        const resourceHistogram = this.owner;

        .....
    },
    ...
})

The following parameters are passed:

ParameterTypeDescription
seriesHistogramSeries

The series being rendered

domConfigDomConfig

The rectangle DOM configuration object

datumResourceAllocationInterval

The datum being rendered

indexNumber

The index of the datum being rendered

renderDataResourceHistogramRenderData

Current render data giving access to the record, row and cell being rendered.

Returns: Object -

Resulting DOM configuration object. If no value returned the bar is not displayed.

getBarText: function

A Function which returns the text to render inside a bar.

Here for example the provided function displays resources time left instead of allocated time

new ResourceHistogram({
    getBarText(datum) {
        const resourceHistogram = this.owner;

        const { showBarText } = resourceHistogram;

        let result = '';

        // respect existing API - show bar texts only when "showBarText" is true
        // and if some work is done in the tick
        if (showBarText && datum.effort) {

            const unit = resourceHistogram.getBarTextEffortUnit();

            // display the resource available time
            result = resourceHistogram.getEffortText(datum.maxEffort - datum.effort, unit);
        }

        return result;
    },
})

Please note that the function will be injected into the underlying Histogram component that is used under the hood to render actual charts. So this will refer to the Histogram instance, not this class instance. To access the view please use this.owner in the function:

new ResourceHistogram({
    getBarText(datum) {
        // "this" in the method refers core Histogram instance
        // get the view instance
        const resourceHistogram = this.owner;

        .....
    },
})

The following parameters are passed:

ParameterTypeDescription
datumResourceAllocationInterval

The datum being rendered

indexNumber

The index of the datum being rendered

seriesHistogramSeries

The series (provided if histogram widget singleTextForAllBars is false)

renderDataResourceHistogramRenderData

Current render data giving access to the record, row and cell being rendered.

Returns: String -

Text to render inside the bar

A Function which returns a DOM configuration object for text elements.

new ResourceHistogram({
    getBarTextDOMConfig(domConfig, datum, index) {
        // Place text at the top of the "effort" bar
        // so calculate y-position in percents
        domConfig.y = `${100 * (1 - datum.effort / this.topValue)}%`;

        // also let's laid the text lines horizontally
        domConfig.style = 'writing-mode: lr';

        return domConfig;
    },
    ...
})

Please note that it's important to return a DOM configuration object. If the function doesn't do that the corresponding text element won't be displayed.

The function will be injected into the underlying Histogram component that is used under the hood to render actual charts. So this will refer to the Histogram instance, not this class instance. To access the view please use this.owner in the function:

new ResourceHistogram({
    getBarTextDOMConfig(domConfig) {
        // "this" in the method refers core Histogram instance
        // get the view instance
        const resourceHistogram = this.owner;

        .....

        return domConfig;
    },
    ...
})

The following parameters are passed:

ParameterTypeDescription
domConfigDomConfig

The TEXT element DOM configuration object

datumResourceAllocationInterval

The datum being rendered

indexNumber

The index of the datum being rendered

seriesHistogramSeries

The series (provided if histogram widget singleTextForAllBars is false)

renderDataResourceHistogramRenderData

Current render data giving access to the record, row and cell being rendered.

Returns: Object -

The TEXT element DOM configuration object. If no value returned the text element is not displayed.

getOutlineClass: function

A Function which returns a CSS class name to add to a path element built for an outline type series. The following parameters are passed:

ParameterTypeDescription
seriesHistogramSeries

The series being rendered

dataObject[]

The series data

renderDataResourceHistogramRenderData

Current render data giving access to the record, row and cell being rendered.

Returns: String -

CSS class name of the path element

A Function which if provided should return a DOM configuration object for a path element built for an outline type series. The function accepts a default prepared DOM configuration in an argument which then can be processed and returned.

The following parameters are passed to the function:

ParameterTypeDescription
seriesHistogramSeries

The series being rendered

domConfigDomConfig

The path element DOM configuration object

dataObject[]

The series data

renderDataResourceHistogramRenderData

Current render data giving access to the record, row and cell being rendered.

Returns: Object -

Resulting DOM configuration object. If no value returned the path is not displayed.

includeInactiveEvents: Boolean= false

Set to true to include inactive tasks allocation and false to not take such tasks into account.

respectStoreFilters: Boolean= false

Set to true to take task and assignment store filters into account when collecting allocation.

new ResourceHistogram({
    // skip filtered out events/assignments
    respectStoreFilters : true
    ...
});
showBarText: Boolean

Set to true if you want to display resources effort values in bars (for example: 24h, 7d, 60min etc.). The text contents can be changed by providing getBarText function.

showEffortUnit: Boolean= true

Specifies whether effort values should display units or not.

showMaxEffort: Boolean= true

Set to true if you want to display the maximum resource allocation line.

columnWidget
dataModelFieldTimelineHistogramBase
defaultFocusContainer
drawerPanel
getRecordDataTimelineHistogramBase
histogramWidgetTimelineHistogramBase
histogramWidgetClassTimelineHistogramBase
labelPositionContainer
passStartEndParametersSchedulerStores
renditionContainer
resourceImagesSchedulerResourceRendering
rtlRTL
scalePointsTimelineHistogramScaleColumn
seriesTimelineHistogramBase
showBarTipTimelineHistogramBase
spanWidget
stateSettingsGridState
transitionGridBase

Accessibility

ariaLabelWidget

Content

bbarPanel
defaultsContainer
footerPanel
headerPanel
itemsContainer
lazyItemsContainer
namedItemsContainer
stripsPanel
tbarPanel
textContentContainer
toolsPanel

CSS

bodyClsPanel
borderContainer
clsWidget
colorWidget
htmlClsWidget
itemClsContainer
styleWidget
uiPanel

Data

crudManagerSchedulerStores
crudManagerClassSchedulerStores
endParamNameSchedulerStores
resourceTimeRangesSchedulerStores
resourceTimeRangeStoreSchedulerStores
startParamNameSchedulerStores
timeRangesSchedulerStores
timeRangeStoreSchedulerStores

Dates

timeResolutionTimelineDateMapper

DOM

adoptWidget
appendToWidget
contentWidget
datasetWidget
htmlWidget
idWidget
tagWidget

Float & align

alignWidget
anchorWidget
centeredWidget
draggableWidget
floatingWidget
xWidget
yWidget

Infinite scroll

bufferCoefTimelineScroll
bufferThresholdTimelineScroll
infiniteScrollTimelineScroll

Layout

alignSelfWidget
autoHeightGridBase
dockWidget
flexWidget
getRowHeightGridBase
heightWidget
hiddenWidget
hideWhenEmptyContainer
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightGridBase
minWidthWidget
textAlignWidget
weightWidget
widthWidget

Masking

loadMaskLoadMaskable
loadMaskDefaultsLoadMaskable
loadMaskErrorLoadMaskable
syncMaskLoadMaskable

misc

tabBarItemsContainer

Misc

cellEllipsisGridBase
columnLinesGridBase
dataFieldWidget
defaultRegionTimelineBase
destroyStoreGridBase
disabledWidget
enableStickyGridBase
enableUndoRedoKeysGridElementEvents
hideFootersGridBase
hideHeadersGridBase
hideRowHoverTimelineBase
hoverClsGridElementEvents
iconPanel
localeClassLocalizable
localizableLocalizable
longPressTimeGridElementEvents
maskDefaultsGridBase
maskedWidget
ownerWidget
pluginsPluggable
readOnlyGridBase
refWidget
responsiveLevelsGridResponsive
rippleWidget
rowLinesGridBase
showDirtyGridBase
tabWidget
timeZoneTimelineBase
titlePanel
tooltipWidget

Parent histogram data collecting

aggregateDataEntryTimelineHistogramGrouping
aggregateHistogramDataForGroupsTimelineHistogramGrouping
getDataEntryForAggregatingTimelineHistogramGrouping
initAggregatedDataEntryTimelineHistogramGrouping

Record

recordContainer

Resources

defaultResourceImageNameSchedulerResourceRendering
resourceColumnsSchedulerResourceRendering
resourceImageExtensionSchedulerResourceRendering
resourceImagePathSchedulerResourceRendering

Scale column

scaleColumnTimelineHistogramScaleColumn

Scheduled events

barMarginTimelineEventRendering
displayDateFormatTimelineViewPresets
enableRecurringEventsRecurringEvents
eventColorTimelineEventRendering
eventStyleTimelineEventRendering
fillTicksTimelineEventRendering
managedEventSizingTimelineEventRendering
resourceMarginSchedulerResourceRendering
snapTimelineDateMapper
tickSizeTimelineEventRendering

Scrolling

scrollableGridBase

Selection

selectionModeGridSelection

State

stateIdState

Time axis

autoAdjustTimeAxisTimelineBase
forceFitTimelineBase
partnerTimelineBase
stickyHeadersTimelineBase
suppressFitTimelineBase
timeAxisTimelineBase
weekStartDayTimelineBase
workingTimeTimelineBase

Tree

Zoom

maxZoomLevelTimelineZoomable
minZoomLevelTimelineZoomable
visibleZoomFactorTimelineZoomable
zoomOnMouseWheelTimelineZoomable

Properties

209

Common

columnsGridBase
dataGridBase
emptyTextGridBase
endDateTimelineBase
featuresGridFeatures
maxDateTimelineBase
minDateTimelineBase
presetsTimelineViewPresets
rowHeightGridBase
startDateTimelineBase
storeGridBase
subGridsGridSubGrids
viewPresetTimelineViewPresets
visibleDateTimelineBase

Class hierarchy

isResourceHistogram: Boolean= truereadonly
Identifies an object as an instance of ResourceHistogram class, or subclass thereof.
isResourceHistogram: Boolean= truereadonlystatic
Identifies an object as an instance of ResourceHistogram class, or subclass thereof.
isContainerContainer
isCrudManagerViewCrudManagerView
isDelayableDelayable
isEventsEvents
isGridGrid
isGridBaseGridBase
isGridElementEventsGridElementEvents
isGridFeaturesGridFeatures
isGridResponsiveGridResponsive
isGridSelectionGridSelection
isGridStateGridState
isGridSubGridsGridSubGrids
isKeyMapKeyMap
isLoadMaskableLoadMaskable
isLocalizableLocalizable
isPanelPanel
isPluggablePluggable
isRecurringEventsRecurringEvents
isSchedulerResourceRenderingSchedulerResourceRendering
isSchedulerStoresSchedulerStores
isStateState
isTimelineBaseTimelineBase
isTimelineDateMapperTimelineDateMapper
isTimelineDomEventsTimelineDomEvents
isTimelineEventRenderingTimelineEventRendering
isTimelineHistogramTimelineHistogram
isTimelineHistogramBaseTimelineHistogramBase
isTimelineHistogramGroupingTimelineHistogramGrouping
isTimelineHistogramScaleColumnTimelineHistogramScaleColumn
isTimelineScrollTimelineScroll
isTimelineStateTimelineState
isTimelineViewPresetsTimelineViewPresets
isTimelineZoomableTimelineZoomable
isToolableToolable
isWidgetWidget

Accessibility

keyMapKeyMap

Content

bbarPanel
tbarPanel

CSS

clsWidget

Data

crudManagerSchedulerStores
resourceTimeRangesSchedulerStores
resourceTimeRangeStoreSchedulerStores
timeRangesSchedulerStores
timeRangeStoreSchedulerStores

Dates

timelineContextTimelineDomEvents
timeResolutionTimelineDateMapper
viewportCenterDateTimelineDateMapper
visibleDateRangeTimelineBase

DOM

appendToWidget
contentWidget
datasetWidget
elementWidget
htmlWidget
idWidget
styleWidget

Float & align

xWidget
yWidget

Infinite scroll

infiniteScrollTimelineScroll

Layout

alignSelfWidget
bodyHeightGridBase
flexWidget
footerHeightGridBase
headerHeightGridBase
heightWidget
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
widthWidget

Lifecycle

configBase

Misc

cellEllipsisGridBase
cellInfoWidget
columnLinesGridBase
disabledWidget
enableUndoRedoKeysGridElementEvents
hideFootersGridBase
hideHeadersGridBase
hideRowHoverTimelineBase
hoveredCellGridElementEvents
localeHelperLocalizable
localeManagerLocalizable
longPressTimeGridElementEvents
pluginsPluggable
readOnlyGridBase
refWidget
responsiveLevelGridResponsive
rowLinesGridBase
tabWidget
timeZoneTimelineBase
titlePanel
tooltipWidget

Other

$namestaticWidget
columnWidget
firstItemContainer
hasChangesContainer
histogramWidgetTimelineHistogramBase
isValidContainer
itemsContainer
labelPositionContainer
lastItemContainer
renditionContainer
resourceColumnsSchedulerResourceRendering
resourceColumnWidthSchedulerResourceRendering
rtlRTL
scalePointsTimelineHistogramScaleColumn
showBarTipTimelineHistogramBase
spanWidget
stateSettingsGridState
toolsPanel
transitionGridBase
typestaticWidget
valuesContainer

Record

recordContainer

Rows

Scale column

scaleColumnTimelineHistogramScaleColumn

Scheduled events

barMarginTimelineEventRendering
displayDateFormatTimelineViewPresets
eventColorTimelineEventRendering
eventColorsstaticTimelineEventRendering
eventStyleTimelineEventRendering
eventStylesstaticTimelineEventRendering
fillTicksTimelineEventRendering
hasVisibleEventsTimelineBase
resourceMarginSchedulerResourceRendering
snapTimelineDateMapper
tickSizeTimelineEventRendering

Scrolling

scrollLeftTimelineScroll
scrollTopTimelineScroll
scrollXTimelineScroll
timelineScrollerTimelineScroll

Selection

selectedCellGridSelection
selectedCellsGridSelection
selectedRecordGridSelection
selectedRecordsGridSelection
selectedRowsGridSelection
selectionModeGridSelection

State

stateGridState

Time axis

forceFitTimelineBase
partnersTimelineBase
suppressFitTimelineBase
timeAxisTimelineBase
timeAxisColumnTimelineBase
timeAxisSubGridTimelineBase
timeAxisViewModelTimelineBase
workingTimeTimelineBase

Tree

Visibility

hiddenWidget
isVisibleWidget

Widget hierarchy

ownerWidget
parentWidget
widgetMapContainer

Zoom

maxZoomLevelTimelineZoomable
minZoomLevelTimelineZoomable
zoomLevelTimelineZoomable

Functions

178

Other

The default method that returns the text to render inside a bar if no getBarText function was provided.

The method can be used in a getBarText function to invoke the default implementation:

new ResourceHistogram({
    getBarText(datum) {
        const resourceHistogram = this.owner;

        // get default bar text
        let result = resourceHistogram.getBarTextDefault();

        // if the resource is overallocated in that tick display "Overallocated! " string
        // before the allocation value
        if (result && datum.maxEffort < datum.effort) {
            result = 'Overallocated! ' + result;
        }

        return result;
    },
})

The following parameters are passed:

ParameterTypeDescription
datumResourceAllocationInterval

The data of the bar being rendered

indexNumber

The index of the datum being rendered

seriesString

Identifier of the series (provided only if the histogram widget singleTextForAllBars is false)

renderDataResourceHistogramRenderData

Current render data giving access to the record, row and cell being rendered.

Returns: String -

Text to render inside the bar

Returns unit to display effort values in when rendering the histogram bars. The method by default returns barTextEffortUnit value if provided and if not falls back to effortUnit value. But it also takes zooming into account and when the timeaxis ticks unit gets smaller than the default value the ticks unit is returned.

Returns: DurationUnit -

Time unit to display effort values in.

Formats effort value to display in the component bars and tooltips.

ParameterTypeDescription
effortNumber

Effort value

unitDurationUnit

Effort value unit

showEffortUnitBoolean

Provide true to include effort unit. If not provided uses showEffortUnit value.

Returns: String -

Formatted effort value.

Returns the provided record's allocation data. The process of allocation collecting is asynchronous so the method returns a Promise that provides the data once resolved.

The method used as the default value of getRecordData config.

ParameterTypeDescription
recordResourceModel

Resource record to collect allocation for.

Returns: Promise -

A Promise that provides the provided resource allocation info when resolved.

addContainer
addPartnerTimelineBase
aggregateHistogramDataTimelineHistogramGrouping
clearHistogramDataCacheTimelineHistogramBase
composeWidget
createOnFrameDelayable
disableWidget
enableWidget
focusWidget
formatDurationTimelineBase
getAtContainer
getHistogramDataCacheTimelineHistogramBase
getRecordHistogramDataTimelineHistogramBase
getWidgetByIdContainer
hasHistogramDataCacheTimelineHistogramBase
insertContainer
isPartneredWithTimelineBase
LstaticLocalizable
maskWidget
onEvents
preserveViewCenterTimelineBase
recomposeWidget
relayAllEvents
removeContainer
removeAllContainer
removePartnerTimelineBase
resetValuesContainer
scheduleRefreshRowsTimelineHistogramBase
setEndDateTimelineBase
setHistogramDataCacheTimelineHistogramBase
setStartDateTimelineBase
setTimeSpanTimelineBase
setValuesContainer
shiftTimelineZoomable
shiftNextTimelineZoomable
shiftPreviousTimelineZoomable
triggerEvents
unEvents
unmaskWidget
zoomToFitTimelineZoomable

Parent histogram data collecting

The default function used for aggregating a child record histogram data values to its parent entry. The function sums up effort and maxEffort series values. It also propagates isOverallocated and isUnderallocated values so if there is a child having the corresponding value as true it will be true on the parent level as well.

All children assignments are united on the parent level assignments property.

The method is used as aggregateDataEntry default value.

ParameterTypeDescription
aggregatedResourceAllocationInterval

Target parent data entry to aggregate the entry into.

entryResourceAllocationInterval

Current entry to aggregate into aggregated.

arrayIndexNumber

Index of the current record (among other records being aggregated).

colIndexNumber

entry index in the current array

Returns: ResourceAllocationInterval -

Resulting parent data entry.

The default function that initializes a target group record entry.

The method is used as initAggregatedDataEntry default value.

Returns: ResourceAllocationInterval -

Returns an empty allocation entry.

aggregateRecordsHistogramDataTimelineHistogramGrouping
getGroupRecordHistogramDataTimelineHistogramGrouping

Scale column

Generates points for the scale column.

Override the method to customize the scale column points.

ParameterTypeDescription
scaleMaxNumber

Maximum value for the scale. Uses current timeaxis increment if not provided.

unitDurationUnit

Time unit scaleMax argument is expressed in. Uses current timeaxis unit if not provided.

Returns: ScalePoint[] -

Array of objects representing scale points. Each entry can have properties:

  • value - point value
  • unit - point value unit
  • text - label text (if not provided the point will not have a label displayed)
renderRecordScaleTimelineHistogramScaleColumn

Configuration

applyDefaultsstaticBase

Data

getOccurrencesForRecurringEvents

Dates

getCoordinateFromDateTimelineDateMapper
getDateFromCoordinateTimelineDateMapper
getDateFromDomEventTimelineDateMapper
getDateFromXYTimelineDateMapper
getTimeSpanDistanceTimelineDateMapper

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Getters

getCellGridBase

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Misc

addPluginsPluggable
attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
getPluginPluggable
hasFeatureGridFeatures
hasPluginPluggable
highlightEventsTimelineBase
isOfTypeNamestaticBase
maskBodyGridBase
mixinstaticBase
optionalLstaticLocalizable
unhighlightEventsTimelineBase
unmaskBodyGridBase

Rendering

refreshRowGridBase
refreshRowsGridBase
renderRowsGridBase

Rows

getRowForGridBase

Scrolling

scrollHorizontallyToTimelineScroll
scrollToTimelineScroll
scrollToDateTimelineScroll
scrollToNowTimelineScroll
scrollToTopGridBase
scrollVerticallyToTimelineScroll
storeScrollGridBase

Selection

deselectAllGridSelection
deselectCellGridSelection
deselectCellsGridSelection
deselectRowGridSelection
deselectRowsGridSelection
isCellSelectedGridSelection
isSelectableGridSelection
isSelectedGridSelection
selectAllGridSelection
selectCellGridSelection
selectCellRangeGridSelection
selectCellsGridSelection
selectRangeGridSelection
selectRowGridSelection
selectRowsGridSelection

State

SubGrid

getSubGridGridSubGrids

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
ownsWidget
queryWidget
queryAllWidget
upWidget

Zoom

zoomInTimelineZoomable
zoomInFullTimelineZoomable
zoomOutTimelineZoomable
zoomOutFullTimelineZoomable
zoomToTimelineZoomable
zoomToLevelTimelineZoomable
zoomToSpanTimelineZoomable

Events

65

Fires when the component generates points for the scale column.

Use a listeners to override the generated scale points:

new ResourceHistogram({
    ...
    listeners : {
        generateScalePoints(params) {
            // provide text for each scale point (if not provided already)
            params.scalePoints.forEach(point => {
                point.text = point.text || point.value;
            });
        }
    }
})
// Adding a listener using the "on" method
resourceHistogram.on('generateScalePoints', ({ source, scalePoints }) => {

});
ParameterTypeDescription
sourceResourceHistogram

The component instance

scalePointsScalePoint[]

Array of objects representing scale points. Each entry can have properties:

  • value - point value
  • unit - point value unit
  • text - label text (if not provided the point will not have a label displayed)
beforeAssignmentDeleteRecurringEvents
beforeEventDeleteRecurringEvents
beforeHistogramDataCacheSetTimelineHistogramBase
beforePresetChangeTimelineViewPresets
beforeRenderHistogramRowTimelineHistogramBase
beforeRenderRecordHistogramTimelineHistogramBase
catchAllEvents
cellClickGridElementEvents
cellContextMenuGridElementEvents
cellDblClickGridElementEvents
cellMouseEnterGridElementEvents
cellMouseLeaveGridElementEvents
cellMouseOutGridElementEvents
cellMouseOverGridElementEvents
dataChangeGridBase
dateRangeChangeTimelineBase
destroyEvents
dragSelectingGridSelection
expandPanel
focusInWidget
focusOutWidget
headerClickGridElementEvents
hideWidget
histogramDataCacheSetTimelineHistogramBase
mouseOutGridElementEvents
mouseOverGridElementEvents
noZoomChangeTimelineZoomable
paintWidget
presetChangeTimelineViewPresets
readOnlyWidget
recomposeWidget
renderRowGridBase
renderRowsGridBase
resizeWidget
responsiveGridResponsive
rowMouseEnterGridElementEvents
rowMouseLeaveGridElementEvents
scrollGridBase
selectionChangeGridSelection
selectionModeChangeGridSelection
showWidget
tickSizeChangeTimelineEventRendering
timeAxisChangeTimelineBase
timeAxisHeaderClickTimelineDomEvents
timeAxisHeaderContextMenuTimelineDomEvents
timeAxisHeaderDblClickTimelineDomEvents
timelineContextChangeTimelineDomEvents

Event handlers

65

Called when the component generates points for the scale column.

Use a listeners to override the generated scale points:

new ResourceHistogram({
    ...
    listeners : {
        generateScalePoints(params) {
            // provide text for each scale point (if not provided already)
            params.scalePoints.forEach(point => {
                point.text = point.text || point.value;
            });
        }
    }
})
new ResourceHistogram({
    onGenerateScalePoints({ source, scalePoints }) {

    }
});
ParameterTypeDescription
sourceResourceHistogram

The component instance

scalePointsScalePoint[]

Array of objects representing scale points. Each entry can have properties:

  • value - point value
  • unit - point value unit
  • text - label text (if not provided the point will not have a label displayed)
onBeforeEventDeleteRecurringEvents
onBeforeHistogramDataCacheSetTimelineHistogramBase
onBeforePresetChangeTimelineViewPresets
onBeforeRenderHistogramRowTimelineHistogramBase
onBeforeRenderRecordHistogramTimelineHistogramBase
onCellClickGridElementEvents
onCellContextMenuGridElementEvents
onCellDblClickGridElementEvents
onCellMouseEnterGridElementEvents
onCellMouseLeaveGridElementEvents
onCellMouseOutGridElementEvents
onCellMouseOverGridElementEvents
onDataChangeGridBase
onDateRangeChangeTimelineBase
onDestroyEvents
onDragSelectingGridSelection
onFocusInWidget
onHeaderClickGridElementEvents
onHideWidget
onHistogramDataCacheSetTimelineHistogramBase
onMouseOutGridElementEvents
onMouseOverGridElementEvents
onNoZoomChangeTimelineZoomable
onPaintWidget
onPresetChangeTimelineViewPresets
onRenderRowGridBase
onRenderRowsGridBase
onResizeWidget
onResponsiveGridResponsive
onRowMouseEnterGridElementEvents
onRowMouseLeaveGridElementEvents
onScrollGridBase
onSelectionChangeGridSelection
onShowWidget
onTickSizeChangeTimelineEventRendering
onTimeAxisChangeTimelineBase
onTimeAxisHeaderClickTimelineDomEvents
onTimeAxisHeaderDblClickTimelineDomEvents
onTimelineContextChangeTimelineDomEvents

Typedefs

20

ResourceHistogram renderer parameters.

ParameterTypeDescription
histogramDataObject

Histogram data

histogramConfigHistogramConfig

Configuration object for the histogram widget

cellElementHTMLElement | null

Cell element, for adding CSS classes, styling etc. Can be null in case of export

recordResourceModel

Record for the row

columnTimeAxisColumn

Owning TimeAxisColumn column

gridResourceHistogram

Owning ResourceHistogram instance

rowRow

Row object. Can be null in case of export. Use the row's API to manipulate CSS class names.

AlignSpecWidget
ChangePresetOptionsTimelineZoomable
ColorWidget
ColumnStateGridState
GridSelectionModeGridSelection
GridStateInfoGridState
HistogramRenderDataTimelineHistogramBase
ResponsiveLevelConfigGridResponsive
SubGridStateGridState
TimelineStateInfoTimelineState
VisibleDateTimelineBase

CSS variables

91