victory-histogram 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 +6 -7
- package/dist/victory-histogram.js +52 -158
- package/dist/victory-histogram.min.js +1 -1
- package/es/helper-methods.d.ts +5 -5
- package/es/index.d.ts +1 -1
- package/es/victory-histogram.d.ts +132 -132
- package/lib/helper-methods.d.ts +5 -5
- package/lib/index.d.ts +1 -1
- package/lib/victory-histogram.d.ts +132 -132
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
# victory-histogram
|
|
2
2
|
|
|
3
|
-
## 36.8.
|
|
3
|
+
## 36.8.6
|
|
4
|
+
|
|
5
|
+
## 36.8.5
|
|
4
6
|
|
|
5
7
|
### Patch Changes
|
|
6
8
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- victory-bar@36.8.5-next.0
|
|
11
|
-
- victory-core@36.8.5-next.0
|
|
12
|
-
- victory-vendor@36.8.5-next.0
|
|
9
|
+
- Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
|
|
10
|
+
|
|
11
|
+
* Replace instances of lodash.range with equivalent native code ([#2760](https://github.com/FormidableLabs/victory/pull/2760))
|
|
13
12
|
|
|
14
13
|
## 36.8.4
|
|
15
14
|
|
|
@@ -1829,44 +1829,6 @@ function basePropertyDeep(path) {
|
|
|
1829
1829
|
module.exports = basePropertyDeep;
|
|
1830
1830
|
|
|
1831
1831
|
|
|
1832
|
-
/***/ }),
|
|
1833
|
-
|
|
1834
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js":
|
|
1835
|
-
/*!************************************************************************************!*\
|
|
1836
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js ***!
|
|
1837
|
-
\************************************************************************************/
|
|
1838
|
-
/***/ ((module) => {
|
|
1839
|
-
|
|
1840
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1841
|
-
var nativeCeil = Math.ceil,
|
|
1842
|
-
nativeMax = Math.max;
|
|
1843
|
-
|
|
1844
|
-
/**
|
|
1845
|
-
* The base implementation of `_.range` and `_.rangeRight` which doesn't
|
|
1846
|
-
* coerce arguments.
|
|
1847
|
-
*
|
|
1848
|
-
* @private
|
|
1849
|
-
* @param {number} start The start of the range.
|
|
1850
|
-
* @param {number} end The end of the range.
|
|
1851
|
-
* @param {number} step The value to increment or decrement by.
|
|
1852
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
1853
|
-
* @returns {Array} Returns the range of numbers.
|
|
1854
|
-
*/
|
|
1855
|
-
function baseRange(start, end, step, fromRight) {
|
|
1856
|
-
var index = -1,
|
|
1857
|
-
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
|
|
1858
|
-
result = Array(length);
|
|
1859
|
-
|
|
1860
|
-
while (length--) {
|
|
1861
|
-
result[fromRight ? length : ++index] = start;
|
|
1862
|
-
start += step;
|
|
1863
|
-
}
|
|
1864
|
-
return result;
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
module.exports = baseRange;
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
1832
|
/***/ }),
|
|
1871
1833
|
|
|
1872
1834
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js":
|
|
@@ -2406,46 +2368,6 @@ function createFind(findIndexFunc) {
|
|
|
2406
2368
|
module.exports = createFind;
|
|
2407
2369
|
|
|
2408
2370
|
|
|
2409
|
-
/***/ }),
|
|
2410
|
-
|
|
2411
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js":
|
|
2412
|
-
/*!**************************************************************************************!*\
|
|
2413
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js ***!
|
|
2414
|
-
\**************************************************************************************/
|
|
2415
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2416
|
-
|
|
2417
|
-
var baseRange = __webpack_require__(/*! ./_baseRange */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js"),
|
|
2418
|
-
isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIterateeCall.js"),
|
|
2419
|
-
toFinite = __webpack_require__(/*! ./toFinite */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js");
|
|
2420
|
-
|
|
2421
|
-
/**
|
|
2422
|
-
* Creates a `_.range` or `_.rangeRight` function.
|
|
2423
|
-
*
|
|
2424
|
-
* @private
|
|
2425
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
2426
|
-
* @returns {Function} Returns the new range function.
|
|
2427
|
-
*/
|
|
2428
|
-
function createRange(fromRight) {
|
|
2429
|
-
return function(start, end, step) {
|
|
2430
|
-
if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
|
|
2431
|
-
end = step = undefined;
|
|
2432
|
-
}
|
|
2433
|
-
// Ensure the sign of `-0` is preserved.
|
|
2434
|
-
start = toFinite(start);
|
|
2435
|
-
if (end === undefined) {
|
|
2436
|
-
end = start;
|
|
2437
|
-
start = 0;
|
|
2438
|
-
} else {
|
|
2439
|
-
end = toFinite(end);
|
|
2440
|
-
}
|
|
2441
|
-
step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
|
|
2442
|
-
return baseRange(start, end, step, fromRight);
|
|
2443
|
-
};
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
module.exports = createRange;
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
2371
|
/***/ }),
|
|
2450
2372
|
|
|
2451
2373
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createSet.js":
|
|
@@ -5310,62 +5232,6 @@ function property(path) {
|
|
|
5310
5232
|
module.exports = property;
|
|
5311
5233
|
|
|
5312
5234
|
|
|
5313
|
-
/***/ }),
|
|
5314
|
-
|
|
5315
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js":
|
|
5316
|
-
/*!*******************************************************************************!*\
|
|
5317
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js ***!
|
|
5318
|
-
\*******************************************************************************/
|
|
5319
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
5320
|
-
|
|
5321
|
-
var createRange = __webpack_require__(/*! ./_createRange */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js");
|
|
5322
|
-
|
|
5323
|
-
/**
|
|
5324
|
-
* Creates an array of numbers (positive and/or negative) progressing from
|
|
5325
|
-
* `start` up to, but not including, `end`. A step of `-1` is used if a negative
|
|
5326
|
-
* `start` is specified without an `end` or `step`. If `end` is not specified,
|
|
5327
|
-
* it's set to `start` with `start` then set to `0`.
|
|
5328
|
-
*
|
|
5329
|
-
* **Note:** JavaScript follows the IEEE-754 standard for resolving
|
|
5330
|
-
* floating-point values which can produce unexpected results.
|
|
5331
|
-
*
|
|
5332
|
-
* @static
|
|
5333
|
-
* @since 0.1.0
|
|
5334
|
-
* @memberOf _
|
|
5335
|
-
* @category Util
|
|
5336
|
-
* @param {number} [start=0] The start of the range.
|
|
5337
|
-
* @param {number} end The end of the range.
|
|
5338
|
-
* @param {number} [step=1] The value to increment or decrement by.
|
|
5339
|
-
* @returns {Array} Returns the range of numbers.
|
|
5340
|
-
* @see _.inRange, _.rangeRight
|
|
5341
|
-
* @example
|
|
5342
|
-
*
|
|
5343
|
-
* _.range(4);
|
|
5344
|
-
* // => [0, 1, 2, 3]
|
|
5345
|
-
*
|
|
5346
|
-
* _.range(-4);
|
|
5347
|
-
* // => [0, -1, -2, -3]
|
|
5348
|
-
*
|
|
5349
|
-
* _.range(1, 5);
|
|
5350
|
-
* // => [1, 2, 3, 4]
|
|
5351
|
-
*
|
|
5352
|
-
* _.range(0, 20, 5);
|
|
5353
|
-
* // => [0, 5, 10, 15]
|
|
5354
|
-
*
|
|
5355
|
-
* _.range(0, -4, -1);
|
|
5356
|
-
* // => [0, -1, -2, -3]
|
|
5357
|
-
*
|
|
5358
|
-
* _.range(1, 4, 0);
|
|
5359
|
-
* // => [1, 1, 1]
|
|
5360
|
-
*
|
|
5361
|
-
* _.range(0);
|
|
5362
|
-
* // => []
|
|
5363
|
-
*/
|
|
5364
|
-
var range = createRange();
|
|
5365
|
-
|
|
5366
|
-
module.exports = range;
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
5235
|
/***/ }),
|
|
5370
5236
|
|
|
5371
5237
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/sortedUniq.js":
|
|
@@ -11354,17 +11220,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11354
11220
|
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_8__);
|
|
11355
11221
|
/* harmony import */ var lodash_last__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/last */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/last.js");
|
|
11356
11222
|
/* harmony import */ var lodash_last__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_last__WEBPACK_IMPORTED_MODULE_9__);
|
|
11357
|
-
/* harmony import */ var
|
|
11358
|
-
/* harmony import */ var
|
|
11359
|
-
/* harmony import */ var
|
|
11360
|
-
/* harmony import */ var
|
|
11361
|
-
/* harmony import */ var
|
|
11362
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);
|
|
11363
|
-
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
11223
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
|
|
11224
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_10__);
|
|
11225
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ "react");
|
|
11226
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);
|
|
11227
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
11364
11228
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
11365
|
-
/* harmony import */ var
|
|
11366
|
-
/* harmony import */ var
|
|
11367
|
-
|
|
11229
|
+
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
11230
|
+
/* harmony import */ var _immutable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./immutable */ "../../victory-core/es/victory-util/immutable.js");
|
|
11368
11231
|
|
|
11369
11232
|
|
|
11370
11233
|
|
|
@@ -11401,24 +11264,22 @@ function parseDatum(datum) {
|
|
|
11401
11264
|
errorX: true,
|
|
11402
11265
|
errorY: true
|
|
11403
11266
|
};
|
|
11404
|
-
return
|
|
11267
|
+
return _immutable__WEBPACK_IMPORTED_MODULE_12__.isImmutable(datum) ? _immutable__WEBPACK_IMPORTED_MODULE_12__.shallowToJS(datum, immutableDatumWhitelist) : datum;
|
|
11405
11268
|
}
|
|
11406
11269
|
|
|
11407
11270
|
function getLength(data) {
|
|
11408
|
-
return
|
|
11271
|
+
return _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(data) ? data.size : data.length;
|
|
11409
11272
|
} // Returns generated data for a given axis based on domain and sample from props
|
|
11410
11273
|
|
|
11411
11274
|
|
|
11412
11275
|
function generateDataArray(props, axis) {
|
|
11413
11276
|
var propsDomain = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_7___default()(props.domain) ? props.domain[axis] : props.domain;
|
|
11414
|
-
var domain = propsDomain ||
|
|
11277
|
+
var domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_13__.getBaseScale(props, axis).domain();
|
|
11415
11278
|
var samples = props.samples || 1;
|
|
11416
11279
|
var domainMax = Math.max.apply(Math, _toConsumableArray(domain));
|
|
11417
11280
|
var domainMin = Math.min.apply(Math, _toConsumableArray(domain));
|
|
11418
11281
|
var step = (domainMax - domainMin) / samples;
|
|
11419
|
-
|
|
11420
|
-
var values = lodash_range__WEBPACK_IMPORTED_MODULE_10___default()(domainMin, domainMax, step);
|
|
11421
|
-
|
|
11282
|
+
var values = _helpers__WEBPACK_IMPORTED_MODULE_14__.range(domainMin, domainMax, step);
|
|
11422
11283
|
return lodash_last__WEBPACK_IMPORTED_MODULE_9___default()(values) === domainMax ? values : values.concat(domainMax);
|
|
11423
11284
|
} // Returns sorted data. If no sort keys are provided, data is returned unaltered.
|
|
11424
11285
|
|
|
@@ -11445,8 +11306,8 @@ function sortData(dataset, sortKey) {
|
|
|
11445
11306
|
function cleanData(dataset, props) {
|
|
11446
11307
|
var smallNumber = 1 / Number.MAX_SAFE_INTEGER;
|
|
11447
11308
|
var scaleType = {
|
|
11448
|
-
x:
|
|
11449
|
-
y:
|
|
11309
|
+
x: _scale__WEBPACK_IMPORTED_MODULE_13__.getScaleType(props, "x"),
|
|
11310
|
+
y: _scale__WEBPACK_IMPORTED_MODULE_13__.getScaleType(props, "y")
|
|
11450
11311
|
};
|
|
11451
11312
|
|
|
11452
11313
|
if (scaleType.x !== "log" && scaleType.y !== "log") {
|
|
@@ -11581,7 +11442,7 @@ function createStringMap(props, axis) {
|
|
|
11581
11442
|
var stringsFromCategories = getStringsFromCategories(props, axis);
|
|
11582
11443
|
var stringsFromData = getStringsFromData(props, axis);
|
|
11583
11444
|
|
|
11584
|
-
var allStrings =
|
|
11445
|
+
var allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_10___default()([].concat(_toConsumableArray(stringsFromAxes), _toConsumableArray(stringsFromCategories), _toConsumableArray(stringsFromData)));
|
|
11585
11446
|
|
|
11586
11447
|
return allStrings.length === 0 ? null : allStrings.reduce(function (memo, string, index) {
|
|
11587
11448
|
memo[string] = index + 1;
|
|
@@ -11623,7 +11484,7 @@ function downsample(data, maxPoints) {
|
|
|
11623
11484
|
*/
|
|
11624
11485
|
|
|
11625
11486
|
function formatData(dataset, props, expectedKeys) {
|
|
11626
|
-
var isArrayOrIterable = Array.isArray(dataset) ||
|
|
11487
|
+
var isArrayOrIterable = Array.isArray(dataset) || _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(dataset);
|
|
11627
11488
|
|
|
11628
11489
|
if (!isArrayOrIterable || getLength(dataset) < 1) {
|
|
11629
11490
|
return [];
|
|
@@ -11636,7 +11497,7 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
11636
11497
|
expectedKeys = Array.isArray(expectedKeys) ? expectedKeys : defaultKeys;
|
|
11637
11498
|
|
|
11638
11499
|
var createAccessor = function (name) {
|
|
11639
|
-
return
|
|
11500
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_14__.createAccessor(props[name] !== undefined ? props[name] : name);
|
|
11640
11501
|
};
|
|
11641
11502
|
|
|
11642
11503
|
var accessor = expectedKeys.reduce(function (memo, type) {
|
|
@@ -11773,14 +11634,14 @@ function getStringsFromCategories(props, axis) {
|
|
|
11773
11634
|
*/
|
|
11774
11635
|
|
|
11775
11636
|
function getStringsFromData(props, axis) {
|
|
11776
|
-
var isArrayOrIterable = Array.isArray(props.data) ||
|
|
11637
|
+
var isArrayOrIterable = Array.isArray(props.data) || _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(props.data);
|
|
11777
11638
|
|
|
11778
11639
|
if (!isArrayOrIterable) {
|
|
11779
11640
|
return [];
|
|
11780
11641
|
}
|
|
11781
11642
|
|
|
11782
11643
|
var key = props[axis] === undefined ? axis : props[axis];
|
|
11783
|
-
var accessor =
|
|
11644
|
+
var accessor = _helpers__WEBPACK_IMPORTED_MODULE_14__.createAccessor(key); // support immutable data
|
|
11784
11645
|
|
|
11785
11646
|
var data = props.data.reduce(function (memo, d) {
|
|
11786
11647
|
memo.push(parseDatum(d));
|
|
@@ -11817,7 +11678,7 @@ function isDataComponent(component) {
|
|
|
11817
11678
|
var role = getRole(component);
|
|
11818
11679
|
|
|
11819
11680
|
if (role === "portal") {
|
|
11820
|
-
var children =
|
|
11681
|
+
var children = react__WEBPACK_IMPORTED_MODULE_11___default().Children.toArray(component.props.children);
|
|
11821
11682
|
role = children.length ? getRole(children[0]) : "";
|
|
11822
11683
|
}
|
|
11823
11684
|
|
|
@@ -12807,6 +12668,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12807
12668
|
/* harmony export */ "modifyProps": () => (/* binding */ modifyProps),
|
|
12808
12669
|
/* harmony export */ "omit": () => (/* binding */ omit),
|
|
12809
12670
|
/* harmony export */ "radiansToDegrees": () => (/* binding */ radiansToDegrees),
|
|
12671
|
+
/* harmony export */ "range": () => (/* binding */ range),
|
|
12810
12672
|
/* harmony export */ "reduceChildren": () => (/* binding */ reduceChildren),
|
|
12811
12673
|
/* harmony export */ "scalePoint": () => (/* binding */ scalePoint)
|
|
12812
12674
|
/* harmony export */ });
|
|
@@ -13086,6 +12948,38 @@ function getCurrentAxis(axis, horizontal) {
|
|
|
13086
12948
|
var otherAxis = axis === "x" ? "y" : "x";
|
|
13087
12949
|
return horizontal ? otherAxis : axis;
|
|
13088
12950
|
}
|
|
12951
|
+
/**
|
|
12952
|
+
* Creates an array of numbers (positive and/or negative) progressing
|
|
12953
|
+
* from start up to, but not including, end.
|
|
12954
|
+
* A step of -1 is used if a negative start is specified without an end or step.
|
|
12955
|
+
* If end is not specified, it's set to start with start then set to 0.
|
|
12956
|
+
*
|
|
12957
|
+
* @param start The length of the array to create, or the start value
|
|
12958
|
+
* @param end [The end value] If this is defined, start is the start value
|
|
12959
|
+
* @returns An array of the given length
|
|
12960
|
+
*/
|
|
12961
|
+
|
|
12962
|
+
function range(start, end, increment) {
|
|
12963
|
+
// when the end index is not given, start from 0
|
|
12964
|
+
var startIndex = end ? start : 0; // when the end index is not given, the end of the range is the start index
|
|
12965
|
+
|
|
12966
|
+
var endIndex = end ? end : start; // ensure endIndex is not a falsy value
|
|
12967
|
+
|
|
12968
|
+
if (!endIndex) endIndex = 0;
|
|
12969
|
+
var k = endIndex - startIndex; // the value range
|
|
12970
|
+
|
|
12971
|
+
var length = Math.abs(k); // the length of the range
|
|
12972
|
+
|
|
12973
|
+
var sign = k / length || 1; // the sign of the range (negative or positive)
|
|
12974
|
+
|
|
12975
|
+
var inc = increment || 1; // the step size of each increment
|
|
12976
|
+
// normalize the array length when dealing with floating point values
|
|
12977
|
+
|
|
12978
|
+
var arrayLength = Math.max(Math.ceil(length / inc), 0);
|
|
12979
|
+
return Array.from(Array(arrayLength), function (_, i) {
|
|
12980
|
+
return startIndex + i * sign * inc;
|
|
12981
|
+
});
|
|
12982
|
+
}
|
|
13089
12983
|
/**
|
|
13090
12984
|
* @param {Array} children: an array of child components
|
|
13091
12985
|
* @param {Function} iteratee: a function with arguments "child", "childName", and "parent"
|