File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,13 @@ module.exports = function setConvert(ax, fullLayout) {
92
92
* - defaults to ax.calendar
93
93
*/
94
94
function dt2ms ( v , _ , calendar , opts ) {
95
+ if ( ( opts || { } ) . msUTC && isNumeric ( v ) ) {
96
+ // For now it is only used
97
+ // to fix bar length in milliseconds & gl3d ticks
98
+ // It could be applied in other places in v2
99
+ return + v ;
100
+ }
101
+
95
102
// NOTE: Changed this behavior: previously we took any numeric value
96
103
// to be a ms, even if it was a string that could be a bare year.
97
104
// Now we convert it as a date if at all possible, and only try
@@ -100,13 +107,6 @@ module.exports = function setConvert(ax, fullLayout) {
100
107
if ( ms === BADNUM ) {
101
108
if ( isNumeric ( v ) ) {
102
109
v = + v ;
103
- if ( ( opts || { } ) . msUTC ) {
104
- // For now it is only used
105
- // to fix bar length in milliseconds.
106
- // It could be applied in other places in v2
107
- return v ;
108
- }
109
-
110
110
// keep track of tenths of ms, that `new Date` will drop
111
111
// same logic as in Lib.ms2DateTime
112
112
var msecTenths = Math . floor ( Lib . mod ( v + 0.05 , 1 ) * 10 ) ;
You can’t perform that action at this time.
0 commit comments