victory-bar 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 +31 -0
- package/dist/victory-bar.js +6055 -2083
- package/dist/victory-bar.min.js +1 -1
- package/es/bar-helper-methods.js +4 -4
- package/es/path-helper-methods.js +4 -4
- package/es/v37/victory-bar.d.ts +1 -1
- package/es/v37/victory-bar.stories.d.ts +2 -1
- package/es/v37/victory-bar.stories.js +1 -1
- package/es/victory-bar-beta.js +1 -1
- package/lib/bar-helper-methods.js +4 -4
- package/lib/path-helper-methods.js +4 -4
- package/lib/v37/victory-bar.d.ts +1 -1
- package/lib/v37/victory-bar.stories.d.ts +2 -1
- package/lib/v37/victory-bar.stories.js +1 -1
- package/lib/victory-bar-beta.js +1 -1
- package/package.json +260 -8
- package/src/bar-helper-methods.js +3 -4
- package/src/path-helper-methods.js +2 -4
- package/src/v37/victory-bar.stories.tsx +1 -1
- package/src/victory-bar-beta.tsx +1 -1
package/es/bar-helper-methods.js
CHANGED
|
@@ -59,11 +59,11 @@ export var getCornerRadius = function (cornerRadius, props) {
|
|
|
59
59
|
|
|
60
60
|
if (_isPlainObject(cornerRadius)) {
|
|
61
61
|
return getCornerRadiusFromObject(cornerRadius, props);
|
|
62
|
-
} else {
|
|
63
|
-
realCornerRadius.topLeft = Helpers.evaluateProp(cornerRadius, props);
|
|
64
|
-
realCornerRadius.topRight = Helpers.evaluateProp(cornerRadius, props);
|
|
65
|
-
return realCornerRadius;
|
|
66
62
|
}
|
|
63
|
+
|
|
64
|
+
realCornerRadius.topLeft = Helpers.evaluateProp(cornerRadius, props);
|
|
65
|
+
realCornerRadius.topRight = Helpers.evaluateProp(cornerRadius, props);
|
|
66
|
+
return realCornerRadius;
|
|
67
67
|
};
|
|
68
68
|
export var getStyle = function () {
|
|
69
69
|
var style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -85,9 +85,9 @@ var getStartAngle = function (props, index) {
|
|
|
85
85
|
return scale.x.range()[0];
|
|
86
86
|
} else if (alignment === "start" || alignment === "end") {
|
|
87
87
|
return alignment === "start" ? previousAngle : currentAngle;
|
|
88
|
-
} else {
|
|
89
|
-
return (currentAngle + previousAngle) / 2;
|
|
90
88
|
}
|
|
89
|
+
|
|
90
|
+
return (currentAngle + previousAngle) / 2;
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
var getEndAngle = function (props, index) {
|
|
@@ -103,9 +103,9 @@ var getEndAngle = function (props, index) {
|
|
|
103
103
|
return lastAngle;
|
|
104
104
|
} else if (alignment === "start" || alignment === "end") {
|
|
105
105
|
return alignment === "start" ? currentAngle : nextAngle;
|
|
106
|
-
} else {
|
|
107
|
-
return (currentAngle + nextAngle) / 2;
|
|
108
106
|
}
|
|
107
|
+
|
|
108
|
+
return (currentAngle + nextAngle) / 2;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
var mapPointsToPath = function (coords, cornerRadius, direction) {
|
package/es/v37/victory-bar.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ export interface VictoryBarProps extends VictoryCalculatedStateProps {
|
|
|
18
18
|
groupComponent?: React.ReactElement;
|
|
19
19
|
horizontal?: boolean;
|
|
20
20
|
}
|
|
21
|
-
declare const _default:
|
|
21
|
+
declare const _default: React.FC<VictoryBarProps>;
|
|
22
22
|
export default _default;
|
|
23
23
|
//# sourceMappingURL=victory-bar.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
declare const _default: {
|
|
2
3
|
title: string;
|
|
3
|
-
component:
|
|
4
|
+
component: React.FC<import("./victory-bar").VictoryBarProps>;
|
|
4
5
|
};
|
|
5
6
|
export default _default;
|
|
6
7
|
export declare const Demo: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/no-multi-comp */
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import VictoryBar from "./victory-bar";
|
|
4
|
-
import VictoryChart from "victory-chart/
|
|
4
|
+
import VictoryChart from "victory-chart/es/v37/victory-chart";
|
|
5
5
|
export default {
|
|
6
6
|
title: "v37/VictoryBar",
|
|
7
7
|
component: VictoryBar
|
package/es/victory-bar-beta.js
CHANGED
|
@@ -10,7 +10,7 @@ import { useData, useDomain, useScale, VictoryContainer, VictoryProvider } from
|
|
|
10
10
|
import Bar from "./bar";
|
|
11
11
|
import { getBarPosition } from "./helper-methods"; // This is a demo component that uses VictoryProvider to access calculated props and state.
|
|
12
12
|
// This component does not include events, animations, or styling.
|
|
13
|
-
// To test
|
|
13
|
+
// To test out, swap out the VictoryBar export in ./index.js and run `pnpm run storybook:server`.
|
|
14
14
|
|
|
15
15
|
var defaultProps = {
|
|
16
16
|
data: [{
|
|
@@ -74,11 +74,11 @@ var getCornerRadius = function (cornerRadius, props) {
|
|
|
74
74
|
|
|
75
75
|
if ((0, _isPlainObject2.default)(cornerRadius)) {
|
|
76
76
|
return getCornerRadiusFromObject(cornerRadius, props);
|
|
77
|
-
} else {
|
|
78
|
-
realCornerRadius.topLeft = _victoryCore.Helpers.evaluateProp(cornerRadius, props);
|
|
79
|
-
realCornerRadius.topRight = _victoryCore.Helpers.evaluateProp(cornerRadius, props);
|
|
80
|
-
return realCornerRadius;
|
|
81
77
|
}
|
|
78
|
+
|
|
79
|
+
realCornerRadius.topLeft = _victoryCore.Helpers.evaluateProp(cornerRadius, props);
|
|
80
|
+
realCornerRadius.topRight = _victoryCore.Helpers.evaluateProp(cornerRadius, props);
|
|
81
|
+
return realCornerRadius;
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
exports.getCornerRadius = getCornerRadius;
|
|
@@ -99,9 +99,9 @@ var getStartAngle = function (props, index) {
|
|
|
99
99
|
return scale.x.range()[0];
|
|
100
100
|
} else if (alignment === "start" || alignment === "end") {
|
|
101
101
|
return alignment === "start" ? previousAngle : currentAngle;
|
|
102
|
-
} else {
|
|
103
|
-
return (currentAngle + previousAngle) / 2;
|
|
104
102
|
}
|
|
103
|
+
|
|
104
|
+
return (currentAngle + previousAngle) / 2;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
var getEndAngle = function (props, index) {
|
|
@@ -117,9 +117,9 @@ var getEndAngle = function (props, index) {
|
|
|
117
117
|
return lastAngle;
|
|
118
118
|
} else if (alignment === "start" || alignment === "end") {
|
|
119
119
|
return alignment === "start" ? currentAngle : nextAngle;
|
|
120
|
-
} else {
|
|
121
|
-
return (currentAngle + nextAngle) / 2;
|
|
122
120
|
}
|
|
121
|
+
|
|
122
|
+
return (currentAngle + nextAngle) / 2;
|
|
123
123
|
};
|
|
124
124
|
|
|
125
125
|
var mapPointsToPath = function (coords, cornerRadius, direction) {
|
package/lib/v37/victory-bar.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ export interface VictoryBarProps extends VictoryCalculatedStateProps {
|
|
|
18
18
|
groupComponent?: React.ReactElement;
|
|
19
19
|
horizontal?: boolean;
|
|
20
20
|
}
|
|
21
|
-
declare const _default:
|
|
21
|
+
declare const _default: React.FC<VictoryBarProps>;
|
|
22
22
|
export default _default;
|
|
23
23
|
//# sourceMappingURL=victory-bar.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
declare const _default: {
|
|
2
3
|
title: string;
|
|
3
|
-
component:
|
|
4
|
+
component: React.FC<import("./victory-bar").VictoryBarProps>;
|
|
4
5
|
};
|
|
5
6
|
export default _default;
|
|
6
7
|
export declare const Demo: {
|
|
@@ -9,7 +9,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _victoryBar = _interopRequireDefault(require("./victory-bar"));
|
|
11
11
|
|
|
12
|
-
var _victoryChart = _interopRequireDefault(require("victory-chart/
|
|
12
|
+
var _victoryChart = _interopRequireDefault(require("victory-chart/es/v37/victory-chart"));
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
package/lib/victory-bar-beta.js
CHANGED
|
@@ -28,7 +28,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
28
28
|
|
|
29
29
|
// This is a demo component that uses VictoryProvider to access calculated props and state.
|
|
30
30
|
// This component does not include events, animations, or styling.
|
|
31
|
-
// To test
|
|
31
|
+
// To test out, swap out the VictoryBar export in ./index.js and run `pnpm run storybook:server`.
|
|
32
32
|
var defaultProps = {
|
|
33
33
|
data: [{
|
|
34
34
|
x: 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-bar",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.6.2",
|
|
4
4
|
"description": "Bar 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-chart": "*",
|
|
33
|
+
"victory-bar": "*"
|
|
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
|
+
}
|
|
@@ -56,11 +56,10 @@ export const getCornerRadius = (cornerRadius, props) => {
|
|
|
56
56
|
}
|
|
57
57
|
if (isPlainObject(cornerRadius)) {
|
|
58
58
|
return getCornerRadiusFromObject(cornerRadius, props);
|
|
59
|
-
} else {
|
|
60
|
-
realCornerRadius.topLeft = Helpers.evaluateProp(cornerRadius, props);
|
|
61
|
-
realCornerRadius.topRight = Helpers.evaluateProp(cornerRadius, props);
|
|
62
|
-
return realCornerRadius;
|
|
63
59
|
}
|
|
60
|
+
realCornerRadius.topLeft = Helpers.evaluateProp(cornerRadius, props);
|
|
61
|
+
realCornerRadius.topRight = Helpers.evaluateProp(cornerRadius, props);
|
|
62
|
+
return realCornerRadius;
|
|
64
63
|
};
|
|
65
64
|
|
|
66
65
|
export const getStyle = (style = {}, props) => {
|
|
@@ -60,9 +60,8 @@ const getStartAngle = (props, index) => {
|
|
|
60
60
|
return scale.x.range()[0];
|
|
61
61
|
} else if (alignment === "start" || alignment === "end") {
|
|
62
62
|
return alignment === "start" ? previousAngle : currentAngle;
|
|
63
|
-
} else {
|
|
64
|
-
return (currentAngle + previousAngle) / 2;
|
|
65
63
|
}
|
|
64
|
+
return (currentAngle + previousAngle) / 2;
|
|
66
65
|
};
|
|
67
66
|
|
|
68
67
|
const getEndAngle = (props, index) => {
|
|
@@ -81,9 +80,8 @@ const getEndAngle = (props, index) => {
|
|
|
81
80
|
return lastAngle;
|
|
82
81
|
} else if (alignment === "start" || alignment === "end") {
|
|
83
82
|
return alignment === "start" ? currentAngle : nextAngle;
|
|
84
|
-
} else {
|
|
85
|
-
return (currentAngle + nextAngle) / 2;
|
|
86
83
|
}
|
|
84
|
+
return (currentAngle + nextAngle) / 2;
|
|
87
85
|
};
|
|
88
86
|
|
|
89
87
|
const mapPointsToPath = (coords, cornerRadius, direction) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/no-multi-comp */
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import VictoryBar from "./victory-bar";
|
|
4
|
-
import VictoryChart from "victory-chart/
|
|
4
|
+
import VictoryChart from "victory-chart/es/v37/victory-chart";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "v37/VictoryBar",
|
package/src/victory-bar-beta.tsx
CHANGED
|
@@ -17,7 +17,7 @@ import { getBarPosition } from "./helper-methods";
|
|
|
17
17
|
|
|
18
18
|
// This is a demo component that uses VictoryProvider to access calculated props and state.
|
|
19
19
|
// This component does not include events, animations, or styling.
|
|
20
|
-
// To test
|
|
20
|
+
// To test out, swap out the VictoryBar export in ./index.js and run `pnpm run storybook:server`.
|
|
21
21
|
|
|
22
22
|
const defaultProps: VictoryProviderProps = {
|
|
23
23
|
data: [
|