victory-errorbar 31.1.0 → 31.2.0
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 +757 -640
- package/dist/victory-errorbar.min.js +1 -1
- package/es/helper-methods.js +2 -1
- package/lib/helper-methods.js +5 -1
- package/package.json +2 -2
- package/src/helper-methods.js +2 -1
package/es/helper-methods.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _isNil from "lodash/isNil";
|
|
1
2
|
import { Helpers, LabelHelpers, Scale, Domain, Data, Collection } from "victory-core";
|
|
2
3
|
|
|
3
4
|
var getErrors = function (datum, scale, axis) {
|
|
@@ -158,7 +159,7 @@ var getBaseProps = function (props, fallbackProps) {
|
|
|
158
159
|
}
|
|
159
160
|
};
|
|
160
161
|
return data.reduce(function (childProps, datum, index) {
|
|
161
|
-
var eventKey = datum.eventKey
|
|
162
|
+
var eventKey = !_isNil(datum.eventKey) ? datum.eventKey : index;
|
|
162
163
|
var x = scale.x(datum._x1 !== undefined ? datum._x1 : datum._x);
|
|
163
164
|
var y = scale.y(datum._y1 !== undefined ? datum._y1 : datum._y);
|
|
164
165
|
var dataProps = {
|
package/lib/helper-methods.js
CHANGED
|
@@ -5,8 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getData = exports.getDomain = exports.getBaseProps = void 0;
|
|
7
7
|
|
|
8
|
+
var _isNil2 = _interopRequireDefault(require("lodash/isNil"));
|
|
9
|
+
|
|
8
10
|
var _victoryCore = require("victory-core");
|
|
9
11
|
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
10
14
|
var getErrors = function (datum, scale, axis) {
|
|
11
15
|
/**
|
|
12
16
|
* check if it is asymmetric error or symmetric error, asymmetric error should be an array
|
|
@@ -172,7 +176,7 @@ var getBaseProps = function (props, fallbackProps) {
|
|
|
172
176
|
}
|
|
173
177
|
};
|
|
174
178
|
return data.reduce(function (childProps, datum, index) {
|
|
175
|
-
var eventKey = datum.eventKey
|
|
179
|
+
var eventKey = !(0, _isNil2.default)(datum.eventKey) ? datum.eventKey : index;
|
|
176
180
|
var x = scale.x(datum._x1 !== undefined ? datum._x1 : datum._x);
|
|
177
181
|
var y = scale.y(datum._y1 !== undefined ? datum._y1 : datum._y);
|
|
178
182
|
var dataProps = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-errorbar",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.2.0",
|
|
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.5",
|
|
23
23
|
"prop-types": "^15.5.8",
|
|
24
|
-
"victory-core": "^31.
|
|
24
|
+
"victory-core": "^31.2.0"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"version": "nps build-libs && nps build-dists"
|
package/src/helper-methods.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isNil } from "lodash";
|
|
1
2
|
import { Helpers, LabelHelpers, Scale, Domain, Data, Collection } from "victory-core";
|
|
2
3
|
|
|
3
4
|
const getErrors = (datum, scale, axis) => {
|
|
@@ -148,7 +149,7 @@ const getBaseProps = (props, fallbackProps) => {
|
|
|
148
149
|
};
|
|
149
150
|
|
|
150
151
|
return data.reduce((childProps, datum, index) => {
|
|
151
|
-
const eventKey = datum.eventKey
|
|
152
|
+
const eventKey = !isNil(datum.eventKey) ? datum.eventKey : index;
|
|
152
153
|
const x = scale.x(datum._x1 !== undefined ? datum._x1 : datum._x);
|
|
153
154
|
const y = scale.y(datum._y1 !== undefined ? datum._y1 : datum._y);
|
|
154
155
|
|