victory-errorbar 36.4.0 → 36.5.1
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/dist/victory-errorbar.js +1101 -970
- package/dist/victory-errorbar.min.js +1 -1
- package/es/error-bar.js +14 -10
- package/es/helper-methods.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +2 -1
- package/es/victory-errorbar.js +21 -28
- package/lib/error-bar.js +15 -9
- package/lib/helper-methods.js +2 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/victory-errorbar.js +21 -29
- package/package.json +5 -5
- package/src/error-bar.js +16 -13
- package/src/helper-methods.js +13 -13
- package/src/index.d.ts +1 -1
- package/src/victory-errorbar.js +16 -17
package/src/victory-errorbar.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
VictoryTheme,
|
|
10
10
|
DefaultTransitions,
|
|
11
11
|
CommonProps,
|
|
12
|
-
UserProps
|
|
12
|
+
UserProps,
|
|
13
13
|
} from "victory-core";
|
|
14
14
|
import ErrorBar from "./error-bar";
|
|
15
15
|
import { getBaseProps, getDomain, getData } from "./helper-methods";
|
|
@@ -17,14 +17,14 @@ import { getBaseProps, getDomain, getData } from "./helper-methods";
|
|
|
17
17
|
const fallbackProps = {
|
|
18
18
|
width: 450,
|
|
19
19
|
height: 300,
|
|
20
|
-
padding: 50
|
|
20
|
+
padding: 50,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const defaultData = [
|
|
24
24
|
{ x: 1, y: 1, errorX: 0.1, errorY: 0.1 },
|
|
25
25
|
{ x: 2, y: 2, errorX: 0.2, errorY: 0.2 },
|
|
26
26
|
{ x: 3, y: 3, errorX: 0.3, errorY: 0.3 },
|
|
27
|
-
{ x: 4, y: 4, errorX: 0.4, errorY: 0.4 }
|
|
27
|
+
{ x: 4, y: 4, errorX: 0.4, errorY: 0.4 },
|
|
28
28
|
];
|
|
29
29
|
|
|
30
30
|
class VictoryErrorBar extends React.Component {
|
|
@@ -38,7 +38,7 @@ class VictoryErrorBar extends React.Component {
|
|
|
38
38
|
"width",
|
|
39
39
|
"errorX",
|
|
40
40
|
"errorY",
|
|
41
|
-
"borderWidth"
|
|
41
|
+
"borderWidth",
|
|
42
42
|
];
|
|
43
43
|
|
|
44
44
|
static displayName = "VictoryErrorBar";
|
|
@@ -53,21 +53,21 @@ class VictoryErrorBar extends React.Component {
|
|
|
53
53
|
PropTypes.func,
|
|
54
54
|
CustomPropTypes.allOfType([
|
|
55
55
|
CustomPropTypes.integer,
|
|
56
|
-
CustomPropTypes.nonNegative
|
|
56
|
+
CustomPropTypes.nonNegative,
|
|
57
57
|
]),
|
|
58
58
|
PropTypes.string,
|
|
59
|
-
PropTypes.arrayOf(PropTypes.string)
|
|
59
|
+
PropTypes.arrayOf(PropTypes.string),
|
|
60
60
|
]),
|
|
61
61
|
errorY: PropTypes.oneOfType([
|
|
62
62
|
PropTypes.func,
|
|
63
63
|
CustomPropTypes.allOfType([
|
|
64
64
|
CustomPropTypes.integer,
|
|
65
|
-
CustomPropTypes.nonNegative
|
|
65
|
+
CustomPropTypes.nonNegative,
|
|
66
66
|
]),
|
|
67
67
|
PropTypes.string,
|
|
68
|
-
PropTypes.arrayOf(PropTypes.string)
|
|
68
|
+
PropTypes.arrayOf(PropTypes.string),
|
|
69
69
|
]),
|
|
70
|
-
horizontal: PropTypes.bool
|
|
70
|
+
horizontal: PropTypes.bool,
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
static defaultProps = {
|
|
@@ -79,7 +79,7 @@ class VictoryErrorBar extends React.Component {
|
|
|
79
79
|
samples: 50,
|
|
80
80
|
sortOrder: "ascending",
|
|
81
81
|
standalone: true,
|
|
82
|
-
theme: VictoryTheme.grayscale
|
|
82
|
+
theme: VictoryTheme.grayscale,
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
static getDomain = getDomain;
|
|
@@ -89,7 +89,7 @@ class VictoryErrorBar extends React.Component {
|
|
|
89
89
|
"dataComponent",
|
|
90
90
|
"labelComponent",
|
|
91
91
|
"groupComponent",
|
|
92
|
-
"containerComponent"
|
|
92
|
+
"containerComponent",
|
|
93
93
|
];
|
|
94
94
|
|
|
95
95
|
// Overridden in native versions
|
|
@@ -106,13 +106,12 @@ class VictoryErrorBar extends React.Component {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
const children = this.renderData(props);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
);
|
|
113
|
-
return props.standalone
|
|
114
|
-
? this.renderContainer(container, children)
|
|
109
|
+
|
|
110
|
+
const component = props.standalone
|
|
111
|
+
? this.renderContainer(props.containerComponent, children)
|
|
115
112
|
: children;
|
|
113
|
+
|
|
114
|
+
return UserProps.withSafeUserProps(component, props);
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
117
|
|