victory-scatter 37.3.2 → 37.3.4
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 +8 -0
- package/dist/victory-scatter.js +292 -246
- package/dist/victory-scatter.min.js +1 -1
- package/es/helper-methods.js +1 -1
- package/es/victory-scatter.d.ts +7 -7
- package/lib/helper-methods.js +1 -1
- package/lib/victory-scatter.d.ts +7 -7
- package/package.json +2 -30
- package/src/helper-methods.tsx +3 -1
package/es/helper-methods.js
CHANGED
|
@@ -16,7 +16,7 @@ export const getBubbleSize = (datum, props) => {
|
|
|
16
16
|
const zMin = Math.min(...zData);
|
|
17
17
|
const zMax = Math.max(...zData);
|
|
18
18
|
const getMaxRadius = () => {
|
|
19
|
-
const minPadding = Math.min(...Object.values(Helpers.getPadding(props)));
|
|
19
|
+
const minPadding = Math.min(...Object.values(Helpers.getPadding(props.padding)));
|
|
20
20
|
return Math.max(minPadding, 5); // eslint-disable-line no-magic-numbers
|
|
21
21
|
};
|
|
22
22
|
const maxRadius = maxBubbleSize || getMaxRadius();
|
package/es/victory-scatter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Data, Domain, EventPropTypeInterface, ScatterSymbolType, StringOrNumberOrCallback, EventsMixinClass, VictoryCommonProps, VictoryDatableProps, VictoryMultiLabelableProps, VictoryStyleInterface } from "victory-core";
|
|
3
|
-
export
|
|
3
|
+
export type VictoryScatterTTargetType = "data" | "labels" | "parent";
|
|
4
4
|
export interface VictoryScatterProps extends VictoryCommonProps, VictoryDatableProps, VictoryMultiLabelableProps {
|
|
5
5
|
bubbleProperty?: string;
|
|
6
6
|
children?: React.ReactElement | React.ReactElement[];
|
|
@@ -61,9 +61,9 @@ export declare const VictoryScatter: {
|
|
|
61
61
|
getAllEvents(props: any): any;
|
|
62
62
|
getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
|
|
63
63
|
renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
64
|
-
animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement
|
|
64
|
+
animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement;
|
|
65
65
|
renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
66
|
-
renderData(props: any, shouldRenderDatum?: (
|
|
66
|
+
renderData(props: any, shouldRenderDatum?: (datum: any) => boolean): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
67
67
|
context: unknown;
|
|
68
68
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
69
69
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -80,17 +80,17 @@ export declare const VictoryScatter: {
|
|
|
80
80
|
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
|
|
81
81
|
componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
82
82
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
83
|
-
componentEvents: import("@/victory-core/lib/victory-util/events").ComponentEvent
|
|
83
|
+
componentEvents: Array<import("@/victory-core/lib/victory-util/events").ComponentEvent>;
|
|
84
84
|
getSharedEventState: (key: string, value: string) => unknown;
|
|
85
85
|
baseProps: Record<string, object>;
|
|
86
86
|
dataKeys: string[];
|
|
87
87
|
hasEvents: unknown;
|
|
88
88
|
events: unknown;
|
|
89
89
|
};
|
|
90
|
-
getBaseProps?(props: import("victory-core").EventMixinCommonProps):
|
|
91
|
-
role?:
|
|
90
|
+
getBaseProps?(props: import("victory-core").EventMixinCommonProps): import("victory-core").EventMixinCalculatedValues["baseProps"];
|
|
91
|
+
role?: import("victory-core").VictoryComponentRole;
|
|
92
92
|
expectedComponents?: string[] | undefined;
|
|
93
|
-
getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode
|
|
93
|
+
getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: Array<React.ReactNode>, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
|
|
94
94
|
animationWhitelist?: string[] | undefined;
|
|
95
95
|
} & typeof VictoryScatterBase;
|
|
96
96
|
export {};
|
package/lib/helper-methods.js
CHANGED
|
@@ -23,7 +23,7 @@ const getBubbleSize = (datum, props) => {
|
|
|
23
23
|
const zMin = Math.min(...zData);
|
|
24
24
|
const zMax = Math.max(...zData);
|
|
25
25
|
const getMaxRadius = () => {
|
|
26
|
-
const minPadding = Math.min(...Object.values(_victoryCore.Helpers.getPadding(props)));
|
|
26
|
+
const minPadding = Math.min(...Object.values(_victoryCore.Helpers.getPadding(props.padding)));
|
|
27
27
|
return Math.max(minPadding, 5); // eslint-disable-line no-magic-numbers
|
|
28
28
|
};
|
|
29
29
|
const maxRadius = maxBubbleSize || getMaxRadius();
|
package/lib/victory-scatter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Data, Domain, EventPropTypeInterface, ScatterSymbolType, StringOrNumberOrCallback, EventsMixinClass, VictoryCommonProps, VictoryDatableProps, VictoryMultiLabelableProps, VictoryStyleInterface } from "victory-core";
|
|
3
|
-
export
|
|
3
|
+
export type VictoryScatterTTargetType = "data" | "labels" | "parent";
|
|
4
4
|
export interface VictoryScatterProps extends VictoryCommonProps, VictoryDatableProps, VictoryMultiLabelableProps {
|
|
5
5
|
bubbleProperty?: string;
|
|
6
6
|
children?: React.ReactElement | React.ReactElement[];
|
|
@@ -61,9 +61,9 @@ export declare const VictoryScatter: {
|
|
|
61
61
|
getAllEvents(props: any): any;
|
|
62
62
|
getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
|
|
63
63
|
renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
64
|
-
animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement
|
|
64
|
+
animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement;
|
|
65
65
|
renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
66
|
-
renderData(props: any, shouldRenderDatum?: (
|
|
66
|
+
renderData(props: any, shouldRenderDatum?: (datum: any) => boolean): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
67
67
|
context: unknown;
|
|
68
68
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
69
69
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -80,17 +80,17 @@ export declare const VictoryScatter: {
|
|
|
80
80
|
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
|
|
81
81
|
componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
82
82
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
83
|
-
componentEvents: import("@/victory-core/lib/victory-util/events").ComponentEvent
|
|
83
|
+
componentEvents: Array<import("@/victory-core/lib/victory-util/events").ComponentEvent>;
|
|
84
84
|
getSharedEventState: (key: string, value: string) => unknown;
|
|
85
85
|
baseProps: Record<string, object>;
|
|
86
86
|
dataKeys: string[];
|
|
87
87
|
hasEvents: unknown;
|
|
88
88
|
events: unknown;
|
|
89
89
|
};
|
|
90
|
-
getBaseProps?(props: import("victory-core").EventMixinCommonProps):
|
|
91
|
-
role?:
|
|
90
|
+
getBaseProps?(props: import("victory-core").EventMixinCommonProps): import("victory-core").EventMixinCalculatedValues["baseProps"];
|
|
91
|
+
role?: import("victory-core").VictoryComponentRole;
|
|
92
92
|
expectedComponents?: string[] | undefined;
|
|
93
|
-
getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode
|
|
93
|
+
getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: Array<React.ReactNode>, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
|
|
94
94
|
animationWhitelist?: string[] | undefined;
|
|
95
95
|
} & typeof VictoryScatterBase;
|
|
96
96
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-scatter",
|
|
3
|
-
"version": "37.3.
|
|
3
|
+
"version": "37.3.4",
|
|
4
4
|
"description": "Scatter Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
|
-
"victory-core": "37.3.
|
|
24
|
+
"victory-core": "37.3.4"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": ">=16.6.0"
|
|
@@ -180,32 +180,6 @@
|
|
|
180
180
|
"pnpm-lock.yaml"
|
|
181
181
|
]
|
|
182
182
|
},
|
|
183
|
-
"format": {
|
|
184
|
-
"command": "nps format:pkg",
|
|
185
|
-
"files": [
|
|
186
|
-
"src/**",
|
|
187
|
-
"*.json",
|
|
188
|
-
"../../.prettierignore",
|
|
189
|
-
"../../.prettierrc.json"
|
|
190
|
-
],
|
|
191
|
-
"output": [],
|
|
192
|
-
"packageLocks": [
|
|
193
|
-
"pnpm-lock.yaml"
|
|
194
|
-
]
|
|
195
|
-
},
|
|
196
|
-
"format:fix": {
|
|
197
|
-
"command": "pnpm run format || nps format:pkg:fix",
|
|
198
|
-
"files": [
|
|
199
|
-
"src/**",
|
|
200
|
-
"*.json",
|
|
201
|
-
"../../.prettierignore",
|
|
202
|
-
"../../.prettierrc.json"
|
|
203
|
-
],
|
|
204
|
-
"output": [],
|
|
205
|
-
"packageLocks": [
|
|
206
|
-
"pnpm-lock.yaml"
|
|
207
|
-
]
|
|
208
|
-
},
|
|
209
183
|
"lint": {
|
|
210
184
|
"command": "eslint src",
|
|
211
185
|
"files": [
|
|
@@ -268,8 +242,6 @@
|
|
|
268
242
|
"check": "wireit",
|
|
269
243
|
"types:check": "wireit",
|
|
270
244
|
"types:create": "wireit",
|
|
271
|
-
"format": "wireit",
|
|
272
|
-
"format:fix": "wireit",
|
|
273
245
|
"lint": "wireit",
|
|
274
246
|
"lint:fix": "wireit",
|
|
275
247
|
"jest": "wireit"
|
package/src/helper-methods.tsx
CHANGED
|
@@ -13,7 +13,9 @@ export const getBubbleSize = (datum, props) => {
|
|
|
13
13
|
const zMin = Math.min(...zData);
|
|
14
14
|
const zMax = Math.max(...zData);
|
|
15
15
|
const getMaxRadius = () => {
|
|
16
|
-
const minPadding = Math.min(
|
|
16
|
+
const minPadding = Math.min(
|
|
17
|
+
...Object.values(Helpers.getPadding(props.padding)),
|
|
18
|
+
);
|
|
17
19
|
return Math.max(minPadding, 5); // eslint-disable-line no-magic-numbers
|
|
18
20
|
};
|
|
19
21
|
const maxRadius = maxBubbleSize || getMaxRadius();
|