Browse Source

Add polyfill for phantomjs compatibility - #578 #838

pull/851/head
Masayuki Tanaka 10 years ago
parent
commit
20ce58070d
  1. 1
      Gruntfile.coffee
  2. 8
      c3.js
  3. 2
      c3.min.js

1
Gruntfile.coffee

@ -69,6 +69,7 @@ module.exports = (grunt) ->
'src/api.chart.js',
'src/api.tooltip.js',
'src/c3.axis.js',
'src/polyfill.js',
'src/tail.js'
]
dest: 'c3.js'

8
c3.js

@ -6790,6 +6790,14 @@
return axis;
}
// fix problems using c3 with phantomjs #578
Function.prototype.bind = Function.prototype.bind || function (thisp) {
var fn = this;
return function () {
return fn.apply(thisp, arguments);
};
};
if (typeof define === 'function' && define.amd) {
define("c3", ["d3"], c3);
} else if ('undefined' !== typeof exports && 'undefined' !== typeof module) {

2
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save