victory-box-plot 36.5.3 → 36.6.2
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 +35 -0
- package/dist/victory-box-plot.js +5046 -2144
- package/dist/victory-box-plot.min.js +1 -1
- package/es/helper-methods.d.ts +4 -0
- package/es/index.d.ts +2 -77
- package/es/index.js +1 -1
- package/es/victory-box-plot.d.ts +265 -0
- package/es/victory-box-plot.js +22 -22
- package/lib/helper-methods.d.ts +4 -0
- package/lib/index.d.ts +2 -77
- package/lib/index.js +11 -8
- package/lib/victory-box-plot.d.ts +265 -0
- package/lib/victory-box-plot.js +24 -26
- package/package.json +260 -8
- package/src/{helper-methods.js → helper-methods.tsx} +1 -1
- package/src/index.ts +1 -0
- package/src/{victory-box-plot.js → victory-box-plot.tsx} +102 -15
- package/src/index.d.ts +0 -77
- package/src/index.js +0 -1
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { EventPropTypeInterface, DomainPropType, DomainPaddingPropType, OrientationTypes, StringOrNumberOrCallback, VictoryDatableProps, VictoryCommonProps, VictoryStyleObject, VictoryLabelStyleObject, EventsMixinClass } from "victory-core";
|
|
4
|
+
export declare type VictoryBoxPlotLabelType = boolean | (string | number)[] | {
|
|
5
|
+
(): any;
|
|
6
|
+
} | {
|
|
7
|
+
(data: any): string | null;
|
|
8
|
+
};
|
|
9
|
+
export interface VictoryBoxPlotStyleInterface {
|
|
10
|
+
parent?: VictoryStyleObject;
|
|
11
|
+
max?: VictoryStyleObject;
|
|
12
|
+
maxLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
13
|
+
min?: VictoryStyleObject;
|
|
14
|
+
minLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
15
|
+
median?: VictoryStyleObject;
|
|
16
|
+
medianLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
17
|
+
q1?: VictoryStyleObject;
|
|
18
|
+
q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
19
|
+
q3?: VictoryStyleObject;
|
|
20
|
+
q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
21
|
+
}
|
|
22
|
+
export interface VictoryBoxPlotLabelOrientationInterface {
|
|
23
|
+
max?: OrientationTypes;
|
|
24
|
+
min?: OrientationTypes;
|
|
25
|
+
median?: OrientationTypes;
|
|
26
|
+
q1?: OrientationTypes;
|
|
27
|
+
q3?: OrientationTypes;
|
|
28
|
+
}
|
|
29
|
+
export interface VictoryBoxPlotProps extends VictoryCommonProps, VictoryDatableProps {
|
|
30
|
+
boxWidth?: number;
|
|
31
|
+
datum?: any;
|
|
32
|
+
domain?: DomainPropType;
|
|
33
|
+
domainPadding?: DomainPaddingPropType;
|
|
34
|
+
events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
|
|
35
|
+
eventKey?: StringOrNumberOrCallback;
|
|
36
|
+
horizontal?: boolean;
|
|
37
|
+
labelOrientation?: OrientationTypes | VictoryBoxPlotLabelOrientationInterface;
|
|
38
|
+
labels?: boolean;
|
|
39
|
+
max?: StringOrNumberOrCallback | string[];
|
|
40
|
+
maxComponent?: React.ReactElement;
|
|
41
|
+
maxLabelComponent?: React.ReactElement;
|
|
42
|
+
maxLabels?: VictoryBoxPlotLabelType;
|
|
43
|
+
median?: StringOrNumberOrCallback | string[];
|
|
44
|
+
medianComponent?: React.ReactElement;
|
|
45
|
+
medianLabelComponent?: React.ReactElement;
|
|
46
|
+
medianLabels?: VictoryBoxPlotLabelType;
|
|
47
|
+
min?: StringOrNumberOrCallback | string[];
|
|
48
|
+
minComponent?: React.ReactElement;
|
|
49
|
+
minLabelComponent?: React.ReactElement;
|
|
50
|
+
minLabels?: VictoryBoxPlotLabelType;
|
|
51
|
+
q1?: StringOrNumberOrCallback | string[];
|
|
52
|
+
q1Component?: React.ReactElement;
|
|
53
|
+
q1LabelComponent?: React.ReactElement;
|
|
54
|
+
q1Labels?: VictoryBoxPlotLabelType;
|
|
55
|
+
q3?: StringOrNumberOrCallback | string[];
|
|
56
|
+
q3Component?: React.ReactElement;
|
|
57
|
+
q3LabelComponent?: React.ReactElement;
|
|
58
|
+
q3Labels?: VictoryBoxPlotLabelType;
|
|
59
|
+
style?: VictoryBoxPlotStyleInterface;
|
|
60
|
+
text?: StringOrNumberOrCallback | string[];
|
|
61
|
+
whiskerWidth?: number;
|
|
62
|
+
}
|
|
63
|
+
interface VictoryBoxPlotBase extends EventsMixinClass<VictoryBoxPlotProps> {
|
|
64
|
+
}
|
|
65
|
+
declare class VictoryBoxPlotBase extends React.Component<VictoryBoxPlotProps> {
|
|
66
|
+
static animationWhitelist: Array<keyof VictoryBoxPlotProps>;
|
|
67
|
+
static displayName: string;
|
|
68
|
+
static role: string;
|
|
69
|
+
static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
|
|
70
|
+
static propTypes: {
|
|
71
|
+
boxWidth: PropTypes.Requireable<number>;
|
|
72
|
+
events: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
73
|
+
target: PropTypes.Requireable<string>;
|
|
74
|
+
eventKey: PropTypes.Requireable<string | number | any[]>;
|
|
75
|
+
eventHandlers: PropTypes.Requireable<object>;
|
|
76
|
+
}> | null | undefined)[]>;
|
|
77
|
+
horizontal: PropTypes.Requireable<boolean>;
|
|
78
|
+
labelOrientation: PropTypes.Requireable<string | PropTypes.InferProps<{
|
|
79
|
+
q1: PropTypes.Requireable<string>;
|
|
80
|
+
q3: PropTypes.Requireable<string>;
|
|
81
|
+
min: PropTypes.Requireable<string>;
|
|
82
|
+
max: PropTypes.Requireable<string>;
|
|
83
|
+
median: PropTypes.Requireable<string>;
|
|
84
|
+
}>>;
|
|
85
|
+
labels: PropTypes.Requireable<boolean>;
|
|
86
|
+
max: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
|
|
87
|
+
maxComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
88
|
+
maxLabelComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
89
|
+
maxLabels: PropTypes.Requireable<boolean | any[] | ((...args: any[]) => any)>;
|
|
90
|
+
median: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
|
|
91
|
+
medianComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
92
|
+
medianLabelComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
93
|
+
medianLabels: PropTypes.Requireable<boolean | any[] | ((...args: any[]) => any)>;
|
|
94
|
+
min: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
|
|
95
|
+
minComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
96
|
+
minLabelComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
97
|
+
minLabels: PropTypes.Requireable<boolean | any[] | ((...args: any[]) => any)>;
|
|
98
|
+
q1: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
|
|
99
|
+
q1Component: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
100
|
+
q1LabelComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
101
|
+
q1Labels: PropTypes.Requireable<boolean | any[] | ((...args: any[]) => any)>;
|
|
102
|
+
q3: PropTypes.Requireable<string | number | ((...args: any[]) => any) | (string | null | undefined)[]>;
|
|
103
|
+
q3Component: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
104
|
+
q3LabelComponent: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
105
|
+
q3Labels: PropTypes.Requireable<boolean | any[] | ((...args: any[]) => any)>;
|
|
106
|
+
style: PropTypes.Requireable<PropTypes.InferProps<{
|
|
107
|
+
boxes: PropTypes.Requireable<object>;
|
|
108
|
+
labels: PropTypes.Requireable<object>;
|
|
109
|
+
parent: PropTypes.Requireable<object>;
|
|
110
|
+
max: PropTypes.Requireable<object>;
|
|
111
|
+
maxLabels: PropTypes.Requireable<object>;
|
|
112
|
+
median: PropTypes.Requireable<object>;
|
|
113
|
+
medianLabels: PropTypes.Requireable<object>;
|
|
114
|
+
min: PropTypes.Requireable<object>;
|
|
115
|
+
minLabels: PropTypes.Requireable<object>;
|
|
116
|
+
q1: PropTypes.Requireable<object>;
|
|
117
|
+
q1Labels: PropTypes.Requireable<object>;
|
|
118
|
+
q3: PropTypes.Requireable<object>;
|
|
119
|
+
q3Labels: PropTypes.Requireable<object>;
|
|
120
|
+
whiskers: PropTypes.Requireable<object>;
|
|
121
|
+
}>>;
|
|
122
|
+
whiskerWidth: PropTypes.Requireable<number>;
|
|
123
|
+
categories?: React.Validator<import("victory-core").CategoryPropType | null | undefined> | undefined;
|
|
124
|
+
data?: React.Validator<readonly any[] | null | undefined> | undefined;
|
|
125
|
+
dataComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
126
|
+
domain?: React.Validator<import("victory-core").ForAxes<import("victory-core").DomainTuple> | null | undefined> | undefined;
|
|
127
|
+
domainPadding?: React.Validator<import("victory-core").ForAxes<import("victory-core").PaddingType> | null | undefined> | undefined;
|
|
128
|
+
samples?: React.Validator<number | null | undefined> | undefined;
|
|
129
|
+
sortKey?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
130
|
+
sortOrder?: React.Validator<import("victory-core").SortOrderPropType | null | undefined> | undefined;
|
|
131
|
+
x?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
132
|
+
y?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
133
|
+
y0?: React.Validator<import("victory-core").DataGetterPropType | null | undefined> | undefined;
|
|
134
|
+
theme?: React.Validator<import("victory-core").VictoryThemeDefinition | null | undefined> | undefined;
|
|
135
|
+
animate?: React.Validator<boolean | import("victory-core").AnimatePropTypeInterface | null | undefined> | undefined;
|
|
136
|
+
colorScale?: React.Validator<import("victory-core").ColorScalePropType | null | undefined> | undefined;
|
|
137
|
+
containerComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
138
|
+
externalEventMutations?: React.Validator<import("victory-core").EventCallbackInterface<string | string[], import("victory-core").StringOrNumberOrList>[] | null | undefined> | undefined;
|
|
139
|
+
groupComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
140
|
+
height?: React.Validator<number | null | undefined> | undefined;
|
|
141
|
+
maxDomain?: React.Validator<number | {
|
|
142
|
+
x?: number | undefined;
|
|
143
|
+
y?: number | undefined;
|
|
144
|
+
} | null | undefined> | undefined;
|
|
145
|
+
minDomain?: React.Validator<number | {
|
|
146
|
+
x?: number | undefined;
|
|
147
|
+
y?: number | undefined;
|
|
148
|
+
} | null | undefined> | undefined;
|
|
149
|
+
name?: React.Validator<string | null | undefined> | undefined;
|
|
150
|
+
origin?: React.Validator<import("victory-core").OriginType | null | undefined> | undefined;
|
|
151
|
+
padding?: React.Validator<import("victory-core").PaddingProps | null | undefined> | undefined;
|
|
152
|
+
polar?: React.Validator<boolean | null | undefined> | undefined;
|
|
153
|
+
range?: React.Validator<import("victory-core").ForAxes<import("victory-core").RangeTuple> | null | undefined> | undefined;
|
|
154
|
+
scale?: React.Validator<import("victory-core").D3Scale<any> | import("victory-core").ScaleName | {
|
|
155
|
+
x?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
|
|
156
|
+
y?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
|
|
157
|
+
} | null | undefined> | undefined;
|
|
158
|
+
sharedEvents?: React.Validator<{
|
|
159
|
+
events: any[];
|
|
160
|
+
getEventState: Function;
|
|
161
|
+
} | null | undefined> | undefined;
|
|
162
|
+
singleQuadrantDomainPadding?: React.Validator<boolean | {
|
|
163
|
+
x?: boolean | undefined;
|
|
164
|
+
y?: boolean | undefined;
|
|
165
|
+
} | null | undefined> | undefined;
|
|
166
|
+
standalone?: React.Validator<boolean | null | undefined> | undefined;
|
|
167
|
+
width?: React.Validator<number | null | undefined> | undefined;
|
|
168
|
+
};
|
|
169
|
+
static defaultProps: {
|
|
170
|
+
containerComponent: JSX.Element;
|
|
171
|
+
data: {
|
|
172
|
+
x: number;
|
|
173
|
+
min: number;
|
|
174
|
+
q1: number;
|
|
175
|
+
median: number;
|
|
176
|
+
q3: number;
|
|
177
|
+
max: number;
|
|
178
|
+
}[];
|
|
179
|
+
dataComponent: JSX.Element;
|
|
180
|
+
groupComponent: JSX.Element;
|
|
181
|
+
maxComponent: JSX.Element;
|
|
182
|
+
maxLabelComponent: JSX.Element;
|
|
183
|
+
medianComponent: JSX.Element;
|
|
184
|
+
medianLabelComponent: JSX.Element;
|
|
185
|
+
minComponent: JSX.Element;
|
|
186
|
+
minLabelComponent: JSX.Element;
|
|
187
|
+
q1Component: JSX.Element;
|
|
188
|
+
q1LabelComponent: JSX.Element;
|
|
189
|
+
q3Component: JSX.Element;
|
|
190
|
+
q3LabelComponent: JSX.Element;
|
|
191
|
+
samples: number;
|
|
192
|
+
sortKey: string;
|
|
193
|
+
sortOrder: string;
|
|
194
|
+
standalone: boolean;
|
|
195
|
+
theme: import("victory-core").VictoryThemeDefinition;
|
|
196
|
+
};
|
|
197
|
+
static getDomain: (props: any, axis: any) => any;
|
|
198
|
+
static getData: (props: any) => any;
|
|
199
|
+
static getBaseProps: (props: any) => any;
|
|
200
|
+
static expectedComponents: Array<keyof VictoryBoxPlotProps>;
|
|
201
|
+
renderBoxPlot(props: any): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
202
|
+
shouldAnimate(): boolean;
|
|
203
|
+
shouldRenderDatum(datum: any): boolean;
|
|
204
|
+
render(): React.ReactElement;
|
|
205
|
+
}
|
|
206
|
+
export declare const VictoryBoxPlot: {
|
|
207
|
+
new (props: import("victory-core").EventMixinCommonProps): {
|
|
208
|
+
state: {};
|
|
209
|
+
getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
|
|
210
|
+
getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
|
|
211
|
+
getEvents: (p: any, target: any, eventKey: any) => any;
|
|
212
|
+
externalMutations: {} | undefined;
|
|
213
|
+
calculatedState: {};
|
|
214
|
+
globalEvents: {};
|
|
215
|
+
prevGlobalEventKeys: string[];
|
|
216
|
+
boundGlobalEvents: {};
|
|
217
|
+
shouldComponentUpdate(nextProps: import("victory-core").EventMixinCommonProps): boolean;
|
|
218
|
+
componentDidMount(): void;
|
|
219
|
+
componentDidUpdate(prevProps: any): void;
|
|
220
|
+
componentWillUnmount(): void;
|
|
221
|
+
addGlobalListener(key: any): void;
|
|
222
|
+
removeGlobalListener(key: any): void;
|
|
223
|
+
getStateChanges(props: any): {};
|
|
224
|
+
applyExternalMutations(props: any, externalMutations: any): void;
|
|
225
|
+
getCalculatedValues(props: any): import("victory-core").EventMixinCalculatedValues;
|
|
226
|
+
getExternalMutations(props: import("victory-core").EventMixinCommonProps): {} | undefined;
|
|
227
|
+
cacheValues(obj: any): void;
|
|
228
|
+
getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
|
|
229
|
+
getAllEvents(props: any): any;
|
|
230
|
+
getComponentProps(component: any, type: any, index: any): any;
|
|
231
|
+
renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
232
|
+
animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
233
|
+
renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
234
|
+
renderData(props: any, shouldRenderDatum?: ((datum: any) => boolean) | undefined): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
235
|
+
context: unknown;
|
|
236
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
237
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
238
|
+
render(): React.ReactNode;
|
|
239
|
+
readonly props: Readonly<import("victory-core").EventMixinCommonProps>;
|
|
240
|
+
refs: {
|
|
241
|
+
[key: string]: React.ReactInstance;
|
|
242
|
+
};
|
|
243
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
244
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("victory-core").EventMixinCommonProps>, prevState: Readonly<{}>): any;
|
|
245
|
+
componentWillMount?(): void;
|
|
246
|
+
UNSAFE_componentWillMount?(): void;
|
|
247
|
+
componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
|
|
248
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
|
|
249
|
+
componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
250
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
251
|
+
componentEvents: import("victory-core/lib/victory-util/events").ComponentEvent[];
|
|
252
|
+
getSharedEventState: (key: string, value: string) => unknown;
|
|
253
|
+
baseProps: Record<string, object>;
|
|
254
|
+
dataKeys: string[];
|
|
255
|
+
hasEvents: unknown;
|
|
256
|
+
events: unknown;
|
|
257
|
+
};
|
|
258
|
+
getBaseProps?(props: import("victory-core").EventMixinCommonProps): Record<string, object>;
|
|
259
|
+
role?: string | undefined;
|
|
260
|
+
expectedComponents?: string[] | undefined;
|
|
261
|
+
getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
|
|
262
|
+
animationWhitelist?: string[] | undefined;
|
|
263
|
+
} & typeof VictoryBoxPlotBase;
|
|
264
|
+
export {};
|
|
265
|
+
//# sourceMappingURL=victory-box-plot.d.ts.map
|
package/lib/victory-box-plot.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.VictoryBoxPlot = void 0;
|
|
7
7
|
|
|
8
8
|
var _isNil2 = _interopRequireDefault(require("lodash/isNil"));
|
|
9
9
|
|
|
@@ -109,18 +109,18 @@ var options = {
|
|
|
109
109
|
}]
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
var
|
|
113
|
-
_inherits(
|
|
112
|
+
var VictoryBoxPlotBase = /*#__PURE__*/function (_React$Component) {
|
|
113
|
+
_inherits(VictoryBoxPlotBase, _React$Component);
|
|
114
114
|
|
|
115
|
-
var _super = _createSuper(
|
|
115
|
+
var _super = _createSuper(VictoryBoxPlotBase);
|
|
116
116
|
|
|
117
|
-
function
|
|
118
|
-
_classCallCheck(this,
|
|
117
|
+
function VictoryBoxPlotBase() {
|
|
118
|
+
_classCallCheck(this, VictoryBoxPlotBase);
|
|
119
119
|
|
|
120
120
|
return _super.apply(this, arguments);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
_createClass(
|
|
123
|
+
_createClass(VictoryBoxPlotBase, [{
|
|
124
124
|
key: "renderBoxPlot",
|
|
125
125
|
value: function renderBoxPlot(props) {
|
|
126
126
|
var _this = this;
|
|
@@ -140,18 +140,18 @@ var VictoryBoxPlot = /*#__PURE__*/function (_React$Component) {
|
|
|
140
140
|
}, []);
|
|
141
141
|
}));
|
|
142
142
|
var labelComponents = (0, _flatten2.default)(types.map(function (type) {
|
|
143
|
-
var components = _this.dataKeys.
|
|
143
|
+
var components = _this.dataKeys.reduce(function (validComponents, _key, index) {
|
|
144
144
|
var name = "".concat(type, "Labels");
|
|
145
145
|
var baseComponent = props["".concat(type, "LabelComponent")];
|
|
146
146
|
|
|
147
147
|
var labelProps = _this.getComponentProps(baseComponent, name, index);
|
|
148
148
|
|
|
149
149
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
150
|
-
|
|
150
|
+
validComponents.push( /*#__PURE__*/_react.default.cloneElement(baseComponent, labelProps));
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
return
|
|
154
|
-
});
|
|
153
|
+
return validComponents;
|
|
154
|
+
}, []);
|
|
155
155
|
|
|
156
156
|
return components.filter(Boolean);
|
|
157
157
|
}));
|
|
@@ -190,14 +190,14 @@ var VictoryBoxPlot = /*#__PURE__*/function (_React$Component) {
|
|
|
190
190
|
}
|
|
191
191
|
}]);
|
|
192
192
|
|
|
193
|
-
return
|
|
193
|
+
return VictoryBoxPlotBase;
|
|
194
194
|
}(_react.default.Component);
|
|
195
195
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
VictoryBoxPlotBase.animationWhitelist = ["data", "domain", "height", "padding", "style", "width"];
|
|
197
|
+
VictoryBoxPlotBase.displayName = "VictoryBoxPlot";
|
|
198
|
+
VictoryBoxPlotBase.role = "boxplot";
|
|
199
|
+
VictoryBoxPlotBase.defaultTransitions = _victoryCore.DefaultTransitions.discreteTransitions();
|
|
200
|
+
VictoryBoxPlotBase.propTypes = _objectSpread(_objectSpread(_objectSpread({}, _victoryCore.CommonProps.baseProps), _victoryCore.CommonProps.dataProps), {}, {
|
|
201
201
|
boxWidth: _propTypes.default.number,
|
|
202
202
|
events: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
203
203
|
target: _propTypes.default.oneOf(["max", "maxLabels", "median", "medianLabels", "min", "minLabels", "q1", "q1Labels", "q3", "q3Labels", "parent"]),
|
|
@@ -251,7 +251,7 @@ VictoryBoxPlot.propTypes = _objectSpread(_objectSpread(_objectSpread({}, _victor
|
|
|
251
251
|
}),
|
|
252
252
|
whiskerWidth: _propTypes.default.number
|
|
253
253
|
});
|
|
254
|
-
|
|
254
|
+
VictoryBoxPlotBase.defaultProps = {
|
|
255
255
|
containerComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.VictoryContainer, null),
|
|
256
256
|
data: defaultData,
|
|
257
257
|
dataComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.Box, null),
|
|
@@ -274,16 +274,14 @@ VictoryBoxPlot.defaultProps = {
|
|
|
274
274
|
standalone: true,
|
|
275
275
|
theme: _victoryCore.VictoryTheme.grayscale
|
|
276
276
|
};
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
VictoryBoxPlotBase.getDomain = _helperMethods.getDomain;
|
|
278
|
+
VictoryBoxPlotBase.getData = _helperMethods.getData;
|
|
279
279
|
|
|
280
|
-
|
|
280
|
+
VictoryBoxPlotBase.getBaseProps = function (props) {
|
|
281
281
|
return (0, _helperMethods.getBaseProps)(props, fallbackProps);
|
|
282
282
|
};
|
|
283
283
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
exports.default = _default;
|
|
284
|
+
VictoryBoxPlotBase.expectedComponents = ["maxComponent", "maxLabelComponent", "medianComponent", "medianLabelComponent", "minComponent", "minLabelComponent", "q1Component", "q1LabelComponent", "q3Component", "q3LabelComponent", "groupComponent", "containerComponent"];
|
|
285
|
+
var VictoryBoxPlot = (0, _victoryCore.addEvents)(VictoryBoxPlotBase, options);
|
|
286
|
+
exports.VictoryBoxPlot = VictoryBoxPlot;
|
|
289
287
|
//# sourceMappingURL=victory-box-plot.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-box-plot",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.6.2",
|
|
4
4
|
"description": "Box Plot Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"url": "https://github.com/formidablelabs/victory.git"
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://formidable.com/open-source/victory",
|
|
16
|
+
"sideEffects": false,
|
|
16
17
|
"main": "lib/index.js",
|
|
17
18
|
"module": "es/index.js",
|
|
18
19
|
"jsnext:main": "es/index.js",
|
|
@@ -21,15 +22,266 @@
|
|
|
21
22
|
"dependencies": {
|
|
22
23
|
"lodash": "^4.17.19",
|
|
23
24
|
"prop-types": "^15.8.1",
|
|
24
|
-
"victory-core": "^36.
|
|
25
|
-
"victory-vendor": "^36.
|
|
25
|
+
"victory-core": "^36.6.2",
|
|
26
|
+
"victory-vendor": "^36.6.2"
|
|
26
27
|
},
|
|
27
28
|
"peerDependencies": {
|
|
28
29
|
"react": ">=16.6.0"
|
|
29
30
|
},
|
|
30
|
-
"
|
|
31
|
-
"
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"victory-box-plot": "*",
|
|
33
|
+
"victory-chart": "^36.6.2"
|
|
32
34
|
},
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
}
|
|
35
|
+
"wireit": {
|
|
36
|
+
"### THESE WIREIT CONFIGS ARE GENERATED ####": {},
|
|
37
|
+
"### DO NOT MODIFY THESE MANUALLY ####": {},
|
|
38
|
+
"build": {
|
|
39
|
+
"dependencies": [
|
|
40
|
+
"build:lib",
|
|
41
|
+
"build:dist",
|
|
42
|
+
"types:create"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"build:lib": {
|
|
46
|
+
"dependencies": [
|
|
47
|
+
"build:lib:esm",
|
|
48
|
+
"build:lib:cjs"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"build:lib:esm": {
|
|
52
|
+
"command": "nps build:lib:esm",
|
|
53
|
+
"files": [
|
|
54
|
+
"src/**",
|
|
55
|
+
"!src/**/*.test.*",
|
|
56
|
+
"../../.babelrc.build.js"
|
|
57
|
+
],
|
|
58
|
+
"output": [
|
|
59
|
+
"es/**/*.js",
|
|
60
|
+
"es/**/*.js.map"
|
|
61
|
+
],
|
|
62
|
+
"dependencies": [
|
|
63
|
+
"../victory-core:build:lib:esm",
|
|
64
|
+
"../victory-vendor:build:lib:esm"
|
|
65
|
+
],
|
|
66
|
+
"packageLocks": [
|
|
67
|
+
"pnpm-lock.yaml"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"build:lib:cjs": {
|
|
71
|
+
"command": "nps build:lib:cjs",
|
|
72
|
+
"files": [
|
|
73
|
+
"src/**",
|
|
74
|
+
"!src/**/*.test.*",
|
|
75
|
+
"../../.babelrc.build.js"
|
|
76
|
+
],
|
|
77
|
+
"output": [
|
|
78
|
+
"lib/**/*.js",
|
|
79
|
+
"lib/**/*.js.map"
|
|
80
|
+
],
|
|
81
|
+
"dependencies": [
|
|
82
|
+
"../victory-core:build:lib:cjs",
|
|
83
|
+
"../victory-vendor:build:lib:cjs"
|
|
84
|
+
],
|
|
85
|
+
"packageLocks": [
|
|
86
|
+
"pnpm-lock.yaml"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"build:dist": {
|
|
90
|
+
"dependencies": [
|
|
91
|
+
"build:dist:dev",
|
|
92
|
+
"build:dist:min"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"build:dist:dev": {
|
|
96
|
+
"command": "nps build:dist:dev",
|
|
97
|
+
"files": [
|
|
98
|
+
"src/**",
|
|
99
|
+
"!src/**/*.test.*",
|
|
100
|
+
"../../.babelrc.build.js",
|
|
101
|
+
"../../config/webpack.config.js",
|
|
102
|
+
"../../config/webpack.config.dev.js"
|
|
103
|
+
],
|
|
104
|
+
"output": [
|
|
105
|
+
"dist/victory*.js",
|
|
106
|
+
"!dist/victory*.min.js*"
|
|
107
|
+
],
|
|
108
|
+
"dependencies": [
|
|
109
|
+
"../victory-core:build:lib:esm",
|
|
110
|
+
"../victory-vendor:build:lib:esm"
|
|
111
|
+
],
|
|
112
|
+
"packageLocks": [
|
|
113
|
+
"pnpm-lock.yaml"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"build:dist:min": {
|
|
117
|
+
"command": "nps build:dist:min",
|
|
118
|
+
"files": [
|
|
119
|
+
"src/**",
|
|
120
|
+
"!src/**/*.test.*",
|
|
121
|
+
"../../.babelrc.build.js",
|
|
122
|
+
"../../config/webpack.config.js"
|
|
123
|
+
],
|
|
124
|
+
"output": [
|
|
125
|
+
"dist/victory*.min.js*"
|
|
126
|
+
],
|
|
127
|
+
"dependencies": [
|
|
128
|
+
"../victory-core:build:lib:esm",
|
|
129
|
+
"../victory-vendor:build:lib:esm"
|
|
130
|
+
],
|
|
131
|
+
"packageLocks": [
|
|
132
|
+
"pnpm-lock.yaml"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"check": {
|
|
136
|
+
"dependencies": [
|
|
137
|
+
"types:check",
|
|
138
|
+
"jest",
|
|
139
|
+
"format",
|
|
140
|
+
"lint"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
"types:check": {
|
|
144
|
+
"command": "nps types:pkg:check",
|
|
145
|
+
"files": [
|
|
146
|
+
"src/**/*.{ts,tsx}",
|
|
147
|
+
"../../tsconfig.base.json",
|
|
148
|
+
"tsconfig.json"
|
|
149
|
+
],
|
|
150
|
+
"dependencies": [
|
|
151
|
+
"types:create",
|
|
152
|
+
"../victory-core:types:create",
|
|
153
|
+
"../victory-vendor:types:create",
|
|
154
|
+
"../victory-chart:types:create",
|
|
155
|
+
"../victory-voronoi:types:create"
|
|
156
|
+
],
|
|
157
|
+
"output": [],
|
|
158
|
+
"packageLocks": [
|
|
159
|
+
"pnpm-lock.yaml"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"types:create": {
|
|
163
|
+
"command": "nps types:pkg:create",
|
|
164
|
+
"files": [
|
|
165
|
+
"src/**",
|
|
166
|
+
"!src/**/*.test.*",
|
|
167
|
+
"../../tsconfig.base.json",
|
|
168
|
+
"tsconfig.build.json"
|
|
169
|
+
],
|
|
170
|
+
"output": [
|
|
171
|
+
"es/**/*.d.ts",
|
|
172
|
+
"es/**/*.d.ts.map",
|
|
173
|
+
"lib/**/*.d.ts",
|
|
174
|
+
"lib/**/*.d.ts.map"
|
|
175
|
+
],
|
|
176
|
+
"dependencies": [
|
|
177
|
+
"../victory-core:types:create",
|
|
178
|
+
"../victory-vendor:types:create"
|
|
179
|
+
],
|
|
180
|
+
"packageLocks": [
|
|
181
|
+
"pnpm-lock.yaml"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"format": {
|
|
185
|
+
"command": "nps format:pkg",
|
|
186
|
+
"files": [
|
|
187
|
+
"src/**",
|
|
188
|
+
"*.json",
|
|
189
|
+
"../../.prettierignore",
|
|
190
|
+
"../../.prettierrc.json"
|
|
191
|
+
],
|
|
192
|
+
"output": [],
|
|
193
|
+
"packageLocks": [
|
|
194
|
+
"pnpm-lock.yaml"
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"format:fix": {
|
|
198
|
+
"command": "pnpm run format || nps format:pkg:fix",
|
|
199
|
+
"files": [
|
|
200
|
+
"src/**",
|
|
201
|
+
"*.json",
|
|
202
|
+
"../../.prettierignore",
|
|
203
|
+
"../../.prettierrc.json"
|
|
204
|
+
],
|
|
205
|
+
"output": [],
|
|
206
|
+
"packageLocks": [
|
|
207
|
+
"pnpm-lock.yaml"
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"lint": {
|
|
211
|
+
"command": "nps lint:pkg",
|
|
212
|
+
"files": [
|
|
213
|
+
"src/**",
|
|
214
|
+
"../../.eslintignore",
|
|
215
|
+
"../../.eslintrc.js"
|
|
216
|
+
],
|
|
217
|
+
"output": [],
|
|
218
|
+
"dependencies": [
|
|
219
|
+
"../victory-vendor:build",
|
|
220
|
+
"../victory-core:types:create",
|
|
221
|
+
"../victory-vendor:types:create",
|
|
222
|
+
"../victory-chart:types:create",
|
|
223
|
+
"../victory-voronoi:types:create"
|
|
224
|
+
],
|
|
225
|
+
"packageLocks": [
|
|
226
|
+
"pnpm-lock.yaml"
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
"lint:fix": {
|
|
230
|
+
"command": "pnpm run lint || nps lint:pkg:fix",
|
|
231
|
+
"files": [
|
|
232
|
+
"src/**",
|
|
233
|
+
"../../.eslintignore",
|
|
234
|
+
"../../.eslintrc.js"
|
|
235
|
+
],
|
|
236
|
+
"output": [],
|
|
237
|
+
"dependencies": [
|
|
238
|
+
"../victory-vendor:build",
|
|
239
|
+
"../victory-core:types:create",
|
|
240
|
+
"../victory-vendor:types:create",
|
|
241
|
+
"../victory-chart:types:create",
|
|
242
|
+
"../victory-voronoi:types:create"
|
|
243
|
+
],
|
|
244
|
+
"packageLocks": [
|
|
245
|
+
"pnpm-lock.yaml"
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
"jest": {
|
|
249
|
+
"command": "nps jest:pkg",
|
|
250
|
+
"files": [
|
|
251
|
+
"src/**/*.test.*",
|
|
252
|
+
"../../.babelrc.js",
|
|
253
|
+
"../../test/jest-config.js",
|
|
254
|
+
"../../test/jest-setup.ts"
|
|
255
|
+
],
|
|
256
|
+
"output": [],
|
|
257
|
+
"dependencies": [
|
|
258
|
+
"build:lib:cjs",
|
|
259
|
+
"../victory-chart:build:lib:cjs",
|
|
260
|
+
"../victory-vendor:build:lib:cjs",
|
|
261
|
+
"../victory-voronoi:build:lib:cjs"
|
|
262
|
+
],
|
|
263
|
+
"packageLocks": [
|
|
264
|
+
"pnpm-lock.yaml"
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"scripts": {
|
|
269
|
+
"### THESE SCRIPTS ARE GENERATED ###": "true",
|
|
270
|
+
"### DO NOT MODIFY THESE MANUALLY ###": "true",
|
|
271
|
+
"build": "wireit",
|
|
272
|
+
"build:lib": "wireit",
|
|
273
|
+
"build:lib:esm": "wireit",
|
|
274
|
+
"build:lib:cjs": "wireit",
|
|
275
|
+
"build:dist": "wireit",
|
|
276
|
+
"build:dist:dev": "wireit",
|
|
277
|
+
"build:dist:min": "wireit",
|
|
278
|
+
"check": "wireit",
|
|
279
|
+
"types:check": "wireit",
|
|
280
|
+
"types:create": "wireit",
|
|
281
|
+
"format": "wireit",
|
|
282
|
+
"format:fix": "wireit",
|
|
283
|
+
"lint": "wireit",
|
|
284
|
+
"lint:fix": "wireit",
|
|
285
|
+
"jest": "wireit"
|
|
286
|
+
}
|
|
287
|
+
}
|
|
@@ -152,7 +152,7 @@ export const getDomain = (props, axis) => {
|
|
|
152
152
|
return Domain.createDomainFunction(getDomainFromData)(props, axis);
|
|
153
153
|
};
|
|
154
154
|
|
|
155
|
-
const getLabelStyle = (props, styleObject, namespace) => {
|
|
155
|
+
const getLabelStyle = (props, styleObject, namespace?) => {
|
|
156
156
|
const component = props[`${namespace}LabelComponent`] || props.labelComponent;
|
|
157
157
|
const baseStyle = styleObject[`${namespace}Labels`] || styleObject.labels;
|
|
158
158
|
if (!Helpers.isTooltip(component)) {
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./victory-box-plot";
|