victory-box-plot 36.9.1 → 36.9.2-next.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 +13 -0
- package/dist/victory-box-plot.js +3955 -5337
- package/dist/victory-box-plot.min.js +1 -1
- package/es/helper-methods.d.ts +3 -3
- package/es/helper-methods.js +268 -322
- package/es/index.d.ts +1 -1
- package/es/victory-box-plot.d.ts +139 -139
- package/es/victory-box-plot.js +87 -156
- package/lib/helper-methods.d.ts +3 -3
- package/lib/helper-methods.js +268 -339
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -2
- package/lib/victory-box-plot.d.ts +139 -139
- package/lib/victory-box-plot.js +87 -161
- package/package.json +9 -13
- package/src/helper-methods.tsx +3 -3
- package/src/victory-box-plot.tsx +8 -8
package/src/helper-methods.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { orderBy, defaults, uniq, groupBy, keys
|
|
1
|
+
import { orderBy, defaults, uniq, groupBy, keys } from "lodash";
|
|
2
2
|
import { Helpers, Scale, Domain, Data, Collection } from "victory-core";
|
|
3
3
|
import {
|
|
4
4
|
min as d3Min,
|
|
@@ -30,7 +30,7 @@ const checkProcessedData = (data) => {
|
|
|
30
30
|
return false;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const nanToNull = (val) => (isNaN(val) ? null : val);
|
|
33
|
+
const nanToNull = (val) => (Number.isNaN(val) ? null : val);
|
|
34
34
|
|
|
35
35
|
const getSummaryStatistics = (data) => {
|
|
36
36
|
const dependentVars = data.map((datum) => datum._y);
|
|
@@ -493,7 +493,7 @@ export const getBaseProps = (initialProps, fallbackProps) => {
|
|
|
493
493
|
};
|
|
494
494
|
const boxScale = scale.y;
|
|
495
495
|
return data.reduce((acc, datum, index) => {
|
|
496
|
-
const eventKey = !isNil(datum.eventKey) ? datum.eventKey : index;
|
|
496
|
+
const eventKey = !Helpers.isNil(datum.eventKey) ? datum.eventKey : index;
|
|
497
497
|
|
|
498
498
|
if (isDatumOutOfBounds(datum, domain)) return acc;
|
|
499
499
|
|
package/src/victory-box-plot.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { flatten
|
|
2
|
+
import { flatten } from "lodash";
|
|
3
3
|
import {
|
|
4
4
|
Helpers,
|
|
5
5
|
VictoryLabel,
|
|
@@ -234,14 +234,14 @@ class VictoryBoxPlotBase extends React.Component<VictoryBoxPlotProps> {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
shouldRenderDatum(datum) {
|
|
237
|
-
const hasX = !isNil(datum._x);
|
|
238
|
-
const hasY = !isNil(datum._y);
|
|
237
|
+
const hasX = !Helpers.isNil(datum._x);
|
|
238
|
+
const hasY = !Helpers.isNil(datum._y);
|
|
239
239
|
const hasSummaryStatistics =
|
|
240
|
-
!isNil(datum._min) &&
|
|
241
|
-
!isNil(datum._max) &&
|
|
242
|
-
!isNil(datum._median) &&
|
|
243
|
-
!isNil(datum._q1) &&
|
|
244
|
-
!isNil(datum._q3);
|
|
240
|
+
!Helpers.isNil(datum._min) &&
|
|
241
|
+
!Helpers.isNil(datum._max) &&
|
|
242
|
+
!Helpers.isNil(datum._median) &&
|
|
243
|
+
!Helpers.isNil(datum._q1) &&
|
|
244
|
+
!Helpers.isNil(datum._q3);
|
|
245
245
|
|
|
246
246
|
return hasSummaryStatistics && (this.props.horizontal ? hasY : hasX);
|
|
247
247
|
}
|