Skip to content

Commit

Permalink
Update lib
Browse files Browse the repository at this point in the history
  • Loading branch information
bcbcarl committed Jan 3, 2017
1 parent 51092e2 commit 56ae714
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions react-c3js.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ var _react2 = _interopRequireDefault(_react);

var _reactDom = require('react-dom');

var _c = require('c3');

var _c2 = _interopRequireDefault(_c);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
Expand All @@ -24,6 +20,8 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var c3 = void 0;

var C3Chart = function (_React$Component) {
_inherits(C3Chart, _React$Component);

Expand All @@ -36,6 +34,7 @@ var C3Chart = function (_React$Component) {
_createClass(C3Chart, [{
key: 'componentDidMount',
value: function componentDidMount() {
c3 = require('c3');
this.updateChart(this.props);
}
}, {
Expand All @@ -52,7 +51,7 @@ var C3Chart = function (_React$Component) {
key: 'generateChart',
value: function generateChart(mountNode, config) {
var newConfig = Object.assign({ bindto: mountNode }, config);
return _c2.default.generate(newConfig);
return c3.generate(newConfig);
}
}, {
key: 'loadNewData',
Expand Down

0 comments on commit 56ae714

Please sign in to comment.