File tree 3 files changed +15
-1
lines changed
3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ var isDateTime = Lib.isDateTime;
10
10
var cleanNumber = Lib . cleanNumber ;
11
11
var round = Math . round ;
12
12
13
+ // Determines a type for an axis based on the contents of array.
13
14
module . exports = function autoType ( array , calendar , opts ) {
14
15
var a = array ;
15
16
Original file line number Diff line number Diff line change @@ -338,7 +338,14 @@ describe('Test axes', function() {
338
338
} ) ;
339
339
} ) ;
340
340
341
+ /* TODO: These tests don't actually test if the numeric strings are
342
+ * indeed converted or not... */
341
343
describe ( 'autotype disable/enable converting numeric strings' , function ( ) {
344
+ /* TODO: The test description doesn't totally reflect what it is
345
+ * testing: here the test is to determine that setting
346
+ * autotypenumbers: 'strict' on the yaxis forces yaxis.type to be
347
+ * 'category', that's it.
348
+ */
342
349
it ( 'should disable converting numeric strings using axis.autotypenumbers' , function ( ) {
343
350
layoutIn = {
344
351
xaxis : { } ,
@@ -381,7 +388,11 @@ describe('Test axes', function() {
381
388
expect ( layoutOut . yaxis . type ) . toBe ( 'category' ) ;
382
389
} ) ;
383
390
384
- it ( 'should autotype date having more dates with & without strict autotypenumbers' , function ( ) {
391
+ /* TODO: Should not the opposite also be tested? Namely that data
392
+ * having fewer dates gets forced to 'category' (that's consitent
393
+ * with the previous test).
394
+ */
395
+ it ( 'should autotype data having more dates with & without strict autotypenumbers' , function ( ) {
385
396
layoutIn = {
386
397
xaxis : { } ,
387
398
yaxis : { autotypenumbers : 'strict' }
Original file line number Diff line number Diff line change @@ -269,6 +269,8 @@ describe('Test plot api', function() {
269
269
. then ( done , done . fail ) ;
270
270
} ) ;
271
271
272
+ // TODO: Make this test work for the case where categories are numeric
273
+ // strings
272
274
it ( 'annotations, shapes and images linked to category axes should update properly on zoom/pan' , function ( done ) {
273
275
var jsLogo = 'https://images.plot.ly/language-icons/api-home/js-logo.png' ;
274
276
You can’t perform that action at this time.
0 commit comments