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

Method getLineWidthForValue

src/core/core.scale.js:1453–1465  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1451 }
1452
1453 getLineWidthForValue(value) {
1454 const grid = this.options.grid;
1455 if (!this._isVisible() || !grid.display) {
1456 return 0;
1457 }
1458 const ticks = this.ticks;
1459 const index = ticks.findIndex(t => t.value === value);
1460 if (index >= 0) {
1461 const opts = grid.setContext(this.getContext(index));
1462 return opts.lineWidth;
1463 }
1464 return 0;
1465 }
1466
1467 /**
1468 * @protected

Callers

nothing calls this directly

Calls 3

_isVisibleMethod · 0.95
getContextMethod · 0.95
setContextMethod · 0.80

Tested by

no test coverage detected