Class: DomPlatform

    new DomPlatform()

    Inherited from

    .constructor

    acquireContext

    acquireContext(canvas, options?): CanvasRenderingContext2D

    Called at chart construction time, returns a context2d instance implementing the W3C Canvas 2D Context API standard (opens new window).

    Parameters

    Returns

    CanvasRenderingContext2D

    Inherited from

    BasePlatform.

    Defined in


    addEventListener

    addEventListener(chart, type, listener): void

    Registers the specified listener on the given chart.

    Parameters

    NameTypeDescription
    chartChart<keyof , (number | ScatterDataPoint | )[], unknown>Chart from which to listen for event
    typestringThe (ChartEvent) type to listen for
    listener(e: ) => voidReceives a notification (an object that implements the ChartEvent interface) when an event of the specified type occurs.

    Returns

    void

    Inherited from

    .addEventListener

    Defined in

    index.esm.d.ts:2011 (opens new window)


    getDevicePixelRatio(): number

    Returns

    the current devicePixelRatio of the device this platform is connected to.

    Inherited from

    .getDevicePixelRatio

    Defined in

    index.esm.d.ts:2022DomPlatform - 图4 (opens new window)


    getMaximumSize

    getMaximumSize(canvas, width?, height?, aspectRatio?): Object

    Parameters

    Returns

    Object

    the maximum size available.

    NameType
    heightnumber
    widthnumber

    Inherited from

    .getMaximumSize

    Defined in

    index.esm.d.ts:2030 (opens new window)


    isAttached

    isAttached(canvas): boolean

    Parameters

    Returns

    true if the canvas is attached to the platform, false if not.

    Inherited from

    .isAttached

    Defined in

    index.esm.d.ts:2035DomPlatform - 图6 (opens new window)


    releaseContext(context): boolean

    Parameters

    NameTypeDescription
    contextCanvasRenderingContext2DThe context2d instance

    Returns

    boolean

    true if the method succeeded, else false

    Inherited from

    BasePlatform.

    Defined in


    removeEventListener

    removeEventListener(chart, type, listener): void

    Removes the specified listener previously registered with addEventListener.

    Parameters

    Returns

    void

    Inherited from

    BasePlatform.

    Defined in


    updateConfig

    updateConfig(config): void

    Updates config with platform specific requirements

    Parameters

    NameType
    configChartConfiguration<keyof , (number | ScatterDataPoint | )[], >

    Returns

    void

    Inherited from

    BasePlatform.

    Defined in