Skip to content

Commit 1275935

Browse files
committed
rename 'to date' stepmode 'todate'
1 parent 6a68155 commit 1275935

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/components/rangeselector/button_attributes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ module.exports = {
2222
stepmode: {
2323
valType: 'enumerated',
2424
role: 'info',
25-
values: ['backward', 'to date'],
25+
values: ['backward', 'todate'],
2626
dflt: 'backward',
2727
description: [
2828
'Sets the range update mode.',
2929
'If *backward*, the range update shifts the start of range',
3030
'back *count* times *step* milliseconds.',
31-
'If *to date*, the range update shifts the start of range',
31+
'If *todate*, the range update shifts the start of range',
3232
'back to the first timestamp from *count* times',
3333
'*step* milliseconds back.',
3434
'For example, with `step` set to *year* and `count` set to *1*',

src/components/rangeselector/get_update_object.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function getXRange(axisLayout, buttonLayout) {
4343
range0 = d3.time[step].offset(base, -count).getTime();
4444
break;
4545

46-
case 'to date':
46+
case 'todate':
4747
var base2 = d3.time[step].offset(base, -(count - 1));
4848

4949
range0 = d3.time[step].floor(base2).getTime();

test/jasmine/tests/range_selector_test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ describe('[range selector suite]', function() {
208208
it('should return update object (5 months to-date case)', function() {
209209
var buttonLayout = {
210210
step: 'month',
211-
stepmode: 'to date',
211+
stepmode: 'todate',
212212
count: 5
213213
};
214214

@@ -220,7 +220,7 @@ describe('[range selector suite]', function() {
220220
it('should return update object (1 year to-date case)', function() {
221221
var buttonLayout = {
222222
step: 'year',
223-
stepmode: 'to date',
223+
stepmode: 'todate',
224224
count: 1
225225
};
226226

@@ -232,7 +232,7 @@ describe('[range selector suite]', function() {
232232
it('should return update object (10 year to-date case)', function() {
233233
var buttonLayout = {
234234
step: 'year',
235-
stepmode: 'to date',
235+
stepmode: 'todate',
236236
count: 10
237237
};
238238

@@ -314,7 +314,7 @@ describe('[range selector suite]', function() {
314314
it('should return update object (12 hour to-date case)', function() {
315315
var buttonLayout = {
316316
step: 'hour',
317-
stepmode: 'to date',
317+
stepmode: 'todate',
318318
count: 12
319319
};
320320

@@ -328,7 +328,7 @@ describe('[range selector suite]', function() {
328328
it('should return update object (15 minute backward case)', function() {
329329
var buttonLayout = {
330330
step: 'minute',
331-
stepmode: 'to date',
331+
stepmode: 'todate',
332332
count: 20
333333
};
334334

@@ -342,7 +342,7 @@ describe('[range selector suite]', function() {
342342
it('should return update object (2 second to-date case)', function() {
343343
var buttonLayout = {
344344
step: 'second',
345-
stepmode: 'to date',
345+
stepmode: 'todate',
346346
count: 2
347347
};
348348

0 commit comments

Comments
 (0)