Class: BasicPlatform
+ new BasicPlatform(): BasicPlatform
Returns:
Inherited from: BasePlatform
acquireContext
▸ acquireContext(: HTMLCanvasElement, options?
: CanvasRenderingContext2DSettings): 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(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | | BubbleDataPoint)[], unknown>, type
: string, listener
: (e
: ) => void): void
Registers the specified listener on the given chart.
Parameters:
Name | Type | Description |
---|---|---|
chart | <bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | ScatterDataPoint | )[], unknown> | Chart from which to listen for event |
type | string | The (ChartEvent) type to listen for |
listener | (: ) => void | Receives a notification (an object that implements the ChartEvent interface) when an event of the specified type occurs. |
Returns: void
Defined in:
getDevicePixelRatio
▸ getDevicePixelRatio(): number
Returns: number
the current devicePixelRatio of the device this platform is connected to.
Inherited from:
Defined in: index.esm.d.ts:1937 (opens new window)
▸ getMaximumSize(canvas
: HTMLCanvasElement, width?
: number, height?
: number, aspectRatio?
: number): object
Parameters:
Returns: object
Name | Type |
---|---|
height | number |
width | number |
the maximum size available.
Inherited from: BasePlatform
Defined in:
isAttached
▸ isAttached(: HTMLCanvasElement): boolean
Parameters:
true if the canvas is attached to the platform, false if not.
Inherited from: BasePlatform
Defined in:
▸ releaseContext(context
: CanvasRenderingContext2D): boolean
Called at chart destruction time, releases any resources associated to the context previously returned by the acquireContext() method.
Parameters:
Name | Type | Description |
---|---|---|
context | CanvasRenderingContext2D | The context2d instance |
Returns: boolean
true if the method succeeded, else false
Inherited from:
Defined in: index.esm.d.ts:1918 (opens new window)
removeEventListener
▸ removeEventListener(chart
: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | | BubbleDataPoint)[], unknown>, type
: string, listener
: (e
: ) => void): void
Removes the specified listener previously registered with addEventListener.
Parameters:
Returns: void
Defined in: