victory-box-plot 36.8.2 → 36.8.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 +6 -0
- package/dist/victory-box-plot.js +176 -151
- package/dist/victory-box-plot.min.js +1 -1
- package/es/helper-methods.d.ts +1 -1
- package/es/helper-methods.js +22 -20
- package/es/victory-box-plot.d.ts +6 -3
- package/lib/helper-methods.d.ts +1 -1
- package/lib/helper-methods.js +21 -21
- package/lib/victory-box-plot.d.ts +6 -3
- package/package.json +4 -4
- package/src/helper-methods.tsx +9 -5
- package/src/victory-box-plot.tsx +2 -0
package/es/helper-methods.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const getData: (props: any) => any;
|
|
2
2
|
export declare const getDomain: (props: any, axis: any) => any;
|
|
3
|
-
export declare const getBaseProps: (
|
|
3
|
+
export declare const getBaseProps: (initialProps: any, fallbackProps: any) => any;
|
|
4
4
|
//# sourceMappingURL=helper-methods.d.ts.map
|
package/es/helper-methods.js
CHANGED
|
@@ -165,13 +165,14 @@ var getLabelStyle = function (props, styleObject, namespace) {
|
|
|
165
165
|
return _defaults({}, tooltipTheme.style, baseStyle);
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
var getStyles = function (props
|
|
168
|
+
var getStyles = function (props) {
|
|
169
|
+
var styleObject = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
170
|
+
|
|
169
171
|
if (props.disableInlineStyles) {
|
|
170
172
|
return {};
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
var style = props.style || {};
|
|
174
|
-
styleObject = styleObject || {};
|
|
175
176
|
var parentStyles = {
|
|
176
177
|
height: "100%",
|
|
177
178
|
width: "100%"
|
|
@@ -462,24 +463,25 @@ var isDatumOutOfBounds = function (datum, domain) {
|
|
|
462
463
|
return yOutOfBounds || xOutOfBounds;
|
|
463
464
|
};
|
|
464
465
|
|
|
465
|
-
export var getBaseProps = function (
|
|
466
|
-
var modifiedProps = Helpers.modifyProps(
|
|
467
|
-
|
|
468
|
-
var
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
466
|
+
export var getBaseProps = function (initialProps, fallbackProps) {
|
|
467
|
+
var modifiedProps = Helpers.modifyProps(initialProps, fallbackProps, "boxplot");
|
|
468
|
+
|
|
469
|
+
var props = _assign({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
470
|
+
|
|
471
|
+
var groupComponent = props.groupComponent,
|
|
472
|
+
width = props.width,
|
|
473
|
+
height = props.height,
|
|
474
|
+
padding = props.padding,
|
|
475
|
+
standalone = props.standalone,
|
|
476
|
+
theme = props.theme,
|
|
477
|
+
events = props.events,
|
|
478
|
+
sharedEvents = props.sharedEvents,
|
|
479
|
+
scale = props.scale,
|
|
480
|
+
horizontal = props.horizontal,
|
|
481
|
+
data = props.data,
|
|
482
|
+
style = props.style,
|
|
483
|
+
domain = props.domain,
|
|
484
|
+
name = props.name;
|
|
483
485
|
var initialChildProps = {
|
|
484
486
|
parent: {
|
|
485
487
|
domain: domain,
|
package/es/victory-box-plot.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export interface VictoryBoxPlotStyleInterface {
|
|
|
18
18
|
q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
19
19
|
q3?: VictoryStyleObject;
|
|
20
20
|
q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
21
|
+
boxes?: VictoryStyleObject;
|
|
22
|
+
whiskers?: VictoryStyleObject;
|
|
21
23
|
}
|
|
22
24
|
export interface VictoryBoxPlotLabelOrientationInterface {
|
|
23
25
|
max?: OrientationTypes;
|
|
@@ -135,6 +137,7 @@ declare class VictoryBoxPlotBase extends React.Component<VictoryBoxPlotProps> {
|
|
|
135
137
|
animate?: React.Validator<boolean | import("victory-core").AnimatePropTypeInterface | null | undefined> | undefined;
|
|
136
138
|
colorScale?: React.Validator<import("victory-core").ColorScalePropType | null | undefined> | undefined;
|
|
137
139
|
containerComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
140
|
+
disableInlineStyles?: React.Validator<boolean | null | undefined> | undefined;
|
|
138
141
|
externalEventMutations?: React.Validator<import("victory-core").EventCallbackInterface<string | string[], import("victory-core").StringOrNumberOrList>[] | null | undefined> | undefined;
|
|
139
142
|
groupComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
140
143
|
height?: React.Validator<number | null | undefined> | undefined;
|
|
@@ -151,9 +154,9 @@ declare class VictoryBoxPlotBase extends React.Component<VictoryBoxPlotProps> {
|
|
|
151
154
|
padding?: React.Validator<import("victory-core").PaddingProps | null | undefined> | undefined;
|
|
152
155
|
polar?: React.Validator<boolean | null | undefined> | undefined;
|
|
153
156
|
range?: React.Validator<import("victory-core").ForAxes<import("victory-core").RangeTuple> | null | undefined> | undefined;
|
|
154
|
-
scale?: React.Validator<import("victory-core").
|
|
155
|
-
x?: import("victory-core").
|
|
156
|
-
y?: import("victory-core").
|
|
157
|
+
scale?: React.Validator<import("victory-core").ScaleName | import("victory-core").D3Scale<any> | {
|
|
158
|
+
x?: import("victory-core").ScaleName | import("victory-core").D3Scale<any> | undefined;
|
|
159
|
+
y?: import("victory-core").ScaleName | import("victory-core").D3Scale<any> | undefined;
|
|
157
160
|
} | null | undefined> | undefined;
|
|
158
161
|
sharedEvents?: React.Validator<{
|
|
159
162
|
events: any[];
|
package/lib/helper-methods.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const getData: (props: any) => any;
|
|
2
2
|
export declare const getDomain: (props: any, axis: any) => any;
|
|
3
|
-
export declare const getBaseProps: (
|
|
3
|
+
export declare const getBaseProps: (initialProps: any, fallbackProps: any) => any;
|
|
4
4
|
//# sourceMappingURL=helper-methods.d.ts.map
|
package/lib/helper-methods.js
CHANGED
|
@@ -190,13 +190,14 @@ var getLabelStyle = function (props, styleObject, namespace) {
|
|
|
190
190
|
return (0, _defaults2.default)({}, tooltipTheme.style, baseStyle);
|
|
191
191
|
};
|
|
192
192
|
|
|
193
|
-
var getStyles = function (props
|
|
193
|
+
var getStyles = function (props) {
|
|
194
|
+
var styleObject = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
195
|
+
|
|
194
196
|
if (props.disableInlineStyles) {
|
|
195
197
|
return {};
|
|
196
198
|
}
|
|
197
199
|
|
|
198
200
|
var style = props.style || {};
|
|
199
|
-
styleObject = styleObject || {};
|
|
200
201
|
var parentStyles = {
|
|
201
202
|
height: "100%",
|
|
202
203
|
width: "100%"
|
|
@@ -487,25 +488,24 @@ var isDatumOutOfBounds = function (datum, domain) {
|
|
|
487
488
|
return yOutOfBounds || xOutOfBounds;
|
|
488
489
|
};
|
|
489
490
|
|
|
490
|
-
var getBaseProps = function (
|
|
491
|
-
var modifiedProps = _victoryCore.Helpers.modifyProps(
|
|
492
|
-
|
|
493
|
-
props = (0, _assign3.default)({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
494
|
-
var
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
name = _props.name;
|
|
491
|
+
var getBaseProps = function (initialProps, fallbackProps) {
|
|
492
|
+
var modifiedProps = _victoryCore.Helpers.modifyProps(initialProps, fallbackProps, "boxplot");
|
|
493
|
+
|
|
494
|
+
var props = (0, _assign3.default)({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
495
|
+
var groupComponent = props.groupComponent,
|
|
496
|
+
width = props.width,
|
|
497
|
+
height = props.height,
|
|
498
|
+
padding = props.padding,
|
|
499
|
+
standalone = props.standalone,
|
|
500
|
+
theme = props.theme,
|
|
501
|
+
events = props.events,
|
|
502
|
+
sharedEvents = props.sharedEvents,
|
|
503
|
+
scale = props.scale,
|
|
504
|
+
horizontal = props.horizontal,
|
|
505
|
+
data = props.data,
|
|
506
|
+
style = props.style,
|
|
507
|
+
domain = props.domain,
|
|
508
|
+
name = props.name;
|
|
509
509
|
var initialChildProps = {
|
|
510
510
|
parent: {
|
|
511
511
|
domain: domain,
|
|
@@ -18,6 +18,8 @@ export interface VictoryBoxPlotStyleInterface {
|
|
|
18
18
|
q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
19
19
|
q3?: VictoryStyleObject;
|
|
20
20
|
q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
21
|
+
boxes?: VictoryStyleObject;
|
|
22
|
+
whiskers?: VictoryStyleObject;
|
|
21
23
|
}
|
|
22
24
|
export interface VictoryBoxPlotLabelOrientationInterface {
|
|
23
25
|
max?: OrientationTypes;
|
|
@@ -135,6 +137,7 @@ declare class VictoryBoxPlotBase extends React.Component<VictoryBoxPlotProps> {
|
|
|
135
137
|
animate?: React.Validator<boolean | import("victory-core").AnimatePropTypeInterface | null | undefined> | undefined;
|
|
136
138
|
colorScale?: React.Validator<import("victory-core").ColorScalePropType | null | undefined> | undefined;
|
|
137
139
|
containerComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
140
|
+
disableInlineStyles?: React.Validator<boolean | null | undefined> | undefined;
|
|
138
141
|
externalEventMutations?: React.Validator<import("victory-core").EventCallbackInterface<string | string[], import("victory-core").StringOrNumberOrList>[] | null | undefined> | undefined;
|
|
139
142
|
groupComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
140
143
|
height?: React.Validator<number | null | undefined> | undefined;
|
|
@@ -151,9 +154,9 @@ declare class VictoryBoxPlotBase extends React.Component<VictoryBoxPlotProps> {
|
|
|
151
154
|
padding?: React.Validator<import("victory-core").PaddingProps | null | undefined> | undefined;
|
|
152
155
|
polar?: React.Validator<boolean | null | undefined> | undefined;
|
|
153
156
|
range?: React.Validator<import("victory-core").ForAxes<import("victory-core").RangeTuple> | null | undefined> | undefined;
|
|
154
|
-
scale?: React.Validator<import("victory-core").
|
|
155
|
-
x?: import("victory-core").
|
|
156
|
-
y?: import("victory-core").
|
|
157
|
+
scale?: React.Validator<import("victory-core").ScaleName | import("victory-core").D3Scale<any> | {
|
|
158
|
+
x?: import("victory-core").ScaleName | import("victory-core").D3Scale<any> | undefined;
|
|
159
|
+
y?: import("victory-core").ScaleName | import("victory-core").D3Scale<any> | undefined;
|
|
157
160
|
} | null | undefined> | undefined;
|
|
158
161
|
sharedEvents?: React.Validator<{
|
|
159
162
|
events: any[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-box-plot",
|
|
3
|
-
"version": "36.8.
|
|
3
|
+
"version": "36.8.3",
|
|
4
4
|
"description": "Box Plot Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
24
|
"prop-types": "^15.8.1",
|
|
25
|
-
"victory-core": "^36.8.
|
|
26
|
-
"victory-vendor": "^36.8.
|
|
25
|
+
"victory-core": "^36.8.3",
|
|
26
|
+
"victory-vendor": "^36.8.3"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": ">=16.6.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"victory-box-plot": "*",
|
|
33
|
-
"victory-chart": "^36.8.
|
|
33
|
+
"victory-chart": "^36.8.3"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"provenance": true
|
package/src/helper-methods.tsx
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
max as d3Max,
|
|
15
15
|
quantile as d3Quantile,
|
|
16
16
|
} from "victory-vendor/d3-array";
|
|
17
|
+
import { VictoryBoxPlotProps } from "./victory-box-plot";
|
|
17
18
|
|
|
18
19
|
const TYPES = ["max", "min", "median", "q1", "q3"];
|
|
19
20
|
|
|
@@ -162,12 +163,11 @@ const getLabelStyle = (props, styleObject, namespace?) => {
|
|
|
162
163
|
return defaults({}, tooltipTheme.style, baseStyle);
|
|
163
164
|
};
|
|
164
165
|
|
|
165
|
-
const getStyles = (props, styleObject) => {
|
|
166
|
+
const getStyles = (props, styleObject: VictoryBoxPlotProps["style"] = {}) => {
|
|
166
167
|
if (props.disableInlineStyles) {
|
|
167
168
|
return {};
|
|
168
169
|
}
|
|
169
170
|
const style = props.style || {};
|
|
170
|
-
styleObject = styleObject || {};
|
|
171
171
|
const parentStyles = { height: "100%", width: "100%" };
|
|
172
172
|
const labelStyles = defaults(
|
|
173
173
|
{},
|
|
@@ -457,9 +457,13 @@ const isDatumOutOfBounds = (datum, domain) => {
|
|
|
457
457
|
return yOutOfBounds || xOutOfBounds;
|
|
458
458
|
};
|
|
459
459
|
|
|
460
|
-
export const getBaseProps = (
|
|
461
|
-
const modifiedProps = Helpers.modifyProps(
|
|
462
|
-
|
|
460
|
+
export const getBaseProps = (initialProps, fallbackProps) => {
|
|
461
|
+
const modifiedProps = Helpers.modifyProps(
|
|
462
|
+
initialProps,
|
|
463
|
+
fallbackProps,
|
|
464
|
+
"boxplot",
|
|
465
|
+
);
|
|
466
|
+
const props = assign({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
463
467
|
const {
|
|
464
468
|
groupComponent,
|
|
465
469
|
width,
|
package/src/victory-box-plot.tsx
CHANGED
|
@@ -77,6 +77,8 @@ export interface VictoryBoxPlotStyleInterface {
|
|
|
77
77
|
q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
78
78
|
q3?: VictoryStyleObject;
|
|
79
79
|
q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
80
|
+
boxes?: VictoryStyleObject;
|
|
81
|
+
whiskers?: VictoryStyleObject;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
export interface VictoryBoxPlotLabelOrientationInterface {
|