victory-errorbar 36.5.0 → 36.5.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/es/error-bar.js CHANGED
@@ -133,4 +133,5 @@ ErrorBar.defaultProps = {
133
133
  role: "presentation",
134
134
  shapeRendering: "auto"
135
135
  };
136
- export default ErrorBar;
136
+ export default ErrorBar;
137
+ //# sourceMappingURL=error-bar.js.map
@@ -234,4 +234,5 @@ export var getBaseProps = function (props, fallbackProps) {
234
234
 
235
235
  return childProps;
236
236
  }, initialChildProps);
237
- };
237
+ };
238
+ //# sourceMappingURL=helper-methods.js.map
package/es/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  VictoryCommonPrimitiveProps,
9
9
  VictoryLabelableProps,
10
10
  VictoryMultiLabelableProps,
11
- VictoryStyleInterface
11
+ VictoryStyleInterface,
12
12
  } from "victory-core";
13
13
 
14
14
  export type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
package/es/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export { default as VictoryErrorBar } from "./victory-errorbar";
2
- export { default as ErrorBar } from "./error-bar";
2
+ export { default as ErrorBar } from "./error-bar";
3
+ //# sourceMappingURL=index.js.map
@@ -124,4 +124,5 @@ VictoryErrorBar.getBaseProps = function (props) {
124
124
  };
125
125
 
126
126
  VictoryErrorBar.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
127
- export default addEvents(VictoryErrorBar);
127
+ export default addEvents(VictoryErrorBar);
128
+ //# sourceMappingURL=victory-errorbar.js.map
package/lib/error-bar.js CHANGED
@@ -150,4 +150,5 @@ ErrorBar.defaultProps = {
150
150
  shapeRendering: "auto"
151
151
  };
152
152
  var _default = ErrorBar;
153
- exports.default = _default;
153
+ exports.default = _default;
154
+ //# sourceMappingURL=error-bar.js.map
@@ -262,4 +262,5 @@ var getBaseProps = function (props, fallbackProps) {
262
262
  }, initialChildProps);
263
263
  };
264
264
 
265
- exports.getBaseProps = getBaseProps;
265
+ exports.getBaseProps = getBaseProps;
266
+ //# sourceMappingURL=helper-methods.js.map
package/lib/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  VictoryCommonPrimitiveProps,
9
9
  VictoryLabelableProps,
10
10
  VictoryMultiLabelableProps,
11
- VictoryStyleInterface
11
+ VictoryStyleInterface,
12
12
  } from "victory-core";
13
13
 
14
14
  export type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
package/lib/index.js CHANGED
@@ -20,4 +20,5 @@ var _victoryErrorbar = _interopRequireDefault(require("./victory-errorbar"));
20
20
 
21
21
  var _errorBar = _interopRequireDefault(require("./error-bar"));
22
22
 
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
+ //# sourceMappingURL=index.js.map
@@ -142,4 +142,5 @@ VictoryErrorBar.expectedComponents = ["dataComponent", "labelComponent", "groupC
142
142
 
143
143
  var _default = (0, _victoryCore.addEvents)(VictoryErrorBar);
144
144
 
145
- exports.default = _default;
145
+ exports.default = _default;
146
+ //# sourceMappingURL=victory-errorbar.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-errorbar",
3
- "version": "36.5.0",
3
+ "version": "36.5.3",
4
4
  "description": "Error Bar Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "lodash": "^4.17.19",
23
23
  "prop-types": "^15.8.1",
24
- "victory-core": "^36.5.0"
24
+ "victory-core": "^36.5.3"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": ">=16.6.0"
@@ -30,5 +30,5 @@
30
30
  "version": "yarn run nps build-libs && nps build-dists"
31
31
  },
32
32
  "sideEffects": false,
33
- "gitHead": "7cecba921f751c3decc8215f7e866f51d11203c1"
33
+ "gitHead": "55338af3c57eacca5956e53c08a58e47ba41d01e"
34
34
  }
