MCPcopy Create free account
hub / github.com/chartjs/Chart.js / BasicPlatform

Class BasicPlatform

src/platform/platform.basic.js:13–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11 * @extends BasePlatform
12 */
13export default class BasicPlatform extends BasePlatform {
14 acquireContext(item) {
15 // To prevent canvas fingerprinting, some add-ons undefine the getContext
16 // method, for example: https://github.com/kkapsner/CanvasBlocker
17 // https://github.com/chartjs/Chart.js/issues/2807
18 return item && item.getContext && item.getContext('2d') || null;
19 }
20 updateConfig(config) {
21 config.options.animation = false;
22 }
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected