v7.3.0
SupportExamplesFree Trial

SchedulerEventRendering
Mixin

Functions to handle event rendering (EventModel -> dom elements). Manages event layout strategies, milestone rendering, event styling, and the generation of DOM content for each event bar.

const scheduler = new Scheduler({
    eventColor : 'blue',
    eventStyle : 'rounded',

eventRenderer({ eventRecord, renderData }) { return eventRecord.name; } });

See also

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • milestoneAlign : 'start'/'center'/'end'center

    How to align milestones in relation to their startDate. Only applies when using a milestoneLayoutMode other than default. Valid values are:

    • start
    • center (default)
    • end

    Has a corresponding runtime milestoneAlign property.

  • Factor representing the average char width in pixels used to determine milestone width when configured with milestoneLayoutMode: 'estimate'.

    Has a corresponding runtime milestoneCharWidth property.

  • milestoneTextPosition : 'inside'/'outside'/'always-outside'outside

    Position of the milestone text:

    • 'inside' - for short 1-char text displayed inside the diamond, not applicable when using milestoneLayoutMode)
    • 'outside' - for longer text displayed outside the diamond, but inside it when using milestoneLayoutMode
    • 'always-outside' - outside even when combined with milestoneLayoutMode

    Has a corresponding runtime milestoneTextPosition property.

  • The class responsible for the packing horizontal event layout process. Override this to take control over the layout process.

  • The class name responsible for the stacking horizontal event layout process. Override this to take control over the layout process.

  • Maximum duration (in milliseconds) for the initial animation controlled by useInitialAnimation.

    Has a corresponding runtime initialAnimationDuration property.

  • Generic resource image, used when provided imageUrl or image fields or path calculated from resource name are all invalid. If left blank, resource name initials will be shown when no image can be loaded.

  • Resource image extension, used when creating image path from resource name.

  • Field from EventModel displayed as text in the bar when rendering

  • this reference for the eventRenderer function

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isSchedulerEventRendering : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of SchedulerEventRendering class, or subclass thereof.
  • milestoneAlign : 'start'/'center'/'end'center

    How to align milestones in relation to their startDate. Only applies when using a milestoneLayoutMode other than default. Valid values are:

    • start
    • center (default)
    • end

    Has a corresponding milestoneAlign config.

  • Factor representing the average char width in pixels used to determine milestone width when configured with milestoneLayoutMode: 'estimate'.

    Has a corresponding milestoneCharWidth config.

  • milestoneTextPosition : 'inside'/'outside'/'always-outside'outside

    Position of the milestone text:

    • 'inside' - for short 1-char text displayed inside the diamond, not applicable when using milestoneLayoutMode)
    • 'outside' - for longer text displayed outside the diamond, but inside it when using milestoneLayoutMode
    • 'always-outside' - outside even when combined with milestoneLayoutMode

    Has a corresponding milestoneTextPosition config.

  • Maximum duration (in milliseconds) for the initial animation controlled by useInitialAnimation.

    Has a corresponding initialAnimationDuration config.

  • Override this method to provide a custom sort function to sort any overlapping events. See overlappingEventSorter for more details.

    Has a corresponding overlappingEventSorter config.

  • Get resource column width. Only applies to vertical mode. To set it, assign to scheduler.resourceColumns.columnWidth.

  • Use it to manipulate resource column properties at runtime.

    Has a corresponding resourceColumns config.

Functions

Functions are methods available for calling on the class

    Type definitions

    CSS variables

    CSS variables that can be set to adjust appearance
    Name Description
    --b-sch-event-animating-transition Event transitions that are enabled when Scheduler is animating
    --b-sch-event-background Event background color (overridden by event styles)
    --b-sch-event-border-color Event border color (overridden by event styles)
    --b-sch-event-border-radius Event border radius (overridden by event styles)
    --b-sch-event-border-style Event border style (overridden by event styles)
    --b-sch-event-border-width Event border-width. Must include a unit even when 0, for calculations to be correct (overridden by event styles)
    --b-sch-event-box-shadow Event box-shadow (overridden by event styles)
    --b-sch-event-color Event text color (overridden by event styles)
    --b-sch-event-content-height Event content height (when not using sticky events)
    --b-sch-event-content-width Event content width (when not using sticky events)
    --b-sch-event-cursor Event cursor
    --b-sch-event-font-size Event font size (overridden by event styles)
    --b-sch-event-font-weight Event font weight (overridden by event styles)
    --b-sch-event-min-size Events min-width (height in vertical mode), to ensure even very short events are visible
    --b-sch-event-opacity Event opacity (overridden by event styles)
    --b-sch-event-padding-block Event padding block
    --b-sch-event-padding-inline Event padding inline
    --b-sch-event-transition Event transitions that are always enabled (for hover effects)
    --b-sch-event-width-reduction Event width reduction, to leave a small gap between events that end / start at the same time
    --b-sch-milestone-border-width Milestone border width (overridden by event styles)
    --b-sch-milestone-gap Gap between milestone diamond and its label
    Hovered
    --b-sch-event-hover-background Hovered event's background color (overridden by event styles)
    Selected
    --b-sch-event-selected-background Selected event's background color (overridden by event styles)

    Source path

    Scheduler/view/mixin/SchedulerEventRendering.js

    Contents