1 | 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; };
|
2 |
|
3 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
4 |
|
5 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
6 |
|
7 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
8 |
|
9 | 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; }
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | import React from 'react';
|
32 |
|
33 | import AbstractSeries from './abstract-series';
|
34 | import BarSeries from './bar-series';
|
35 |
|
36 | var VerticalBarSeries = function (_AbstractSeries) {
|
37 | _inherits(VerticalBarSeries, _AbstractSeries);
|
38 |
|
39 | function VerticalBarSeries() {
|
40 | _classCallCheck(this, VerticalBarSeries);
|
41 |
|
42 | return _possibleConstructorReturn(this, (VerticalBarSeries.__proto__ || Object.getPrototypeOf(VerticalBarSeries)).apply(this, arguments));
|
43 | }
|
44 |
|
45 | _createClass(VerticalBarSeries, [{
|
46 | key: 'render',
|
47 | value: function render() {
|
48 | return React.createElement(BarSeries, _extends({}, this.props, {
|
49 | linePosAttr: 'x',
|
50 | valuePosAttr: 'y',
|
51 | lineSizeAttr: 'width',
|
52 | valueSizeAttr: 'height'
|
53 | }));
|
54 | }
|
55 | }], [{
|
56 | key: 'getParentConfig',
|
57 | value: function getParentConfig(attr) {
|
58 | var isDomainAdjustmentNeeded = attr === 'x';
|
59 | var zeroBaseValue = attr === 'y';
|
60 | return {
|
61 | isDomainAdjustmentNeeded: isDomainAdjustmentNeeded,
|
62 | zeroBaseValue: zeroBaseValue
|
63 | };
|
64 | }
|
65 | }]);
|
66 |
|
67 | return VerticalBarSeries;
|
68 | }(AbstractSeries);
|
69 |
|
70 | VerticalBarSeries.displayName = 'VerticalBarSeries';
|
71 |
|
72 | export default VerticalBarSeries; |
\ | No newline at end of file |