victory-legend 36.8.5-next.0 → 36.8.6
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 -5
- package/dist/victory-legend.js +36 -4
- package/dist/victory-legend.min.js +1 -1
- package/es/helper-methods.d.ts +5 -5
- package/es/index.d.ts +1 -1
- package/es/victory-legend.d.ts +113 -113
- package/lib/helper-methods.d.ts +5 -5
- package/lib/index.d.ts +1 -1
- package/lib/victory-legend.d.ts +113 -113
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
# victory-legend
|
|
2
2
|
|
|
3
|
-
## 36.8.
|
|
3
|
+
## 36.8.6
|
|
4
|
+
|
|
5
|
+
## 36.8.5
|
|
4
6
|
|
|
5
7
|
### Patch Changes
|
|
6
8
|
|
|
7
|
-
-
|
|
8
|
-
- Updated dependencies [c8c2eb2f5]
|
|
9
|
-
- Updated dependencies [0f3abe234]
|
|
10
|
-
- victory-core@36.8.5-next.0
|
|
9
|
+
- Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
|
|
11
10
|
|
|
12
11
|
## 36.8.4
|
|
13
12
|
|
package/dist/victory-legend.js
CHANGED
|
@@ -11083,6 +11083,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11083
11083
|
/* harmony export */ "modifyProps": () => (/* binding */ modifyProps),
|
|
11084
11084
|
/* harmony export */ "omit": () => (/* binding */ omit),
|
|
11085
11085
|
/* harmony export */ "radiansToDegrees": () => (/* binding */ radiansToDegrees),
|
|
11086
|
+
/* harmony export */ "range": () => (/* binding */ range),
|
|
11086
11087
|
/* harmony export */ "reduceChildren": () => (/* binding */ reduceChildren),
|
|
11087
11088
|
/* harmony export */ "scalePoint": () => (/* binding */ scalePoint)
|
|
11088
11089
|
/* harmony export */ });
|
|
@@ -11362,6 +11363,38 @@ function getCurrentAxis(axis, horizontal) {
|
|
|
11362
11363
|
var otherAxis = axis === "x" ? "y" : "x";
|
|
11363
11364
|
return horizontal ? otherAxis : axis;
|
|
11364
11365
|
}
|
|
11366
|
+
/**
|
|
11367
|
+
* Creates an array of numbers (positive and/or negative) progressing
|
|
11368
|
+
* from start up to, but not including, end.
|
|
11369
|
+
* A step of -1 is used if a negative start is specified without an end or step.
|
|
11370
|
+
* If end is not specified, it's set to start with start then set to 0.
|
|
11371
|
+
*
|
|
11372
|
+
* @param start The length of the array to create, or the start value
|
|
11373
|
+
* @param end [The end value] If this is defined, start is the start value
|
|
11374
|
+
* @returns An array of the given length
|
|
11375
|
+
*/
|
|
11376
|
+
|
|
11377
|
+
function range(start, end, increment) {
|
|
11378
|
+
// when the end index is not given, start from 0
|
|
11379
|
+
var startIndex = end ? start : 0; // when the end index is not given, the end of the range is the start index
|
|
11380
|
+
|
|
11381
|
+
var endIndex = end ? end : start; // ensure endIndex is not a falsy value
|
|
11382
|
+
|
|
11383
|
+
if (!endIndex) endIndex = 0;
|
|
11384
|
+
var k = endIndex - startIndex; // the value range
|
|
11385
|
+
|
|
11386
|
+
var length = Math.abs(k); // the length of the range
|
|
11387
|
+
|
|
11388
|
+
var sign = k / length || 1; // the sign of the range (negative or positive)
|
|
11389
|
+
|
|
11390
|
+
var inc = increment || 1; // the step size of each increment
|
|
11391
|
+
// normalize the array length when dealing with floating point values
|
|
11392
|
+
|
|
11393
|
+
var arrayLength = Math.max(Math.ceil(length / inc), 0);
|
|
11394
|
+
return Array.from(Array(arrayLength), function (_, i) {
|
|
11395
|
+
return startIndex + i * sign * inc;
|
|
11396
|
+
});
|
|
11397
|
+
}
|
|
11365
11398
|
/**
|
|
11366
11399
|
* @param {Array} children: an array of child components
|
|
11367
11400
|
* @param {Function} iteratee: a function with arguments "child", "childName", and "parent"
|
|
@@ -11749,8 +11782,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11749
11782
|
/* harmony export */ "triangleDown": () => (/* binding */ triangleDown),
|
|
11750
11783
|
/* harmony export */ "triangleUp": () => (/* binding */ triangleUp)
|
|
11751
11784
|
/* harmony export */ });
|
|
11752
|
-
/* harmony import */ var
|
|
11753
|
-
/*
|
|
11785
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
11786
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [0, 1, 2, 2.5, 3] }]*/
|
|
11754
11787
|
|
|
11755
11788
|
function circle(x, y, size) {
|
|
11756
11789
|
return "M ".concat(x, ", ").concat(y, "\n m ").concat(-size, ", 0\n a ").concat(size, ", ").concat(size, " 0 1,0 ").concat(size * 2, ",0\n a ").concat(size, ", ").concat(size, " 0 1,0 ").concat(-size * 2, ",0");
|
|
@@ -11815,11 +11848,10 @@ function star(x, y, size) {
|
|
|
11815
11848
|
var angle = Math.PI / 5; // eslint-disable-line no-magic-numbers
|
|
11816
11849
|
// eslint-disable-next-line no-magic-numbers
|
|
11817
11850
|
|
|
11818
|
-
var starCoords =
|
|
11851
|
+
var starCoords = _helpers__WEBPACK_IMPORTED_MODULE_0__.range(10).map(function (index) {
|
|
11819
11852
|
var length = index % 2 === 0 ? baseSize : baseSize / 2;
|
|
11820
11853
|
return "".concat(length * Math.sin(angle * (index + 1)) + x, ",\n ").concat(length * Math.cos(angle * (index + 1)) + y);
|
|
11821
11854
|
});
|
|
11822
|
-
|
|
11823
11855
|
return "M ".concat(starCoords.join("L"), " z");
|
|
11824
11856
|
}
|
|
11825
11857
|
|