victory-core 36.9.2 → 37.0.0
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/dist/victory-core.js +4371 -5749
- package/dist/victory-core.min.js +1 -1
- package/es/victory-accessible-group/victory-accessible-group.js +9 -15
- package/es/victory-animation/util.js +28 -47
- package/es/victory-animation/victory-animation.js +51 -67
- package/es/victory-clip-container/victory-clip-container.js +153 -229
- package/es/victory-container/victory-container.js +157 -216
- package/es/victory-label/victory-label.js +246 -323
- package/es/victory-portal/portal-context.js +1 -2
- package/es/victory-portal/portal.js +30 -76
- package/es/victory-portal/victory-portal.js +47 -104
- package/es/victory-primitives/arc.js +44 -47
- package/es/victory-primitives/background.js +14 -17
- package/es/victory-primitives/border.js +20 -24
- package/es/victory-primitives/circle.js +13 -27
- package/es/victory-primitives/clip-path.js +3 -7
- package/es/victory-primitives/line-segment.js +20 -24
- package/es/victory-primitives/line.js +13 -27
- package/es/victory-primitives/path.js +13 -27
- package/es/victory-primitives/point.js +36 -40
- package/es/victory-primitives/rect.js +13 -27
- package/es/victory-primitives/text.js +15 -28
- package/es/victory-primitives/tspan.js +13 -26
- package/es/victory-primitives/whisker.js +43 -47
- package/es/victory-theme/grayscale.js +22 -22
- package/es/victory-theme/material.js +46 -46
- package/es/victory-theme/victory-theme.js +3 -3
- package/es/victory-transition/victory-transition.js +126 -206
- package/es/victory-util/add-events.js +263 -374
- package/es/victory-util/axis.js +126 -222
- package/es/victory-util/collection.js +13 -41
- package/es/victory-util/data.js +159 -214
- package/es/victory-util/default-transitions.js +33 -51
- package/es/victory-util/domain.js +122 -171
- package/es/victory-util/events.js +168 -258
- package/es/victory-util/helpers.js +153 -178
- package/es/victory-util/hooks/use-animation-state.js +61 -99
- package/es/victory-util/hooks/use-previous-props.js +2 -2
- package/es/victory-util/immutable.js +6 -8
- package/es/victory-util/label-helpers.js +128 -130
- package/es/victory-util/line-helpers.js +29 -41
- package/es/victory-util/log.js +1 -1
- package/es/victory-util/point-path-helpers.js +89 -49
- package/es/victory-util/scale.js +24 -42
- package/es/victory-util/selection.js +39 -40
- package/es/victory-util/style.js +8 -13
- package/es/victory-util/textsize.js +80 -154
- package/es/victory-util/timer-context.js +2 -2
- package/es/victory-util/timer.js +40 -76
- package/es/victory-util/transitions.js +110 -150
- package/es/victory-util/type-helpers.js +2 -3
- package/es/victory-util/user-props.js +24 -49
- package/es/victory-util/wrapper.js +184 -247
- package/lib/index.js +0 -30
- package/lib/victory-accessible-group/victory-accessible-group.js +9 -19
- package/lib/victory-animation/util.js +28 -63
- package/lib/victory-animation/victory-animation.js +54 -83
- package/lib/victory-clip-container/victory-clip-container.js +156 -243
- package/lib/victory-container/victory-container.js +160 -232
- package/lib/victory-label/victory-label.js +248 -344
- package/lib/victory-portal/portal-context.js +1 -6
- package/lib/victory-portal/portal.js +31 -81
- package/lib/victory-portal/victory-portal.js +50 -116
- package/lib/victory-primitives/arc.js +48 -57
- package/lib/victory-primitives/background.js +16 -28
- package/lib/victory-primitives/border.js +22 -34
- package/lib/victory-primitives/circle.js +16 -36
- package/lib/victory-primitives/clip-path.js +3 -11
- package/lib/victory-primitives/index.js +0 -28
- package/lib/victory-primitives/line-segment.js +22 -34
- package/lib/victory-primitives/line.js +16 -36
- package/lib/victory-primitives/path.js +16 -36
- package/lib/victory-primitives/point.js +38 -52
- package/lib/victory-primitives/rect.js +16 -36
- package/lib/victory-primitives/text.js +15 -33
- package/lib/victory-primitives/tspan.js +13 -31
- package/lib/victory-primitives/whisker.js +45 -57
- package/lib/victory-theme/grayscale.js +23 -24
- package/lib/victory-theme/material.js +47 -48
- package/lib/victory-theme/victory-theme.js +2 -7
- package/lib/victory-transition/victory-transition.js +129 -224
- package/lib/victory-util/add-events.js +263 -380
- package/lib/victory-util/axis.js +128 -241
- package/lib/victory-util/collection.js +13 -50
- package/lib/victory-util/data.js +160 -239
- package/lib/victory-util/default-transitions.js +33 -54
- package/lib/victory-util/domain.js +123 -193
- package/lib/victory-util/events.js +167 -274
- package/lib/victory-util/helpers.js +156 -207
- package/lib/victory-util/hooks/index.js +0 -2
- package/lib/victory-util/hooks/use-animation-state.js +63 -113
- package/lib/victory-util/hooks/use-previous-props.js +2 -7
- package/lib/victory-util/immutable.js +6 -18
- package/lib/victory-util/index.js +2 -51
- package/lib/victory-util/label-helpers.js +130 -141
- package/lib/victory-util/line-helpers.js +31 -49
- package/lib/victory-util/log.js +1 -2
- package/lib/victory-util/point-path-helpers.js +91 -63
- package/lib/victory-util/scale.js +26 -57
- package/lib/victory-util/selection.js +41 -49
- package/lib/victory-util/style.js +8 -16
- package/lib/victory-util/textsize.js +80 -157
- package/lib/victory-util/timer-context.js +2 -8
- package/lib/victory-util/timer.js +40 -76
- package/lib/victory-util/transitions.js +110 -152
- package/lib/victory-util/type-helpers.js +2 -9
- package/lib/victory-util/user-props.js +25 -59
- package/lib/victory-util/wrapper.js +186 -281
- package/package.json +2 -2
|
@@ -4,196 +4,129 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.VictoryLabel = void 0;
|
|
7
|
-
|
|
8
7
|
var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
9
|
-
|
|
10
8
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _victoryPortal = require("../victory-portal/victory-portal");
|
|
15
|
-
|
|
16
11
|
var _rect = require("../victory-primitives/rect");
|
|
17
|
-
|
|
18
12
|
var _text = require("../victory-primitives/text");
|
|
19
|
-
|
|
20
13
|
var _tspan = require("../victory-primitives/tspan");
|
|
21
|
-
|
|
22
14
|
var Helpers = _interopRequireWildcard(require("../victory-util/helpers"));
|
|
23
|
-
|
|
24
15
|
var LabelHelpers = _interopRequireWildcard(require("../victory-util/label-helpers"));
|
|
25
|
-
|
|
26
16
|
var Log = _interopRequireWildcard(require("../victory-util/log"));
|
|
27
|
-
|
|
28
17
|
var Style = _interopRequireWildcard(require("../victory-util/style"));
|
|
29
|
-
|
|
30
18
|
var TextSize = _interopRequireWildcard(require("../victory-util/textsize"));
|
|
31
|
-
|
|
32
19
|
var UserProps = _interopRequireWildcard(require("../victory-util/user-props"));
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
|
-
|
|
20
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
38
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
39
24
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
43
|
-
|
|
44
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
45
|
-
|
|
46
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
47
|
-
|
|
48
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
49
|
-
|
|
50
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
51
|
-
|
|
52
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
53
|
-
|
|
54
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
55
|
-
|
|
56
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
57
|
-
|
|
58
|
-
var defaultStyles = {
|
|
25
|
+
const defaultStyles = {
|
|
59
26
|
fill: "#252525",
|
|
60
27
|
fontSize: 14,
|
|
61
28
|
fontFamily: "'Gill Sans', 'Gill Sans MT', 'Seravek', 'Trebuchet MS', sans-serif",
|
|
62
29
|
stroke: "transparent"
|
|
63
30
|
};
|
|
64
|
-
|
|
65
|
-
var getPosition = function (props, dimension) {
|
|
31
|
+
const getPosition = (props, dimension) => {
|
|
66
32
|
if (!props.datum) {
|
|
67
33
|
return 0;
|
|
68
34
|
}
|
|
69
|
-
|
|
70
|
-
var scaledPoint = Helpers.scalePoint(props, props.datum);
|
|
35
|
+
const scaledPoint = Helpers.scalePoint(props, props.datum);
|
|
71
36
|
return scaledPoint[dimension];
|
|
72
37
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
var baseSize = style && style.fontSize;
|
|
76
|
-
|
|
38
|
+
const getFontSize = style => {
|
|
39
|
+
const baseSize = style && style.fontSize;
|
|
77
40
|
if (typeof baseSize === "number") {
|
|
78
41
|
return baseSize;
|
|
79
42
|
} else if (baseSize === undefined || baseSize === null) {
|
|
80
43
|
return defaultStyles.fontSize;
|
|
81
44
|
} else if (typeof baseSize === "string") {
|
|
82
|
-
|
|
83
|
-
|
|
45
|
+
const fontSize = Number(baseSize.replace("px", ""));
|
|
84
46
|
if (!isNaN(fontSize)) {
|
|
85
47
|
return fontSize;
|
|
86
48
|
}
|
|
87
|
-
|
|
88
49
|
Log.warn("fontSize should be expressed as a number of pixels");
|
|
89
50
|
return defaultStyles.fontSize;
|
|
90
51
|
}
|
|
91
|
-
|
|
92
52
|
return defaultStyles.fontSize;
|
|
93
53
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
54
|
+
const getSingleValue = function (prop, index) {
|
|
55
|
+
if (index === void 0) {
|
|
56
|
+
index = 0;
|
|
57
|
+
}
|
|
97
58
|
return Array.isArray(prop) ? prop[index] || prop[0] : prop;
|
|
98
59
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
60
|
+
const shouldUseMultilineBackgrounds = props => {
|
|
61
|
+
const {
|
|
62
|
+
backgroundStyle,
|
|
63
|
+
backgroundPadding
|
|
64
|
+
} = props;
|
|
103
65
|
return Array.isArray(backgroundStyle) && !(0, _isEmpty2.default)(backgroundStyle) || Array.isArray(backgroundPadding) && !(0, _isEmpty2.default)(backgroundPadding);
|
|
104
66
|
};
|
|
105
|
-
|
|
106
|
-
var getStyles = function (style, props) {
|
|
67
|
+
const getStyles = (style, props) => {
|
|
107
68
|
if (props.disableInlineStyles) {
|
|
108
|
-
|
|
69
|
+
const baseStyles = Helpers.evaluateStyle(style, props);
|
|
109
70
|
return {
|
|
110
71
|
// Font size is necessary to calculate the y position of the label
|
|
111
72
|
fontSize: getFontSize(baseStyles)
|
|
112
73
|
};
|
|
113
74
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
var baseStyles = Helpers.evaluateStyle(s ? (0, _defaults2.default)({}, s, defaultStyles) : defaultStyles, props);
|
|
75
|
+
const getSingleStyle = s => {
|
|
76
|
+
const baseStyles = Helpers.evaluateStyle(s ? (0, _defaults2.default)({}, s, defaultStyles) : defaultStyles, props);
|
|
117
77
|
return Object.assign({}, baseStyles, {
|
|
118
78
|
fontSize: getFontSize(baseStyles)
|
|
119
79
|
});
|
|
120
80
|
};
|
|
121
|
-
|
|
122
|
-
return Array.isArray(style) && !(0, _isEmpty2.default)(style) ? style.map(function (s) {
|
|
123
|
-
return getSingleStyle(s);
|
|
124
|
-
}) : getSingleStyle(style);
|
|
81
|
+
return Array.isArray(style) && !(0, _isEmpty2.default)(style) ? style.map(s => getSingleStyle(s)) : getSingleStyle(style);
|
|
125
82
|
};
|
|
126
|
-
|
|
127
|
-
var getBackgroundStyles = function (style, props) {
|
|
83
|
+
const getBackgroundStyles = (style, props) => {
|
|
128
84
|
if (!style) {
|
|
129
85
|
return undefined;
|
|
130
86
|
}
|
|
131
|
-
|
|
132
|
-
return Array.isArray(style) && !(0, _isEmpty2.default)(style) ? style.map(function (s) {
|
|
133
|
-
return Helpers.evaluateStyle(s, props);
|
|
134
|
-
}) : Helpers.evaluateStyle(style, props);
|
|
87
|
+
return Array.isArray(style) && !(0, _isEmpty2.default)(style) ? style.map(s => Helpers.evaluateStyle(s, props)) : Helpers.evaluateStyle(style, props);
|
|
135
88
|
};
|
|
136
|
-
|
|
137
|
-
var getBackgroundPadding = function (props) {
|
|
89
|
+
const getBackgroundPadding = props => {
|
|
138
90
|
if (props.backgroundPadding && Array.isArray(props.backgroundPadding)) {
|
|
139
|
-
return props.backgroundPadding.map(
|
|
140
|
-
|
|
91
|
+
return props.backgroundPadding.map(backgroundPadding => {
|
|
92
|
+
const padding = Helpers.evaluateProp(backgroundPadding, props);
|
|
141
93
|
return Helpers.getPadding({
|
|
142
|
-
padding
|
|
94
|
+
padding
|
|
143
95
|
});
|
|
144
96
|
});
|
|
145
97
|
}
|
|
146
|
-
|
|
147
|
-
var padding = Helpers.evaluateProp(props.backgroundPadding, props);
|
|
98
|
+
const padding = Helpers.evaluateProp(props.backgroundPadding, props);
|
|
148
99
|
return Helpers.getPadding({
|
|
149
|
-
padding
|
|
100
|
+
padding
|
|
150
101
|
});
|
|
151
102
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
var lineHeight = Helpers.evaluateProp(props.lineHeight, props);
|
|
155
|
-
|
|
103
|
+
const getLineHeight = props => {
|
|
104
|
+
const lineHeight = Helpers.evaluateProp(props.lineHeight, props);
|
|
156
105
|
if (Array.isArray(lineHeight)) {
|
|
157
106
|
return (0, _isEmpty2.default)(lineHeight) ? [1] : lineHeight;
|
|
158
107
|
}
|
|
159
|
-
|
|
160
108
|
return lineHeight;
|
|
161
109
|
};
|
|
162
|
-
|
|
163
|
-
var getContent = function (text, props) {
|
|
110
|
+
const getContent = (text, props) => {
|
|
164
111
|
if (text === undefined || text === null) {
|
|
165
112
|
return undefined;
|
|
166
113
|
}
|
|
167
|
-
|
|
168
114
|
if (Array.isArray(text)) {
|
|
169
|
-
return text.map(
|
|
170
|
-
return Helpers.evaluateProp(line, props);
|
|
171
|
-
});
|
|
115
|
+
return text.map(line => Helpers.evaluateProp(line, props));
|
|
172
116
|
}
|
|
173
|
-
|
|
174
|
-
var child = Helpers.evaluateProp(text, props);
|
|
175
|
-
|
|
117
|
+
const child = Helpers.evaluateProp(text, props);
|
|
176
118
|
if (child === undefined || child === null) {
|
|
177
119
|
return undefined;
|
|
178
120
|
}
|
|
179
|
-
|
|
180
|
-
return Array.isArray(child) ? child : "".concat(child).split("\n");
|
|
121
|
+
return Array.isArray(child) ? child : `${child}`.split("\n");
|
|
181
122
|
};
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
var fontSizes = _toConsumableArray(Array(length).keys()).map(function (i) {
|
|
190
|
-
return getSingleValue(props.style, i).fontSize;
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
var lineHeights = _toConsumableArray(Array(length).keys()).map(function (i) {
|
|
194
|
-
return getSingleValue(lineHeight, i);
|
|
195
|
-
});
|
|
196
|
-
|
|
123
|
+
const getDy = (props, verticalAnchor, lineHeight) => {
|
|
124
|
+
const dy = props.dy ? Helpers.evaluateProp(props.dy, props) : 0;
|
|
125
|
+
const length = props.inline ? 1 : props.text.length;
|
|
126
|
+
const capHeight = Helpers.evaluateProp(props.capHeight, props);
|
|
127
|
+
const anchor = verticalAnchor ? Helpers.evaluateProp(verticalAnchor, props) : "middle";
|
|
128
|
+
const fontSizes = [...Array(length).keys()].map(i => getSingleValue(props.style, i).fontSize);
|
|
129
|
+
const lineHeights = [...Array(length).keys()].map(i => getSingleValue(lineHeight, i));
|
|
197
130
|
if (anchor === "start") {
|
|
198
131
|
return dy + (capHeight / 2 + lineHeights[0] / 2) * fontSizes[0];
|
|
199
132
|
} else if (props.inline) {
|
|
@@ -201,314 +134,289 @@ var getDy = function (props, verticalAnchor, lineHeight) {
|
|
|
201
134
|
} else if (length === 1) {
|
|
202
135
|
return anchor === "end" ? dy + (capHeight / 2 + (0.5 - length) * lineHeights[0]) * fontSizes[0] : dy + (capHeight / 2 + (0.5 - length / 2) * lineHeights[0]) * fontSizes[0];
|
|
203
136
|
}
|
|
204
|
-
|
|
205
|
-
var allHeights = _toConsumableArray(Array(length).keys()).reduce(function (memo, i) {
|
|
137
|
+
const allHeights = [...Array(length).keys()].reduce((memo, i) => {
|
|
206
138
|
return memo + (capHeight / 2 + (0.5 - length) * lineHeights[i]) * fontSizes[i] / length;
|
|
207
139
|
}, 0);
|
|
208
|
-
|
|
209
140
|
return anchor === "end" ? dy + allHeights : dy + allHeights / 2 + capHeight / 2 * lineHeights[length - 1] * fontSizes[length - 1];
|
|
210
141
|
};
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
142
|
+
const getTransform = (props, x, y) => {
|
|
143
|
+
const {
|
|
144
|
+
polar
|
|
145
|
+
} = props;
|
|
146
|
+
const style = getSingleValue(props.style);
|
|
147
|
+
const defaultAngle = polar ? LabelHelpers.getPolarAngle(props) : 0;
|
|
148
|
+
const baseAngle = style.angle === undefined ? Helpers.evaluateProp(props.angle, props) : style.angle;
|
|
149
|
+
const angle = baseAngle === undefined ? defaultAngle : baseAngle;
|
|
150
|
+
const transform = props.transform || style.transform;
|
|
151
|
+
const transformPart = transform && Helpers.evaluateProp(transform, props);
|
|
152
|
+
const rotatePart = angle && {
|
|
221
153
|
rotate: [angle, x, y]
|
|
222
154
|
};
|
|
223
155
|
return transformPart || angle ? Style.toTransformString(transformPart, rotatePart) : undefined;
|
|
224
156
|
};
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
157
|
+
const getXCoordinate = (calculatedProps, labelSizeWidth) => {
|
|
158
|
+
const {
|
|
159
|
+
direction,
|
|
160
|
+
textAnchor,
|
|
161
|
+
x,
|
|
162
|
+
dx
|
|
163
|
+
} = calculatedProps;
|
|
232
164
|
if (direction === "rtl") {
|
|
233
165
|
return x - labelSizeWidth;
|
|
234
166
|
}
|
|
235
|
-
|
|
236
167
|
switch (textAnchor) {
|
|
237
168
|
case "middle":
|
|
238
169
|
return Math.round(x - labelSizeWidth / 2);
|
|
239
|
-
|
|
240
170
|
case "end":
|
|
241
171
|
return Math.round(x - labelSizeWidth);
|
|
242
|
-
|
|
243
172
|
default:
|
|
244
173
|
// start
|
|
245
174
|
return x + (dx || 0);
|
|
246
175
|
}
|
|
247
176
|
};
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
177
|
+
const getYCoordinate = (calculatedProps, textHeight) => {
|
|
178
|
+
const {
|
|
179
|
+
verticalAnchor,
|
|
180
|
+
y,
|
|
181
|
+
originalDy = 0
|
|
182
|
+
} = calculatedProps;
|
|
183
|
+
const offset = y + originalDy;
|
|
256
184
|
switch (verticalAnchor) {
|
|
257
185
|
case "start":
|
|
258
186
|
return Math.floor(offset);
|
|
259
|
-
|
|
260
187
|
case "end":
|
|
261
188
|
return Math.ceil(offset - textHeight);
|
|
262
|
-
|
|
263
189
|
default:
|
|
264
190
|
// middle
|
|
265
191
|
return Math.floor(offset - textHeight / 2);
|
|
266
192
|
}
|
|
267
193
|
};
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
194
|
+
const getFullBackground = (calculatedProps, tspanValues) => {
|
|
195
|
+
const {
|
|
196
|
+
dx = 0,
|
|
197
|
+
transform,
|
|
198
|
+
backgroundComponent,
|
|
199
|
+
backgroundStyle,
|
|
200
|
+
inline,
|
|
201
|
+
backgroundPadding,
|
|
202
|
+
capHeight
|
|
203
|
+
} = calculatedProps;
|
|
204
|
+
const textSizes = tspanValues.map(tspan => {
|
|
279
205
|
return tspan.textSize;
|
|
280
206
|
});
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}))) : textSizes.reduce(function (memo, size, i) {
|
|
284
|
-
var capHeightAdjustment = i ? 0 : capHeight / 2;
|
|
207
|
+
const height = inline ? Math.max(...textSizes.map(size => size.height)) : textSizes.reduce((memo, size, i) => {
|
|
208
|
+
const capHeightAdjustment = i ? 0 : capHeight / 2;
|
|
285
209
|
return memo + size.height * (tspanValues[i].lineHeight - capHeightAdjustment);
|
|
286
210
|
}, 0);
|
|
287
|
-
|
|
288
|
-
|
|
211
|
+
const width = inline ? textSizes.reduce((memo, size, index) => {
|
|
212
|
+
const offset = index ? dx : 0;
|
|
289
213
|
return memo + size.width + offset;
|
|
290
|
-
}, 0) : Math.max
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
var yCoordinate = getYCoordinate(calculatedProps, height);
|
|
295
|
-
var backgroundProps = {
|
|
214
|
+
}, 0) : Math.max(...textSizes.map(size => size.width));
|
|
215
|
+
const xCoordinate = getXCoordinate(calculatedProps, width);
|
|
216
|
+
const yCoordinate = getYCoordinate(calculatedProps, height);
|
|
217
|
+
const backgroundProps = {
|
|
296
218
|
key: "background",
|
|
297
219
|
height: height + backgroundPadding.top + backgroundPadding.bottom,
|
|
298
220
|
style: backgroundStyle,
|
|
299
|
-
transform
|
|
221
|
+
transform,
|
|
300
222
|
width: width + backgroundPadding.left + backgroundPadding.right,
|
|
301
223
|
x: inline ? xCoordinate - backgroundPadding.left : xCoordinate + dx - backgroundPadding.left,
|
|
302
224
|
y: yCoordinate
|
|
303
225
|
};
|
|
304
226
|
return /*#__PURE__*/_react.default.cloneElement(backgroundComponent, (0, _defaults2.default)({}, backgroundComponent.props, backgroundProps));
|
|
305
227
|
};
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
return memo + width;
|
|
314
|
-
}, 0);
|
|
315
|
-
var centerOffset = -totalWidth / 2;
|
|
316
|
-
|
|
228
|
+
const getInlineXOffset = (calculatedProps, textElements, index) => {
|
|
229
|
+
const {
|
|
230
|
+
textAnchor
|
|
231
|
+
} = calculatedProps;
|
|
232
|
+
const widths = textElements.map(t => t.widthWithPadding);
|
|
233
|
+
const totalWidth = widths.reduce((memo, width) => memo + width, 0);
|
|
234
|
+
const centerOffset = -totalWidth / 2;
|
|
317
235
|
switch (textAnchor) {
|
|
318
236
|
case "start":
|
|
319
|
-
return widths.reduce(
|
|
320
|
-
return i < index ? memo + width : memo;
|
|
321
|
-
}, 0);
|
|
322
|
-
|
|
237
|
+
return widths.reduce((memo, width, i) => i < index ? memo + width : memo, 0);
|
|
323
238
|
case "end":
|
|
324
|
-
return widths.reduce(
|
|
325
|
-
return i > index ? memo - width : memo;
|
|
326
|
-
}, 0);
|
|
327
|
-
|
|
239
|
+
return widths.reduce((memo, width, i) => i > index ? memo - width : memo, 0);
|
|
328
240
|
default:
|
|
329
241
|
// middle
|
|
330
|
-
return widths.reduce(
|
|
331
|
-
|
|
242
|
+
return widths.reduce((memo, width, i) => {
|
|
243
|
+
const offsetWidth = i < index ? width : 0;
|
|
332
244
|
return i === index ? memo + width / 2 : memo + offsetWidth;
|
|
333
245
|
}, centerOffset);
|
|
334
246
|
}
|
|
335
247
|
};
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
248
|
+
const getChildBackgrounds = (calculatedProps, tspanValues) => {
|
|
249
|
+
const {
|
|
250
|
+
dy,
|
|
251
|
+
dx,
|
|
252
|
+
transform,
|
|
253
|
+
backgroundStyle,
|
|
254
|
+
backgroundPadding,
|
|
255
|
+
backgroundComponent,
|
|
256
|
+
inline,
|
|
257
|
+
y
|
|
258
|
+
} = calculatedProps;
|
|
259
|
+
const textElements = tspanValues.map((current, i) => {
|
|
260
|
+
const previous = getSingleValue(tspanValues, i - 1);
|
|
261
|
+
const labelSize = current.textSize;
|
|
262
|
+
const totalLineHeight = current.fontSize * current.lineHeight;
|
|
263
|
+
const textHeight = Math.ceil(totalLineHeight);
|
|
264
|
+
const padding = getSingleValue(backgroundPadding, i);
|
|
265
|
+
const prevPadding = getSingleValue(backgroundPadding, i - 1);
|
|
266
|
+
const xOffset = inline ? dx || 0 : 0;
|
|
267
|
+
const childDy = i && !inline ? previous.fontSize * previous.lineHeight + prevPadding.top + prevPadding.bottom : dy - totalLineHeight * 0.5 - (current.fontSize - current.capHeight);
|
|
355
268
|
return {
|
|
356
|
-
textHeight
|
|
357
|
-
labelSize
|
|
269
|
+
textHeight,
|
|
270
|
+
labelSize,
|
|
358
271
|
heightWithPadding: textHeight + padding.top + padding.bottom,
|
|
359
272
|
widthWithPadding: labelSize.width + padding.left + padding.right + xOffset,
|
|
360
|
-
y
|
|
273
|
+
y,
|
|
361
274
|
fontSize: current.fontSize,
|
|
362
275
|
dy: childDy
|
|
363
276
|
};
|
|
364
277
|
});
|
|
365
|
-
return textElements.map(
|
|
366
|
-
|
|
367
|
-
|
|
278
|
+
return textElements.map((textElement, i) => {
|
|
279
|
+
const xCoordinate = getXCoordinate(calculatedProps, textElement.labelSize.width);
|
|
280
|
+
const yCoordinate = textElements.slice(0, i + 1).reduce((prev, curr) => {
|
|
368
281
|
return prev + curr.dy;
|
|
369
282
|
}, y);
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
key:
|
|
376
|
-
height
|
|
283
|
+
const padding = getSingleValue(backgroundPadding, i);
|
|
284
|
+
const height = textElement.heightWithPadding;
|
|
285
|
+
const xCoord = inline ? getInlineXOffset(calculatedProps, textElements, i) + xCoordinate - padding.left : xCoordinate;
|
|
286
|
+
const yCoord = inline ? getYCoordinate(calculatedProps, height) - padding.top : yCoordinate;
|
|
287
|
+
const backgroundProps = {
|
|
288
|
+
key: `tspan-background-${i}`,
|
|
289
|
+
height,
|
|
377
290
|
style: getSingleValue(backgroundStyle, i),
|
|
378
291
|
width: textElement.widthWithPadding,
|
|
379
|
-
transform
|
|
292
|
+
transform,
|
|
380
293
|
x: xCoord - padding.left,
|
|
381
294
|
y: yCoord
|
|
382
295
|
};
|
|
383
296
|
return /*#__PURE__*/_react.default.cloneElement(backgroundComponent, (0, _defaults2.default)({}, backgroundComponent.props, backgroundProps));
|
|
384
297
|
});
|
|
385
298
|
};
|
|
386
|
-
|
|
387
|
-
var getBackgroundElement = function (calculatedProps, tspanValues) {
|
|
299
|
+
const getBackgroundElement = (calculatedProps, tspanValues) => {
|
|
388
300
|
return shouldUseMultilineBackgrounds(calculatedProps) ? getChildBackgrounds(calculatedProps, tspanValues) : getFullBackground(calculatedProps, tspanValues);
|
|
389
301
|
};
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
var textHeight = previousHeight - previous.fontSize / 2 + current.fontSize / 2 - previousHeight / 2 + currentHeight / 2 - currentCaps / 2 + previousCaps / 2;
|
|
302
|
+
const calculateSpanDy = (tspanValues, i, calculatedProps) => {
|
|
303
|
+
const current = getSingleValue(tspanValues, i);
|
|
304
|
+
const previous = getSingleValue(tspanValues, i - 1);
|
|
305
|
+
const previousHeight = previous.fontSize * previous.lineHeight;
|
|
306
|
+
const currentHeight = current.fontSize * current.lineHeight;
|
|
307
|
+
const previousCaps = previous.fontSize - previous.capHeight;
|
|
308
|
+
const currentCaps = current.fontSize - current.capHeight;
|
|
309
|
+
const textHeight = previousHeight - previous.fontSize / 2 + current.fontSize / 2 - previousHeight / 2 + currentHeight / 2 - currentCaps / 2 + previousCaps / 2;
|
|
399
310
|
return shouldUseMultilineBackgrounds(calculatedProps) ? textHeight + current.backgroundPadding.top + previous.backgroundPadding.bottom : textHeight;
|
|
400
311
|
};
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
312
|
+
const getTSpanDy = (tspanValues, calculatedProps, i) => {
|
|
313
|
+
const {
|
|
314
|
+
inline
|
|
315
|
+
} = calculatedProps;
|
|
316
|
+
const current = getSingleValue(tspanValues, i);
|
|
406
317
|
if (i && !inline) {
|
|
407
318
|
return calculateSpanDy(tspanValues, i, calculatedProps);
|
|
408
319
|
} else if (inline) {
|
|
409
320
|
return i === 0 ? current.backgroundPadding.top : undefined;
|
|
410
321
|
}
|
|
411
|
-
|
|
412
322
|
return current.backgroundPadding.top;
|
|
413
323
|
};
|
|
414
|
-
|
|
415
|
-
var evaluateProps = function (props) {
|
|
324
|
+
const evaluateProps = props => {
|
|
416
325
|
/* Potential evaluated props are
|
|
417
326
|
1) text
|
|
418
327
|
2) style
|
|
419
328
|
3) everything else
|
|
420
329
|
*/
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
text
|
|
330
|
+
const text = getContent(props.text, props);
|
|
331
|
+
const style = getStyles(props.style, Object.assign({}, props, {
|
|
332
|
+
text
|
|
424
333
|
}));
|
|
425
|
-
|
|
426
|
-
text
|
|
427
|
-
style
|
|
334
|
+
const backgroundStyle = getBackgroundStyles(props.backgroundStyle, Object.assign({}, props, {
|
|
335
|
+
text,
|
|
336
|
+
style
|
|
428
337
|
}));
|
|
429
|
-
|
|
430
|
-
text
|
|
431
|
-
style
|
|
432
|
-
backgroundStyle
|
|
338
|
+
const backgroundPadding = getBackgroundPadding(Object.assign({}, props, {
|
|
339
|
+
text,
|
|
340
|
+
style,
|
|
341
|
+
backgroundStyle
|
|
433
342
|
}));
|
|
434
|
-
|
|
343
|
+
const id = Helpers.evaluateProp(props.id, props);
|
|
435
344
|
return Object.assign({}, props, {
|
|
436
|
-
backgroundStyle
|
|
437
|
-
backgroundPadding
|
|
438
|
-
style
|
|
439
|
-
text
|
|
440
|
-
id
|
|
345
|
+
backgroundStyle,
|
|
346
|
+
backgroundPadding,
|
|
347
|
+
style,
|
|
348
|
+
text,
|
|
349
|
+
id
|
|
441
350
|
});
|
|
442
351
|
};
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
var transform = getTransform(props, x, y);
|
|
352
|
+
const getCalculatedProps = props => {
|
|
353
|
+
const ariaLabel = Helpers.evaluateProp(props.ariaLabel, props);
|
|
354
|
+
const style = getSingleValue(props.style);
|
|
355
|
+
const lineHeight = getLineHeight(props);
|
|
356
|
+
const direction = props.direction ? Helpers.evaluateProp(props.direction, props) : "inherit";
|
|
357
|
+
const textAnchor = props.textAnchor ? Helpers.evaluateProp(props.textAnchor, props) : style.textAnchor || "start";
|
|
358
|
+
const verticalAnchor = props.verticalAnchor ? Helpers.evaluateProp(props.verticalAnchor, props) : style.verticalAnchor || "middle";
|
|
359
|
+
const dx = props.dx ? Helpers.evaluateProp(props.dx, props) : 0;
|
|
360
|
+
const dy = getDy(props, verticalAnchor, lineHeight);
|
|
361
|
+
const x = props.x !== undefined ? props.x : getPosition(props, "x");
|
|
362
|
+
const y = props.y !== undefined ? props.y : getPosition(props, "y");
|
|
363
|
+
const transform = getTransform(props, x, y);
|
|
456
364
|
return Object.assign({}, props, {
|
|
457
|
-
ariaLabel
|
|
458
|
-
lineHeight
|
|
459
|
-
direction
|
|
460
|
-
textAnchor
|
|
461
|
-
verticalAnchor
|
|
462
|
-
dx
|
|
463
|
-
dy
|
|
365
|
+
ariaLabel,
|
|
366
|
+
lineHeight,
|
|
367
|
+
direction,
|
|
368
|
+
textAnchor,
|
|
369
|
+
verticalAnchor,
|
|
370
|
+
dx,
|
|
371
|
+
dy,
|
|
464
372
|
originalDy: Helpers.evaluateProp(props.dy, props),
|
|
465
|
-
transform
|
|
466
|
-
x
|
|
467
|
-
y
|
|
373
|
+
transform,
|
|
374
|
+
x,
|
|
375
|
+
y
|
|
468
376
|
});
|
|
469
377
|
};
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
378
|
+
const renderLabel = (calculatedProps, tspanValues) => {
|
|
379
|
+
const {
|
|
380
|
+
ariaLabel,
|
|
381
|
+
inline,
|
|
382
|
+
className,
|
|
383
|
+
title,
|
|
384
|
+
events,
|
|
385
|
+
direction,
|
|
386
|
+
text,
|
|
387
|
+
textAnchor,
|
|
388
|
+
dx,
|
|
389
|
+
dy,
|
|
390
|
+
transform,
|
|
391
|
+
x,
|
|
392
|
+
y,
|
|
393
|
+
desc,
|
|
394
|
+
id,
|
|
395
|
+
tabIndex,
|
|
396
|
+
tspanComponent,
|
|
397
|
+
textComponent
|
|
398
|
+
} = calculatedProps;
|
|
399
|
+
const userProps = UserProps.getSafeUserProps(calculatedProps);
|
|
400
|
+
const textProps = {
|
|
493
401
|
"aria-label": ariaLabel,
|
|
494
|
-
key: "text"
|
|
495
|
-
|
|
496
|
-
direction
|
|
497
|
-
dx
|
|
498
|
-
x
|
|
402
|
+
key: "text",
|
|
403
|
+
...events,
|
|
404
|
+
direction,
|
|
405
|
+
dx,
|
|
406
|
+
x,
|
|
499
407
|
y: y + dy,
|
|
500
|
-
transform
|
|
501
|
-
className
|
|
502
|
-
title
|
|
408
|
+
transform,
|
|
409
|
+
className,
|
|
410
|
+
title,
|
|
503
411
|
desc: Helpers.evaluateProp(desc, calculatedProps),
|
|
504
412
|
tabIndex: Helpers.evaluateProp(tabIndex, calculatedProps),
|
|
505
|
-
id
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
key:
|
|
413
|
+
id,
|
|
414
|
+
...userProps
|
|
415
|
+
};
|
|
416
|
+
const tspans = text.map((line, i) => {
|
|
417
|
+
const currentStyle = tspanValues[i].style;
|
|
418
|
+
const tspanProps = {
|
|
419
|
+
key: `${id}-key-${i}`,
|
|
512
420
|
x: !inline ? x : undefined,
|
|
513
421
|
dx: inline ? dx + tspanValues[i].backgroundPadding.left : dx,
|
|
514
422
|
dy: getTSpanDy(tspanValues, calculatedProps, i),
|
|
@@ -520,8 +428,7 @@ var renderLabel = function (calculatedProps, tspanValues) {
|
|
|
520
428
|
});
|
|
521
429
|
return /*#__PURE__*/_react.default.cloneElement(textComponent, textProps, tspans);
|
|
522
430
|
};
|
|
523
|
-
|
|
524
|
-
var defaultProps = {
|
|
431
|
+
const defaultProps = {
|
|
525
432
|
backgroundComponent: /*#__PURE__*/_react.default.createElement(_rect.Rect, null),
|
|
526
433
|
groupComponent: /*#__PURE__*/_react.default.createElement("g", null),
|
|
527
434
|
direction: "inherit",
|
|
@@ -531,24 +438,26 @@ var defaultProps = {
|
|
|
531
438
|
// Magic number from d3.
|
|
532
439
|
lineHeight: 1
|
|
533
440
|
};
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
441
|
+
const VictoryLabel = initialProps => {
|
|
442
|
+
const props = evaluateProps({
|
|
443
|
+
...defaultProps,
|
|
444
|
+
...initialProps
|
|
445
|
+
});
|
|
538
446
|
if (props.text === null || props.text === undefined) {
|
|
539
447
|
return null;
|
|
540
448
|
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
449
|
+
const calculatedProps = getCalculatedProps(props);
|
|
450
|
+
const {
|
|
451
|
+
text,
|
|
452
|
+
style,
|
|
453
|
+
capHeight,
|
|
454
|
+
backgroundPadding,
|
|
455
|
+
lineHeight
|
|
456
|
+
} = calculatedProps;
|
|
457
|
+
const tspanValues = text.map((line, i) => {
|
|
458
|
+
const currentStyle = getSingleValue(style, i);
|
|
459
|
+
const capHeightPx = TextSize.convertLengthToPixels(`${capHeight}em`, currentStyle.fontSize);
|
|
460
|
+
const currentLineHeight = getSingleValue(lineHeight, i);
|
|
552
461
|
return {
|
|
553
462
|
style: currentStyle,
|
|
554
463
|
fontSize: currentStyle.fontSize || defaultStyles.fontSize,
|
|
@@ -560,20 +469,15 @@ var VictoryLabel = function (initialProps) {
|
|
|
560
469
|
backgroundPadding: getSingleValue(backgroundPadding, i)
|
|
561
470
|
};
|
|
562
471
|
});
|
|
563
|
-
|
|
564
|
-
|
|
472
|
+
const label = renderLabel(calculatedProps, tspanValues);
|
|
565
473
|
if (props.backgroundStyle) {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
var backgroundWithLabel = /*#__PURE__*/_react.default.cloneElement(props.groupComponent, {}, children);
|
|
570
|
-
|
|
474
|
+
const backgroundElement = getBackgroundElement(calculatedProps, tspanValues);
|
|
475
|
+
const children = [backgroundElement, label];
|
|
476
|
+
const backgroundWithLabel = /*#__PURE__*/_react.default.cloneElement(props.groupComponent, {}, children);
|
|
571
477
|
return props.renderInPortal ? /*#__PURE__*/_react.default.createElement(_victoryPortal.VictoryPortal, null, backgroundWithLabel) : backgroundWithLabel;
|
|
572
478
|
}
|
|
573
|
-
|
|
574
479
|
return props.renderInPortal ? /*#__PURE__*/_react.default.createElement(_victoryPortal.VictoryPortal, null, label) : label;
|
|
575
480
|
};
|
|
576
|
-
|
|
577
481
|
exports.VictoryLabel = VictoryLabel;
|
|
578
482
|
VictoryLabel.displayName = "VictoryLabel";
|
|
579
483
|
VictoryLabel.role = "label";
|