Browse Source

Use parseFloat instead of Number.parseFloat

Internet Explorer does not support the ES6 Number.parseFloat (see http://caniuse.com/#feat=es6-number). Instead, substitute the regular parseFloat method.
codeClimate
Tom Joseph 8 years ago
parent
commit
bc90ffecc8
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lib/timeline/component/DataAxis.js

+ 2
- 2
lib/timeline/component/DataAxis.js View File

@ -29,12 +29,12 @@ function DataAxis (body, options, svg, linegraphOptions) {
alignZeros: true,
left:{
range: {min:undefined,max:undefined},
format: function (value) {return ''+Number.parseFloat(value.toPrecision(3));},
format: function (value) {return ''+parseFloat(value.toPrecision(3));},
title: {text:undefined,style:undefined}
},
right:{
range: {min:undefined,max:undefined},
format: function (value) {return ''+Number.parseFloat(value.toPrecision(3));},
format: function (value) {return ''+parseFloat(value.toPrecision(3));},
title: {text:undefined,style:undefined}
}
};

Loading…
Cancel
Save