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