victory-scatter 37.3.1 → 37.3.3
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 +305 -279
- package/dist/victory-scatter.min.js +1 -1
- package/es/helper-methods.js +1 -1
- package/es/victory-scatter.d.ts +7 -7
- package/es/victory-scatter.js +1 -1
- package/lib/helper-methods.js +1 -1
- package/lib/victory-scatter.d.ts +7 -7
- package/lib/victory-scatter.js +1 -1
- package/package.json +6 -38
- package/src/helper-methods.tsx +3 -1
- package/src/victory-scatter.tsx +1 -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/es/victory-scatter.js
CHANGED
|
@@ -9,7 +9,7 @@ const fallbackProps = {
|
|
|
9
9
|
symbol: "circle"
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Draw area charts with React. VictoryArea is a composable component, so it doesn't include axes.
|
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/lib/victory-scatter.js
CHANGED
|
@@ -16,7 +16,7 @@ const fallbackProps = {
|
|
|
16
16
|
symbol: "circle"
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Draw area charts with React. VictoryArea is a composable component, so it doesn't include axes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-scatter",
|
|
3
|
-
"version": "37.3.
|
|
3
|
+
"version": "37.3.3",
|
|
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.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": ">=16.6.0"
|
|
@@ -180,38 +180,10 @@
|
|
|
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
|
-
"command": "
|
|
184
|
+
"command": "eslint src",
|
|
211
185
|
"files": [
|
|
212
|
-
"src/**"
|
|
213
|
-
"../../.eslintignore",
|
|
214
|
-
"../../.eslintrc.js"
|
|
186
|
+
"src/**"
|
|
215
187
|
],
|
|
216
188
|
"output": [],
|
|
217
189
|
"dependencies": [
|
|
@@ -224,11 +196,9 @@
|
|
|
224
196
|
]
|
|
225
197
|
},
|
|
226
198
|
"lint:fix": {
|
|
227
|
-
"command": "
|
|
199
|
+
"command": "eslint --fix src",
|
|
228
200
|
"files": [
|
|
229
|
-
"src/**"
|
|
230
|
-
"../../.eslintignore",
|
|
231
|
-
"../../.eslintrc.js"
|
|
201
|
+
"src/**"
|
|
232
202
|
],
|
|
233
203
|
"output": [],
|
|
234
204
|
"dependencies": [
|
|
@@ -272,8 +242,6 @@
|
|
|
272
242
|
"check": "wireit",
|
|
273
243
|
"types:check": "wireit",
|
|
274
244
|
"types:create": "wireit",
|
|
275
|
-
"format": "wireit",
|
|
276
|
-
"format:fix": "wireit",
|
|
277
245
|
"lint": "wireit",
|
|
278
246
|
"lint:fix": "wireit",
|
|
279
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();
|
package/src/victory-scatter.tsx
CHANGED
|
@@ -49,7 +49,7 @@ export interface VictoryScatterProps
|
|
|
49
49
|
symbol?: ScatterSymbolType | { (data: any): ScatterSymbolType };
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
53
53
|
interface VictoryScatterBase extends EventsMixinClass<VictoryScatterProps> {}
|
|
54
54
|
|
|
55
55
|
/**
|