@semcore/mini-chart 0.29.1 → 16.0.0-prerelease.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/cjs/component/score/Donut.js +14 -16
- package/lib/cjs/component/score/Donut.js.map +1 -1
- package/lib/cjs/component/score/Line.js +21 -23
- package/lib/cjs/component/score/Line.js.map +1 -1
- package/lib/cjs/component/score/Line.types.js.map +1 -1
- package/lib/cjs/component/trend/Bar.js +12 -14
- package/lib/cjs/component/trend/Bar.js.map +1 -1
- package/lib/cjs/component/trend/Line.js +13 -15
- package/lib/cjs/component/trend/Line.js.map +1 -1
- package/lib/es6/component/score/Donut.js +13 -13
- package/lib/es6/component/score/Donut.js.map +1 -1
- package/lib/es6/component/score/Line.js +21 -21
- package/lib/es6/component/score/Line.js.map +1 -1
- package/lib/es6/component/score/Line.types.js.map +1 -1
- package/lib/es6/component/trend/Bar.js +11 -11
- package/lib/es6/component/trend/Bar.js.map +1 -1
- package/lib/es6/component/trend/Line.js +12 -12
- package/lib/es6/component/trend/Line.js.map +1 -1
- package/lib/esm/component/score/Donut.mjs +101 -85
- package/lib/esm/component/score/Line.mjs +102 -83
- package/lib/esm/component/trend/Bar.mjs +82 -70
- package/lib/esm/component/trend/Line.mjs +116 -101
- package/lib/esm/component/trend/Trend.mjs +47 -35
- package/lib/esm/index.mjs +13 -13
- package/lib/types/component/score/Donut.d.ts +1 -1
- package/lib/types/component/score/Line.types.d.ts +2 -2
- package/lib/types/component/trend/Bar.d.ts +1 -1
- package/lib/types/component/trend/Line.d.ts +1 -1
- package/package.json +3 -8
|
@@ -1,104 +1,123 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { sstyled
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
var J = (
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
+
import { sstyled, createComponent, assignProps, Component } from "@semcore/core";
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { Box, Flex } from "@semcore/flex-box";
|
|
10
|
+
import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
|
|
11
|
+
var style = (
|
|
13
12
|
/*__reshadow_css_start__*/
|
|
14
|
-
(
|
|
13
|
+
(sstyled.insert(
|
|
15
14
|
/*__inner_css_start__*/
|
|
16
|
-
"@keyframes
|
|
17
|
-
"
|
|
15
|
+
"@keyframes pulse_2vm7d{0%,to{opacity:1}50%{opacity:.4}}@keyframes move-line_2vm7d{0%{transform:translateX(0)}to{transform:translateX(100%)}}.___SDonutContainer_2vm7d_gg_.__loading_2vm7d_gg_,.___SLineGauge_2vm7d_gg_.__loading_2vm7d_gg_,.___STrendBar_2vm7d_gg_.__loading_2vm7d_gg_,.___STrendLine_2vm7d_gg_.__loading_2vm7d_gg_{animation-name:pulse_2vm7d;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}.___SLineGauge_2vm7d_gg_{height:8px;background-color:var(--base-bg-color_2vm7d, var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9));border-radius:var(--intergalactic-chart-rounded, 2px);overflow:hidden;position:relative}.___SLineValue_2vm7d_gg_{height:8px;border-radius:var(--intergalactic-chart-rounded, 2px)0 0 var(--intergalactic-chart-rounded, 2px)}.___SLineValue_2vm7d_gg_.__percent_2vm7d_gg_{width:var(--percent_2vm7d)}.___SLineSegmentItem_2vm7d_gg_.__color_2vm7d_gg_,.___SLineValue_2vm7d_gg_.__color_2vm7d_gg_{background-color:var(--color_2vm7d, var(--intergalactic-chart-palette-order-1, #2bb3ff))}.___SLineGauge_2vm7d_gg_.__segments_2vm7d_gg_{border-radius:var(--intergalactic-progress-bar-rounded, 6px)}.___SAnimationLine_2vm7d_gg_,.___SLineGaugeSegment_2vm7d_gg_{position:absolute;top:0;left:0;right:0;bottom:0}.___SLineSegmentItem_2vm7d_gg_:last-child{margin-right:0;border-right:none}.___SLineSegmentItem_2vm7d_gg_{height:8px;background:0 0;border-right-color:var(--intergalactic-chart-grid-border, #ffffff);border-right-style:solid;border-right-width:1px;box-sizing:content-box}.___SAnimationLine_2vm7d_gg_{background-color:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9);transition:all var(--intergalactic-duration-extra-slow, 500) ease-in-out;animation-name:move-line_2vm7d;animation-duration:.5s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}",
|
|
16
|
+
"2vm7d_gg_"
|
|
18
17
|
), {
|
|
19
|
-
__SLineGauge: "
|
|
20
|
-
_loading: "
|
|
21
|
-
__SDonutContainer: "
|
|
22
|
-
__STrendLine: "
|
|
23
|
-
__STrendBar: "
|
|
24
|
-
"@pulse": "
|
|
25
|
-
"--base-bg-color": "--base-bg-
|
|
26
|
-
__SLineValue: "
|
|
27
|
-
_percent: "
|
|
28
|
-
"--percent": "--
|
|
29
|
-
_color: "
|
|
30
|
-
__SLineSegmentItem: "
|
|
31
|
-
"--color": "--
|
|
32
|
-
_segments: "
|
|
33
|
-
__SLineGaugeSegment: "
|
|
34
|
-
__SAnimationLine: "
|
|
35
|
-
"@move-line": "move-
|
|
18
|
+
"__SLineGauge": "___SLineGauge_2vm7d_gg_",
|
|
19
|
+
"_loading": "__loading_2vm7d_gg_",
|
|
20
|
+
"__SDonutContainer": "___SDonutContainer_2vm7d_gg_",
|
|
21
|
+
"__STrendLine": "___STrendLine_2vm7d_gg_",
|
|
22
|
+
"__STrendBar": "___STrendBar_2vm7d_gg_",
|
|
23
|
+
"@pulse": "pulse_2vm7d",
|
|
24
|
+
"--base-bg-color": "--base-bg-color_2vm7d",
|
|
25
|
+
"__SLineValue": "___SLineValue_2vm7d_gg_",
|
|
26
|
+
"_percent": "__percent_2vm7d_gg_",
|
|
27
|
+
"--percent": "--percent_2vm7d",
|
|
28
|
+
"_color": "__color_2vm7d_gg_",
|
|
29
|
+
"__SLineSegmentItem": "___SLineSegmentItem_2vm7d_gg_",
|
|
30
|
+
"--color": "--color_2vm7d",
|
|
31
|
+
"_segments": "__segments_2vm7d_gg_",
|
|
32
|
+
"__SLineGaugeSegment": "___SLineGaugeSegment_2vm7d_gg_",
|
|
33
|
+
"__SAnimationLine": "___SAnimationLine_2vm7d_gg_",
|
|
34
|
+
"@move-line": "move-line_2vm7d"
|
|
36
35
|
})
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
);
|
|
37
|
+
var LineRoot = /* @__PURE__ */ function(_Component) {
|
|
38
|
+
_inherits(LineRoot2, _Component);
|
|
39
|
+
var _super = _createSuper(LineRoot2);
|
|
40
|
+
function LineRoot2() {
|
|
41
|
+
_classCallCheck(this, LineRoot2);
|
|
42
|
+
return _super.apply(this, arguments);
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
_createClass(LineRoot2, [{
|
|
44
45
|
key: "getSegmentProps",
|
|
45
|
-
value: function(
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
value: function getSegmentProps(segmentProps) {
|
|
47
|
+
var _this$asProps = this.asProps, children = _this$asProps.children, resolveColor = _this$asProps.resolveColor;
|
|
48
|
+
var sum = 0;
|
|
49
|
+
React.Children.forEach(children, function(child) {
|
|
50
|
+
if (/* @__PURE__ */ React.isValidElement(child)) {
|
|
51
|
+
sum = sum + child.props.value;
|
|
52
|
+
}
|
|
49
53
|
});
|
|
50
|
-
var
|
|
54
|
+
var width = sum > 0 ? 100 * segmentProps.value / sum : 0;
|
|
51
55
|
return {
|
|
52
|
-
w: "".concat(
|
|
53
|
-
"use:color":
|
|
56
|
+
w: "".concat(width, "%"),
|
|
57
|
+
"use:color": resolveColor(segmentProps.color)
|
|
54
58
|
};
|
|
55
59
|
}
|
|
56
60
|
}, {
|
|
57
61
|
key: "render",
|
|
58
|
-
value: function() {
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
value: function render() {
|
|
63
|
+
var _ref = this.asProps, _ref5;
|
|
64
|
+
var SLineGauge = Box;
|
|
65
|
+
var SLineValue = Box;
|
|
66
|
+
var SAnimationLine = Box;
|
|
67
|
+
var SLineGaugeSegment = Flex;
|
|
68
|
+
var SLineSegmentItem = Box;
|
|
69
|
+
var _this$asProps2 = this.asProps, value = _this$asProps2.value, styles = _this$asProps2.styles, _this$asProps2$color = _this$asProps2.color, color = _this$asProps2$color === void 0 ? "chart-palette-order-1" : _this$asProps2$color, baseBgColor = _this$asProps2.baseBgColor, resolveColor = _this$asProps2.resolveColor, loading = _this$asProps2.loading, children = _this$asProps2.children, Children = _this$asProps2.Children, animate = _this$asProps2.animate;
|
|
70
|
+
if (children !== void 0) {
|
|
71
|
+
var _ref3;
|
|
72
|
+
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SLineGauge, _ref3.cn("SLineGauge", _objectSpread({}, assignProps({
|
|
73
|
+
"segments": true,
|
|
74
|
+
"base-bg-color": resolveColor(baseBgColor)
|
|
75
|
+
}, _ref))), /* @__PURE__ */ React.createElement(SLineGaugeSegment, _ref3.cn("SLineGaugeSegment", {}), /* @__PURE__ */ React.createElement(Children, _ref3.cn("Children", {}))), animate && /* @__PURE__ */ React.createElement(SAnimationLine, _ref3.cn("SAnimationLine", {})));
|
|
66
76
|
}
|
|
67
|
-
var
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
var segments = this.asProps.segments;
|
|
78
|
+
var SegmentItems = [];
|
|
79
|
+
if (segments) {
|
|
80
|
+
for (var i = 0; i < segments; i++) {
|
|
81
|
+
var _ref4;
|
|
82
|
+
var width = "calc((100% - ".concat(segments - 1, "px) / ").concat(segments, ")");
|
|
83
|
+
SegmentItems.push((_ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SLineSegmentItem, _ref4.cn("SLineSegmentItem", {
|
|
84
|
+
"key": i,
|
|
85
|
+
"color": i < value ? resolveColor(color) : void 0,
|
|
86
|
+
"w": width
|
|
75
87
|
}))));
|
|
76
88
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
}
|
|
90
|
+
var percent = "".concat(value, "%");
|
|
91
|
+
if (segments) {
|
|
92
|
+
percent = "".concat(value / segments * 100, "%");
|
|
93
|
+
}
|
|
94
|
+
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SLineGauge, _ref5.cn("SLineGauge", _objectSpread({}, assignProps({
|
|
95
|
+
"base-bg-color": resolveColor(baseBgColor)
|
|
96
|
+
}, _ref))), !loading && /* @__PURE__ */ React.createElement(SLineValue, _ref5.cn("SLineValue", {
|
|
97
|
+
"w": percent,
|
|
98
|
+
"color": resolveColor(color)
|
|
99
|
+
})), Boolean(SegmentItems.length) && /* @__PURE__ */ React.createElement(SLineGaugeSegment, _ref5.cn("SLineGaugeSegment", {}), SegmentItems), animate && /* @__PURE__ */ React.createElement(SAnimationLine, _ref5.cn("SAnimationLine", {})));
|
|
84
100
|
}
|
|
85
|
-
}])
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
101
|
+
}]);
|
|
102
|
+
return LineRoot2;
|
|
103
|
+
}(Component);
|
|
104
|
+
_defineProperty(LineRoot, "enhance", [resolveColorEnhance()]);
|
|
105
|
+
_defineProperty(LineRoot, "displayName", "ScoreLine");
|
|
106
|
+
_defineProperty(LineRoot, "style", style);
|
|
107
|
+
_defineProperty(LineRoot, "defaultProps", {
|
|
108
|
+
animate: true
|
|
92
109
|
});
|
|
93
|
-
function
|
|
94
|
-
var
|
|
95
|
-
|
|
110
|
+
function Segment(props) {
|
|
111
|
+
var _ref2 = arguments[0], _ref6;
|
|
112
|
+
var styles = props.styles;
|
|
113
|
+
var SLineSegmentItem = Box;
|
|
114
|
+
return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SLineSegmentItem, _ref6.cn("SLineSegmentItem", _objectSpread({}, assignProps({}, _ref2))));
|
|
96
115
|
}
|
|
97
|
-
|
|
98
|
-
var
|
|
99
|
-
Segment
|
|
116
|
+
Segment.displayName = "Segment";
|
|
117
|
+
var ScoreLine = createComponent(LineRoot, {
|
|
118
|
+
Segment
|
|
100
119
|
});
|
|
101
|
-
|
|
120
|
+
ScoreLine.displayName = "MiniChart.ScoreLine";
|
|
102
121
|
export {
|
|
103
|
-
|
|
122
|
+
ScoreLine
|
|
104
123
|
};
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { sstyled
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
var j = (
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
+
import { sstyled, createComponent, assignProps } from "@semcore/core";
|
|
9
|
+
import React from "react";
|
|
10
|
+
import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
|
|
11
|
+
import { Trend } from "./Trend.mjs";
|
|
12
|
+
import { Box } from "@semcore/flex-box";
|
|
13
|
+
import { extractAriaProps } from "@semcore/core/lib/utils/ariaProps";
|
|
14
|
+
var style = (
|
|
16
15
|
/*__reshadow_css_start__*/
|
|
17
|
-
(
|
|
16
|
+
(sstyled.insert(
|
|
18
17
|
/*__inner_css_start__*/
|
|
19
|
-
"@keyframes
|
|
20
|
-
"
|
|
18
|
+
"@keyframes pulse_7jer1{0%,to{opacity:1}50%{opacity:.4}}.___SDonutContainer_7jer1_gg_.__loading_7jer1_gg_,.___SLineGauge_7jer1_gg_.__loading_7jer1_gg_,.___STrendBar_7jer1_gg_.__loading_7jer1_gg_,.___STrendLine_7jer1_gg_.__loading_7jer1_gg_{animation-name:pulse_7jer1;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:1.6s;will-change:opacity}",
|
|
19
|
+
"7jer1_gg_"
|
|
21
20
|
), {
|
|
22
|
-
__SLineGauge: "
|
|
23
|
-
_loading: "
|
|
24
|
-
__SDonutContainer: "
|
|
25
|
-
__STrendLine: "
|
|
26
|
-
__STrendBar: "
|
|
27
|
-
"@pulse": "
|
|
21
|
+
"__SLineGauge": "___SLineGauge_7jer1_gg_",
|
|
22
|
+
"_loading": "__loading_7jer1_gg_",
|
|
23
|
+
"__SDonutContainer": "___SDonutContainer_7jer1_gg_",
|
|
24
|
+
"__STrendLine": "___STrendLine_7jer1_gg_",
|
|
25
|
+
"__STrendBar": "___STrendBar_7jer1_gg_",
|
|
26
|
+
"@pulse": "pulse_7jer1"
|
|
28
27
|
})
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
);
|
|
29
|
+
var TrendBarRoot = /* @__PURE__ */ function(_Trend) {
|
|
30
|
+
_inherits(TrendBarRoot2, _Trend);
|
|
31
|
+
var _super = _createSuper(TrendBarRoot2);
|
|
32
|
+
function TrendBarRoot2() {
|
|
33
|
+
_classCallCheck(this, TrendBarRoot2);
|
|
34
|
+
return _super.apply(this, arguments);
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
_createClass(TrendBarRoot2, [{
|
|
36
37
|
key: "defaultData",
|
|
37
|
-
get: function() {
|
|
38
|
+
get: function get() {
|
|
38
39
|
return [{
|
|
39
40
|
value: 20
|
|
40
41
|
}, {
|
|
@@ -47,60 +48,71 @@ var j = (
|
|
|
47
48
|
}
|
|
48
49
|
}, {
|
|
49
50
|
key: "data",
|
|
50
|
-
get: function() {
|
|
51
|
-
var
|
|
52
|
-
|
|
51
|
+
get: function get() {
|
|
52
|
+
var _this$asProps = this.asProps, data = _this$asProps.data, loading = _this$asProps.loading;
|
|
53
|
+
if (loading) {
|
|
54
|
+
return this.defaultData;
|
|
55
|
+
}
|
|
56
|
+
return data;
|
|
53
57
|
}
|
|
54
58
|
}, {
|
|
55
59
|
key: "render",
|
|
56
|
-
value: function() {
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
60
|
+
value: function render() {
|
|
61
|
+
var _ref = this.asProps, _ref2, _this = this;
|
|
62
|
+
var STrendBar = Box;
|
|
63
|
+
var _this$asProps2 = this.asProps, styles = _this$asProps2.styles, resolveColor = _this$asProps2.resolveColor, isHistogram = _this$asProps2.isHistogram, animate = _this$asProps2.animate, loading = _this$asProps2.loading;
|
|
64
|
+
var step = this.defaultWidth / this.data.length;
|
|
65
|
+
var _extractAriaProps = extractAriaProps(this.asProps), __excludeProps = _extractAriaProps.__excludeProps, extractedAriaProps = _extractAriaProps.extractedAriaProps;
|
|
66
|
+
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(STrendBar, _ref2.cn("STrendBar", _objectSpread({}, assignProps({
|
|
67
|
+
"ref": this.containerRef,
|
|
68
|
+
"__excludeProps": ["data"].concat(_toConsumableArray(__excludeProps))
|
|
69
|
+
}, _ref))), /* @__PURE__ */ React.createElement("svg", _ref2.cn("svg", _objectSpread({
|
|
70
|
+
"width": "100%",
|
|
71
|
+
"height": "100%",
|
|
72
|
+
"viewBox": "0 0 ".concat(this.svgWidth, " ").concat(this.svgHeight),
|
|
73
|
+
"role": "img"
|
|
74
|
+
}, extractedAriaProps)), this.data.map(function(barItem, index) {
|
|
75
|
+
var color = resolveColor("chart-palette-order-other-data");
|
|
76
|
+
if (barItem.color) {
|
|
77
|
+
color = resolveColor(barItem.color);
|
|
78
|
+
}
|
|
79
|
+
return /* @__PURE__ */ React.createElement("rect", {
|
|
80
|
+
key: index,
|
|
81
|
+
x: step * index,
|
|
82
|
+
y: _this.defaultHeight - barItem.value,
|
|
83
|
+
width: isHistogram ? step : step * 0.8,
|
|
84
|
+
height: barItem.value,
|
|
85
|
+
fill: color
|
|
86
|
+
}, animate && !loading && /* @__PURE__ */ React.createElement("animate", {
|
|
76
87
|
attributeName: "y",
|
|
77
|
-
values: "".concat(
|
|
88
|
+
values: "".concat(_this.defaultHeight, ";").concat(_this.defaultHeight - barItem.value),
|
|
78
89
|
dur: "500ms"
|
|
79
90
|
}));
|
|
80
91
|
})));
|
|
81
92
|
}
|
|
82
|
-
}])
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
}]);
|
|
94
|
+
return TrendBarRoot2;
|
|
95
|
+
}(Trend);
|
|
96
|
+
_defineProperty(TrendBarRoot, "enhance", [resolveColorEnhance()]);
|
|
97
|
+
_defineProperty(TrendBarRoot, "style", style);
|
|
98
|
+
_defineProperty(TrendBarRoot, "defaultProps", {
|
|
99
|
+
animate: true
|
|
88
100
|
});
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
var
|
|
101
|
+
var TrendBar = createComponent(TrendBarRoot);
|
|
102
|
+
TrendBar.displayName = "MiniChart.TrendBar";
|
|
103
|
+
var TrendHistogram = createComponent(TrendBarRoot, {}, {
|
|
92
104
|
enhancements: [function() {
|
|
93
105
|
return {
|
|
94
|
-
wrapperProps: function(
|
|
95
|
-
return
|
|
96
|
-
isHistogram:
|
|
106
|
+
wrapperProps: function wrapperProps(props) {
|
|
107
|
+
return assignProps(props, {
|
|
108
|
+
isHistogram: true
|
|
97
109
|
});
|
|
98
110
|
}
|
|
99
111
|
};
|
|
100
112
|
}]
|
|
101
113
|
});
|
|
102
|
-
|
|
114
|
+
TrendBar.displayName = "MiniChart.TrendHistogram";
|
|
103
115
|
export {
|
|
104
|
-
|
|
105
|
-
|
|
116
|
+
TrendBar,
|
|
117
|
+
TrendHistogram
|
|
106
118
|
};
|