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.
@@ -1,4 +1,4 @@
1
- import { orderBy, defaults, uniq, groupBy, keys, isNaN, isNil } from "lodash";
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
 
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { flatten, isNil } from "lodash";
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
  }