Skip to content

Commit

Permalink
Merge pull request #14 from smanousopoulos/master
Browse files Browse the repository at this point in the history
added babelified src, implemented renderAsImage & fixes
  • Loading branch information
drmalex07 authored May 26, 2017
2 parents 0ef0062 + c926dcc commit e2d0589
Show file tree
Hide file tree
Showing 10 changed files with 1,695 additions and 6 deletions.
19 changes: 19 additions & 0 deletions lib/js/components/bar-chart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

// A convenience wrapper for bar-only charts

var React = require('react');

var Chart = require('./cartesian-chart.js');

var BarChart = function BarChart(props) {
return React.createElement(Chart, _extends({}, props, {
series: props.series.map(function (s) {
return _extends({}, s, { type: 'bar' });
})
}));
};

module.exports = BarChart;
Loading

0 comments on commit e2d0589

Please sign in to comment.