victory-chart 36.6.10 → 36.6.11
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 +2 -0
- package/dist/victory-chart.js +7 -6
- package/dist/victory-chart.min.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/victory-chart.js
CHANGED
|
@@ -16188,6 +16188,9 @@ var _approximateDimensionsInternal = function (text, style) {
|
|
|
16188
16188
|
var _getMeasurementContainer = lodash_memoize__WEBPACK_IMPORTED_MODULE_0___default()(function () {
|
|
16189
16189
|
var element = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
16190
16190
|
element.setAttribute("xlink", "http://www.w3.org/1999/xlink");
|
|
16191
|
+
element.setAttribute("width", "300");
|
|
16192
|
+
element.setAttribute("height", "300");
|
|
16193
|
+
element.setAttribute("viewBox", "0 0 300 300");
|
|
16191
16194
|
var containerElement = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
16192
16195
|
element.appendChild(containerElement);
|
|
16193
16196
|
element.style.position = "fixed";
|
|
@@ -16222,7 +16225,6 @@ var _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_0___def
|
|
|
16222
16225
|
var params = _prepareParams(style, i);
|
|
16223
16226
|
|
|
16224
16227
|
textElement.style.fontFamily = params.fontFamily;
|
|
16225
|
-
textElement.style.transform = "rotate(".concat(params.angle, ")");
|
|
16226
16228
|
textElement.style.fontSize = "".concat(params.fontSize, "px");
|
|
16227
16229
|
textElement.style.lineHeight = params.lineHeight;
|
|
16228
16230
|
textElement.style.fontFamily = params.fontFamily;
|
|
@@ -16230,18 +16232,17 @@ var _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_0___def
|
|
|
16230
16232
|
textElement.textContent = line;
|
|
16231
16233
|
textElement.setAttribute("x", "0");
|
|
16232
16234
|
textElement.setAttribute("y", "".concat(heightAcc));
|
|
16233
|
-
heightAcc += params.lineHeight * params.fontSize;
|
|
16234
16235
|
containerElement.appendChild(textElement);
|
|
16236
|
+
heightAcc += params.lineHeight * textElement.getBoundingClientRect().height;
|
|
16235
16237
|
}
|
|
16236
16238
|
|
|
16237
16239
|
var _containerElement$get = containerElement.getBoundingClientRect(),
|
|
16238
|
-
width = _containerElement$get.width
|
|
16239
|
-
height = _containerElement$get.height;
|
|
16240
|
+
width = _containerElement$get.width;
|
|
16240
16241
|
|
|
16241
16242
|
containerElement.innerHTML = "";
|
|
16242
16243
|
return {
|
|
16243
|
-
width: width,
|
|
16244
|
-
height:
|
|
16244
|
+
width: style !== null && style !== void 0 && style.angle ? _getSizeWithRotate(width, heightAcc, style === null || style === void 0 ? void 0 : style.angle) : width,
|
|
16245
|
+
height: style !== null && style !== void 0 && style.angle ? _getSizeWithRotate(heightAcc, width, style === null || style === void 0 ? void 0 : style.angle) : heightAcc
|
|
16245
16246
|
};
|
|
16246
16247
|
}, function (text, style) {
|
|
16247
16248
|
var totalText = Array.isArray(text) ? text.join() : text;
|