File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -406,20 +406,6 @@ function ticksFromTimestamps(values, majorUnit) {
406406 return ticks ;
407407}
408408
409- /**
410- * Return the time format for the label with the most parts (milliseconds, second, etc.)
411- */
412- function determineLabelFormat ( timestamp ) {
413- var presets = adapter . presets ( ) ;
414- if ( timestamp % INTERVALS . second . size !== 0 ) {
415- return presets . full ;
416- }
417- if ( adapter . startOf ( timestamp , 'day' ) !== timestamp ) {
418- return presets . time ;
419- }
420- return presets . date ;
421- }
422-
423409var defaultConfig = {
424410 position : 'bottom' ,
425411
@@ -643,7 +629,6 @@ module.exports = Scale.extend({
643629 var timeOpts = me . options . time ;
644630 var label = data . labels && index < data . labels . length ? data . labels [ index ] : '' ;
645631 var value = data . datasets [ datasetIndex ] . data [ index ] ;
646- var ts ;
647632
648633 if ( helpers . isObject ( value ) ) {
649634 label = me . getRightValue ( value ) ;
@@ -654,9 +639,7 @@ module.exports = Scale.extend({
654639 if ( typeof label === 'string' ) {
655640 return label ;
656641 }
657-
658- ts = toTimestamp ( label , timeOpts ) ;
659- return adapter . format ( ts , determineLabelFormat ( ts ) ) ;
642+ return adapter . format ( toTimestamp ( label , timeOpts ) , timeOpts . displayFormats [ me . _unit ] ) ;
660643 } ,
661644
662645 /**
You can’t perform that action at this time.
0 commit comments