victory-voronoi
Advanced tools
Comparing version 35.8.1 to 35.9.0
@@ -20,3 +20,6 @@ import * as React from "react"; | ||
VictoryMultiLabelableProps { | ||
events?: EventPropTypeInterface<string, string | number | (string | number)[]>[]; | ||
events?: EventPropTypeInterface< | ||
string, | ||
string | number | (string | number)[] | ||
>[]; | ||
type?: number; | ||
@@ -23,0 +26,0 @@ sortKey?: StringOrNumberOrCallback | string[]; |
@@ -20,3 +20,6 @@ import * as React from "react"; | ||
VictoryMultiLabelableProps { | ||
events?: EventPropTypeInterface<string, string | number | (string | number)[]>[]; | ||
events?: EventPropTypeInterface< | ||
string, | ||
string | number | (string | number)[] | ||
>[]; | ||
type?: number; | ||
@@ -23,0 +26,0 @@ sortKey?: StringOrNumberOrCallback | string[]; |
{ | ||
"name": "victory-voronoi", | ||
"version": "35.8.1", | ||
"version": "35.9.0", | ||
"description": "Voronoi Component for Victory", | ||
@@ -25,3 +25,3 @@ "keywords": [ | ||
"prop-types": "^15.5.8", | ||
"victory-core": "^35.8.1" | ||
"victory-core": "^35.9.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "scripts": { |
@@ -56,3 +56,5 @@ import { assign, without, isNil } from "lodash"; | ||
const polygons = voronoi.polygons(data); | ||
const origin = props.polar ? props.origin || Helpers.getPolarOrigin(props) : undefined; | ||
const origin = props.polar | ||
? props.origin || Helpers.getPolarOrigin(props) | ||
: undefined; | ||
return { domain, data, scale, style, polygons, origin }; | ||
@@ -118,3 +120,6 @@ }; | ||
const text = LabelHelpers.getText(props, datum, index); | ||
if ((text !== undefined && text !== null) || (labels && (events || sharedEvents))) { | ||
if ( | ||
(text !== undefined && text !== null) || | ||
(labels && (events || sharedEvents)) | ||
) { | ||
childProps[eventKey].labels = LabelHelpers.getProps(props, index); | ||
@@ -121,0 +126,0 @@ } |
@@ -20,3 +20,6 @@ import * as React from "react"; | ||
VictoryMultiLabelableProps { | ||
events?: EventPropTypeInterface<string, string | number | (string | number)[]>[]; | ||
events?: EventPropTypeInterface< | ||
string, | ||
string | number | (string | number)[] | ||
>[]; | ||
type?: number; | ||
@@ -23,0 +26,0 @@ sortKey?: StringOrNumberOrCallback | string[]; |
@@ -80,3 +80,5 @@ import React from "react"; | ||
const children = this.renderData(props); | ||
return props.standalone ? this.renderContainer(props.containerComponent, children) : children; | ||
return props.standalone | ||
? this.renderContainer(props.containerComponent, children) | ||
: children; | ||
} | ||
@@ -83,0 +85,0 @@ } |
@@ -9,3 +9,5 @@ /*eslint no-magic-numbers: ["error", { "ignore": [2] }]*/ | ||
const { polygon } = props; | ||
return Array.isArray(polygon) && polygon.length ? `M ${props.polygon.join("L")} Z` : ""; | ||
return Array.isArray(polygon) && polygon.length | ||
? `M ${props.polygon.join("L")} Z` | ||
: ""; | ||
}; | ||
@@ -72,6 +74,12 @@ | ||
return React.cloneElement(props.groupComponent, {}, [voronoiClipPath, circle]); | ||
return React.cloneElement(props.groupComponent, {}, [ | ||
voronoiClipPath, | ||
circle | ||
]); | ||
} | ||
return React.cloneElement(props.pathComponent, { ...sharedProps, d: voronoiPath }); | ||
return React.cloneElement(props.pathComponent, { | ||
...sharedProps, | ||
d: voronoiPath | ||
}); | ||
}; | ||
@@ -78,0 +86,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1341434
23407
Updatedvictory-core@^35.9.0