Events: {
    changed: (flags: EChangeFlags, interactionActive: boolean) => void;
    chartResized: () => void;
    clear: () => void;
    contextMenu: (
        event: Event | null,
        point: Point,
        objects: BG.charts.Object[],
        chart: BG.charts.Chart,
        menuId?: string | null,
    ) => void;
    create: () => void;
    created: () => void;
    doubleClicked: (
        event: Event | null,
        point: Point,
        object: BG.charts.Object,
    ) => void;
    legendClicked: (
        event: Event | null,
        point: Point,
        object: BG.charts.Object,
        button?: string | null,
    ) => void;
    legendHovered: (
        legendEntry: BG.charts.LegendEntry | null,
        object: BG.charts.Object | null,
    ) => void;
    loaded: (error: Error | null) => void;
    message: (
        id: string,
        message: string | I18NString,
        context: BG.charts.Object | null,
    ) => void;
    objectAdded: (
        object: BG.charts.Object,
        parent: BG.charts.Object | null,
        index: number,
    ) => void;
    objectCreated: (object: BG.charts.Object) => void;
    objectDiscarded: (object: BG.charts.Object) => void;
    objectFlagsChanged: (object: BG.charts.Object) => void;
    objectHighlighted: (object: BG.charts.Object | null) => void;
    objectHovered: (object: BG.charts.Object | null) => void;
    objectModified: (object: BG.charts.Object) => void;
    objectMoved: (
        object: BG.charts.Object,
        oldParent: BG.charts.Object | null,
        oldScaleId: number,
        oldIndex: number,
        newParent: BG.charts.Object | null,
        newScaleId: number,
        newIndex: number,
    ) => void;
    objectPlaced: (
        event: Event | null,
        object: BG.charts.Object,
        finished: boolean,
    ) => void;
    objectRemoved: (
        object: BG.charts.Object,
        parent?: BG.charts.Object | null,
    ) => void;
    objectRenamed: (object: BG.charts.Object) => void;
    objectReplaced: (object: BG.charts.Object, oldIdentifier: string) => void;
    objectSelected: (object: BG.charts.Object | null) => void;
    push: (
        ts: BG.charts.TimeSeries,
        value: number,
        relativeChange: number,
        absoluteChange: number,
    ) => void;
    selectionMenu: (
        event: Event | null,
        point: Point,
        objects: BG.charts.Object[],
        cb: (object: BG.charts.Object) => void,
    ) => void;
    updatedIdentifier: (oldIdentifier: string, newIdentifier: string) => void;
}

Type declaration

  • changed: (flags: EChangeFlags, interactionActive: boolean) => void
  • chartResized: () => void

    Fired when a chart in the set was manually resized

  • clear: () => void

    Fired when the chart was cleared

  • contextMenu: (
        event: Event | null,
        point: Point,
        objects: BG.charts.Object[],
        chart: BG.charts.Chart,
        menuId?: string | null,
    ) => void

    Fired when a context menu for one or more objects should be displayed

  • create: () => void

    Fired when a new chart will be created

  • created: () => void

    Fired when a new chart was created

  • doubleClicked: (event: Event | null, point: Point, object: BG.charts.Object) => void

    Fired when an object was double clicked

  • legendClicked: (
        event: Event | null,
        point: Point,
        object: BG.charts.Object,
        button?: string | null,
    ) => void

    Fired when a legend entry or a custom button (e.g. "select") of a legend entry was clicked For special legend entries that do not directly reference an object, the object parameter will be set to the Chart instead.

  • legendHovered: (
        legendEntry: BG.charts.LegendEntry | null,
        object: BG.charts.Object | null,
    ) => void

    Fired when a legend entry was hovered

  • loaded: (error: Error | null) => void
  • message: (
        id: string,
        message: string | I18NString,
        context: BG.charts.Object | null,
    ) => void

    Fired when a message can be shown to the user to inform him about an event

  • objectAdded: (
        object: BG.charts.Object,
        parent: BG.charts.Object | null,
        index: number,
    ) => void

    Fired when an object was added to the underlying chartset

  • objectCreated: (object: BG.charts.Object) => void

    Fired during placement, when an object was created but not yet added to a chart

    NOTE: object was not yet added to the Controllers hierarchy at this time. Some options might

    • such as style dependant values - might still be uninitialized
  • objectDiscarded: (object: BG.charts.Object) => void

    Fired when an object that previously triggered objectCreated was discarded

  • objectFlagsChanged: (object: BG.charts.Object) => void

    Fired when an objects flags changed

  • objectHighlighted: (object: BG.charts.Object | null) => void

    Fired when the highlighted object changes If no object is highlighted, parameter will be null

  • objectHovered: (object: BG.charts.Object | null) => void

    Fired if the hovered object changes; If no object is hovered, parameter will be null

  • objectModified: (object: BG.charts.Object) => void

    Fired when an object (e.g. a tool) was modified

  • objectMoved: (
        object: BG.charts.Object,
        oldParent: BG.charts.Object | null,
        oldScaleId: number,
        oldIndex: number,
        newParent: BG.charts.Object | null,
        newScaleId: number,
        newIndex: number,
    ) => void

    Fired when an object was moved to a new parent, scale and/or position NOTE: for Charts, both oldParent and newParent will always be null

  • objectPlaced: (event: Event | null, object: BG.charts.Object, finished: boolean) => void

    Fired when an object that previously triggered objectCreated was placed in the chart

    This event is triggered up to two times; the third parameter indicates if the tool was just placed in a chart but there are still other handles to be placed (false), or if placement was completely finished (true).

    So basically for tools that just have one handle it will only trigger once; twice for all others.

    NOTE: event can be null if placement is non interactive e.g. calling addTool with a point for a tool that has only one handle will finish immediately without requiring any user interaction

  • objectRemoved: (object: BG.charts.Object, parent?: BG.charts.Object | null) => void

    Fired when an object was removed from the underlying chartset

  • objectRenamed: (object: BG.charts.Object) => void

    Fired when an object was renamed

  • objectReplaced: (object: BG.charts.Object, oldIdentifier: string) => void

    Fired when an object was replaced by or changed to another object; currently only triggered when replacing timeseries.

  • objectSelected: (object: BG.charts.Object | null) => void

    Fired when an object was selected or deselected; If an object was deselected, parameter will be null

  • push: (
        ts: BG.charts.TimeSeries,
        value: number,
        relativeChange: number,
        absoluteChange: number,
    ) => void

    Fired when a timeseries received new data

  • selectionMenu: (
        event: Event | null,
        point: Point,
        objects: BG.charts.Object[],
        cb: (object: BG.charts.Object) => void,
    ) => void

    Fired when a selection menu should be displayed. The ui should call the provided callback with the object selected by the user.

  • updatedIdentifier: (oldIdentifier: string, newIdentifier: string) => void

    fired when a loader replaces the given timeseries identifier with a different one, e.g. to honor user preferences.

    uis may need to update to show the new identifier