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

Method drawBackground

src/core/core.scale.js:1446–1454  ·  view source on GitHub ↗

* @protected

()

Source from the content-addressed store, hash-verified

1444 * @protected
1445 */
1446 drawBackground() {
1447 const {ctx, options: {backgroundColor}, left, top, width, height} = this;
1448 if (backgroundColor) {
1449 ctx.save();
1450 ctx.fillStyle = backgroundColor;
1451 ctx.fillRect(left, top, width, height);
1452 ctx.restore();
1453 }
1454 }
1455
1456 getLineWidthForValue(value) {
1457 const grid = this.options.grid;

Callers 2

drawMethod · 0.95
_layersMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected