the main namespace of all javascript stock3 AG javascript libraries.

includes the chartbreaker library in BG.charts as well as dependencies like BG.events.EventEmitter, BG.locale, and BG.clazz the main namespace of the ChartBreaker library

includes all classes of ChartBreaker distributed over several sub namespaces some global events are available directly on the namespace object itself

Hierarchy (view full)

Constructors

Properties

#private: any
ActivityIndicator: typeof ActivityIndicator
Bounds: typeof Bounds
Chart: typeof Chart & {
    EScale: typeof EScale;
}

Type declaration

ChartSet: typeof ChartSet & {
    EFormatter: typeof EFormatter;
}

Type declaration

Color: typeof Color
Controller: typeof Controller & {
    EChangeFlags: typeof EChangeFlags;
    EObjectQuery: typeof EObjectQuery;
    EPeekFlags: typeof EPeekFlags;
    EQuery: EQuery;
    EQueryFlags: typeof EQueryFlags;
}

Type declaration

Data: typeof Data
EDimension: typeof EDimension
ELineType: typeof ELineType
ESpans: typeof ESpans
EdgeInsets: typeof EdgeInsets
Error: typeof Error
Expression: typeof BG.charts.Expression
IDataLoader: typeof IDataLoader
Indicator: typeof Indicator
Layer: {
    ELayerFlags: typeof ELayerFlags;
}

Type declaration

LegendEntry: typeof LegendEntry & {
    EButton: typeof EButton;
    EIcon: typeof EIcon;
}

Type declaration

Object: typeof Object & {
    EFlags: typeof BG.charts.Object.EFlags;
    EOptionFlags: typeof EOptionFlags;
    State: typeof State & {
        EFlags: typeof BG.charts.Object.State.EFlags;
    };
}

Type declaration

ObjectStyle: typeof ObjectStyle
Point: typeof Point
Profiler: typeof Profiler
RecoverableError: typeof RecoverableError
Scale: typeof Scale
Span: typeof Span
Sparkline: typeof Sparkline
Style: typeof Style
Timestamp: typeof Timestamp & {
    EType: typeof EType;
}

Type declaration

Tool: typeof Tool
ToolGenerator: typeof ToolGenerator
gfx: typeof gfx
layers: {
    Band: typeof Band;
    Boxes: typeof Boxes;
    Candle: typeof Candle;
    Circles: typeof Circles;
    DirectionalLine: typeof DirectionalLine;
    Histogram: typeof Histogram;
    Kagi: typeof Kagi;
    Line: typeof Line;
    MCandle: typeof MCandle;
    Mountain: typeof Mountain;
    OHLC: typeof OHLC;
    PointAndFigure: typeof PointAndFigure;
    Ranges: typeof Ranges;
    ThresholdIntersection: typeof ThresholdIntersection;
    ThresholdLine: typeof ThresholdLine;
    Volume: typeof Volume;
}

Type declaration

loaders: {
    Expression: typeof BG.charts.loaders.Expression;
}

Type declaration

math: typeof math
options: {
    activeWatermark: null | string;
    dataCacheTTL: number;
    defaultStyle: string;
    defaultStyleOverwrites: null | {
        selector: string;
        values: {
            [key: string]: any;
        };
    }[];
    env: string;
    fixedOrderObjectTypes: string[];
    fixedParentObjectTypes: string[];
    fixedScaleObjectTypes: string[];
    maxTickGapDuration: number;
    mergerTimeout: number;
    os: string;
    valueBasedTypes: string[];
}

Type declaration

  • activeWatermark: null | string
  • dataCacheTTL: number
  • defaultStyle: string
  • defaultStyleOverwrites: null | {
        selector: string;
        values: {
            [key: string]: any;
        };
    }[]
  • env: string
  • fixedOrderObjectTypes: string[]
  • fixedParentObjectTypes: string[]
  • fixedScaleObjectTypes: string[]
  • maxTickGapDuration: number
  • mergerTimeout: number
  • os: string
  • valueBasedTypes: string[]
setClazz: ((o) => boolean)

Type declaration

    • (o): boolean
    • register a clazz with ChartBreaker

      returns false if a clazz with the specified type is already registered, or if an invalid descriptor is provided

      previous registration can NOT be updated

      Parameters

      Returns boolean

setLanguageData: ((lang, data) => void)

Type declaration

    • (lang, data): void
    • provide translations for a specific language to ChartBreaker

      Parameters

      • lang: string

        the language code as used in a locale (e.g. 'de' or 'en')

      • data: {
            [key: string]: any;
        }

        an object containing translations in the format expected by BG.locale.Translator

        • [key: string]: any

      Returns void

unsetClazz: ((clazz) => boolean)

Type declaration

    • (clazz): boolean
    • unregister a clazz from ChartBreaker clazz needs to have been previously registered via BG.charts.setClazz

      Parameters

      • clazz: Clazz

        reference to the registered clazz

      Returns boolean

utils: typeof utils

Methods

  • Type Parameters

    • Type extends keyof NamespaceEvents
    • Callback extends ((sparkline) => void) | ((sparkline) => void) | ((descriptor) => void) | ((descriptor) => void) | ((controller) => void) | ((controller) => void)

    Parameters

    Returns this

    Description

    adds a listener to the end of the listeners array for the specified event.

  • Type Parameters

    • Type extends keyof NamespaceEvents
    • Callback extends ((sparkline) => void) | ((sparkline) => void) | ((descriptor) => void) | ((descriptor) => void) | ((controller) => void) | ((controller) => void)

    Parameters

    Returns boolean

    Description

    execute each of the listeners in order with the supplied parameters.

  • Type Parameters

    • Type extends keyof NamespaceEvents
    • Callback extends ((sparkline) => void) | ((sparkline) => void) | ((descriptor) => void) | ((descriptor) => void) | ((controller) => void) | ((controller) => void)

    Parameters

    Returns Callback[]

    Description

    returns an array of listeners for the specified event.

  • Type Parameters

    • Type extends keyof NamespaceEvents
    • Callback extends ((sparkline) => void) | ((sparkline) => void) | ((descriptor) => void) | ((descriptor) => void) | ((controller) => void) | ((controller) => void)

    Parameters

    Returns this

    Description

    alias for addListener

  • Type Parameters

    • Type extends keyof NamespaceEvents
    • Callback extends ((sparkline) => void) | ((sparkline) => void) | ((descriptor) => void) | ((descriptor) => void) | ((controller) => void) | ((controller) => void)

    Parameters

    Returns this

    Description

    adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.

  • Type Parameters

    • Type extends keyof NamespaceEvents
    • Callback extends ((sparkline) => void) | ((sparkline) => void) | ((descriptor) => void) | ((descriptor) => void) | ((controller) => void) | ((controller) => void)

    Parameters

    Returns this

    Description

    remove a listener from the listener array for the specified event.

  • Parameters

    • maxListeners: number

    Returns this

    Description

    by default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function allows that limit to be increased. Set to zero for unlimited.

  • Parameters

    • cb: Function

    Returns void

    Description

    set custom error handler for event listeners

  • Parameters

    • maxListeners: number

    Returns void

    Description

    set default amount for limit warning