package/src/error-bar.js CHANGED
@@ -18,7 +18,7 @@ const renderBorder = (props, error, type) => {
18
18
  x2: vertical ? error[type] : props.x + props.borderWidth,
19
19
  y1: vertical ? props.y - props.borderWidth : error[type],
20
20
  y2: vertical ? props.y + props.borderWidth : error[type],
21
- "data-type": `border-${type}`
21
+ "data-type": `border-${type}`,
22
22
  });
23
23
  };
24
24
 
@@ -36,7 +36,7 @@ const renderCross = (props, error, type) => {
36
36
  x2: vertical ? props.x : error[type],
37
37
  y1: props.y,
38
38
  y2: vertical ? error[type] : props.y,
39
- "data-type": `cross-${type}`
39
+ "data-type": `cross-${type}`,
40
40
  });
41
41
  };
42
42
 
@@ -46,7 +46,7 @@ const calculateError = (props) => {
46
46
  right: { error: errorX, errorIndex: 0 },
47
47
  left: { error: errorX, errorIndex: 1 },
48
48
  top: { error: errorY, errorIndex: 1 },
49
- bottom: { error: errorY, errorIndex: 0 }
49
+ bottom: { error: errorY, errorIndex: 0 },
50
50
  };
51
51
 
52
52
  const getError = (direction) => {
@@ -73,7 +73,7 @@ const evaluateProps = (props) => {
73
73
  const id = Helpers.evaluateProp(props.id, props);
74
74
  const style = Helpers.evaluateStyle(
75
75
  assign({ stroke: "black" }, props.style),
76
- props
76
+ props,
77
77
  );
78
78
  const tabIndex = Helpers.evaluateProp(props.tabIndex, props);
79
79
 
@@ -93,12 +93,12 @@ const ErrorBar = (props) => {
93
93
  error.right ? renderCross(props, error, "right") : null,
94
94
  error.left ? renderCross(props, error, "left") : null,
95
95
  error.bottom ? renderCross(props, error, "bottom") : null,
96
- error.top ? renderCross(props, error, "top") : null
96
+ error.top ? renderCross(props, error, "top") : null,
97
97
  ].filter(Boolean);
98
98
  return React.cloneElement(
99
99
  props.groupComponent,
100
100
  { tabIndex, "aria-label": ariaLabel, ...userProps },
101
- children
101
+ children,
102
102
  );
103
103
  };
104
104
 
@@ -109,24 +109,24 @@ ErrorBar.propTypes = {
109
109
  errorX: PropTypes.oneOfType([
110
110
  PropTypes.number,
111
111
  PropTypes.array,
112
- PropTypes.bool
112
+ PropTypes.bool,
113
113
  ]),
114
114
  errorY: PropTypes.oneOfType([
115
115
  PropTypes.number,
116
116
  PropTypes.array,
117
- PropTypes.bool
117
+ PropTypes.bool,
118
118
  ]),
119
119
  groupComponent: PropTypes.element,
120
120
  lineComponent: PropTypes.element,
121
121
  x: PropTypes.number,
122
- y: PropTypes.number
122
+ y: PropTypes.number,
123
123
  };
124
124
 
125
125
  ErrorBar.defaultProps = {
126
126
  groupComponent: <g />,
127
127
  lineComponent: <Line />,
128
128
  role: "presentation",
129
- shapeRendering: "auto"
129
+ shapeRendering: "auto",
130
130
  };
131
131
 
132
132
  export default ErrorBar;
@@ -5,7 +5,7 @@ import {
5
5
  Scale,
6
6
  Domain,
7
7
  Data,
8
- Collection
8
+ Collection,
9
9
  } from "victory-core";
10
10
 
11
11
  const getErrors = (props, datum, axis) => {
@@ -26,7 +26,7 @@ const getErrors = (props, datum, axis) => {
26
26
  return Array.isArray(errors)
27
27
  ? [
28
28
  errors[0] === 0 ? false : scale(errors[0] + datum[`_${axis}`]),
29
- errors[1] === 0 ? false : scale(datum[`_${axis}`] - errors[1])
29
+ errors[1] === 0 ? false : scale(datum[`_${axis}`] - errors[1]),
30
30
  ]
31
31
  : [scale(errors + datum[`_${axis}`]), scale(datum[`_${axis}`] - errors)];
32
32
  };
@@ -98,11 +98,11 @@ const getCalculatedValues = (props) => {
98
98
  const data = getData(props);
99
99
  const range = {
100
100
  x: Helpers.getRange(props, "x"),
101
- y: Helpers.getRange(props, "y")
101
+ y: Helpers.getRange(props, "y"),
102
102
  };
103
103
  const domain = {
104
104
  x: getDomain(props, "x"),
105
- y: getDomain(props, "y")
105
+ y: getDomain(props, "y"),
106
106
  };
107
107
  const scale = {
108
108
  x: Scale.getBaseScale(props, "x")
@@ -110,7 +110,7 @@ const getCalculatedValues = (props) => {
110
110
  .range(props.horizontal ? range.y : range.x),
111
111
  y: Scale.getBaseScale(props, "y")
112
112
  .domain(domain.y)
113
- .range(props.horizontal ? range.x : range.y)
113
+ .range(props.horizontal ? range.x : range.y),
114
114
  };
115
115
  const origin = props.polar
116
116
  ? props.origin || Helpers.getPolarOrigin(props)
@@ -129,7 +129,7 @@ const getLabelProps = (dataProps, text, style) => {
129
129
  horizontal,
130
130
  labelComponent,
131
131
  theme,
132
- disableInlineStyles
132
+ disableInlineStyles,
133
133
  } = dataProps;
134
134
  const getError = (type = "x") => {
135
135
  const baseError = type === "y" ? errorY : errorX;
@@ -156,7 +156,7 @@ const getLabelProps = (dataProps, text, style) => {
156
156
  verticalAnchor: labelStyle.verticalAnchor || verticalAnchor,
157
157
  angle: labelStyle.angle,
158
158
  horizontal,
159
- disableInlineStyles
159
+ disableInlineStyles,
160
160
  };
161
161
 
162
162
  if (!Helpers.isTooltip(labelComponent)) {
@@ -188,7 +188,7 @@ export const getBaseProps = (props, fallbackProps) => {
188
188
  style,
189
189
  theme,
190
190
  width,
191
- disableInlineStyles
191
+ disableInlineStyles,
192
192
  } = props;
193
193
  const initialChildProps = {
194
194
  parent: {
@@ -204,8 +204,8 @@ export const getBaseProps = (props, fallbackProps) => {
204
204
  standalone,
205
205
  style: style.parent,
206
206
  theme,
207
- width
208
- }
207
+ width,
208
+ },
209
209
  };
210
210
 
211
211
  return data.reduce((childProps, datum, index) => {
@@ -227,11 +227,11 @@ export const getBaseProps = (props, fallbackProps) => {
227
227
  style: disableInlineStyles ? {} : style.data,
228
228
  x,
229
229
  y,
230
- disableInlineStyles
230
+ disableInlineStyles,
231
231
  };
232
232
 
233
233
  childProps[eventKey] = {
234
- data: dataProps
234
+ data: dataProps,
235
235
  };
236
236
  const text = LabelHelpers.getText(props, datum, index);
237
237
  if (
@@ -241,7 +241,7 @@ export const getBaseProps = (props, fallbackProps) => {
241
241
  childProps[eventKey].labels = getLabelProps(
242
242
  assign({}, props, dataProps),
243
243
  text,
244
- style
244
+ style,
245
245
  );
246
246
  }
247
247
 
package/src/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  VictoryCommonPrimitiveProps,
9
9
  VictoryLabelableProps,
10
10
  VictoryMultiLabelableProps,
11
- VictoryStyleInterface
11
+ VictoryStyleInterface,
12
12
  } from "victory-core";
13
13
 
14
14
  export type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
@@ -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