Skip to content

Commit 752b572

Browse files
committed
Move scale descriptors to core.scale
1 parent f096c8e commit 752b572

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/core/core.defaults.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,5 @@ export default new Defaults({
167167
interaction: {
168168
_scriptable: false,
169169
_indexable: false,
170-
},
171-
scales: {
172-
_defaultId: (ctx, options) => options.axis === options.indexAxis ? '_index_' : '_value_',
173-
_fallback: 'scale',
174-
_scriptable: (name) => !name.startsWith('before') && !name.startsWith('after'),
175-
ticks: {
176-
_scriptable: (name) => name !== 'callback'
177-
},
178-
gridLines: {
179-
_indexable: (name) => name !== 'borderDash' && name !== 'tickBorderDash'
180-
}
181170
}
182171
});

src/core/core.scale.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,18 @@ defaults.route('scale.ticks', 'color', '', 'color');
7979
defaults.route('scale.gridLines', 'color', '', 'borderColor');
8080
defaults.route('scale.scaleLabel', 'color', '', 'color');
8181

82+
defaults.describe('scales', {
83+
_defaultId: (ctx, options) => options.axis === options.indexAxis ? '_index_' : '_value_',
84+
_fallback: 'scale',
85+
_scriptable: (name) => !name.startsWith('before') && !name.startsWith('after'),
86+
ticks: {
87+
_scriptable: (name) => name !== 'callback'
88+
},
89+
gridLines: {
90+
_indexable: (name) => name !== 'borderDash' && name !== 'tickBorderDash'
91+
}
92+
});
93+
8294
/**
8395
* Returns a new array containing numItems from arr
8496
* @param {any[]} arr

0 commit comments

Comments
 (0)