MCPcopy
hub / github.com/chartjs/Chart.js / getAxisFromDefaultScaleID

Function getAxisFromDefaultScaleID

src/core/core.config.js:11–19  ·  view source on GitHub ↗
(id, indexAxis)

Source from the content-addressed store, hash-verified

9}
10
11function getAxisFromDefaultScaleID(id, indexAxis) {
12 let axis = id;
13 if (id === '_index_') {
14 axis = indexAxis;
15 } else if (id === '_value_') {
16 axis = indexAxis === 'x' ? 'y' : 'x';
17 }
18 return axis;
19}
20
21function getDefaultScaleIDFromAxis(axis, indexAxis) {
22 return axis === indexAxis ? '_index_' : '_value_';

Callers 1

mergeScaleConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected