victory-canvas 37.3.1 → 37.3.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 +2 -0
- package/dist/victory-canvas.js +0 -15
- package/es/canvas-point.js +0 -1
- package/lib/canvas-point.js +0 -1
- package/package.json +7 -11
- package/src/canvas-curve.tsx +1 -1
- package/src/canvas-point.tsx +3 -3
package/CHANGELOG.md
CHANGED
package/dist/victory-canvas.js
CHANGED
|
@@ -291,7 +291,6 @@ const CanvasPoint = props => {
|
|
|
291
291
|
} = modifiedProps;
|
|
292
292
|
const path = getPath(modifiedProps);
|
|
293
293
|
ctx.fillStyle = style.fill;
|
|
294
|
-
// eslint-disable-next-line no-undef
|
|
295
294
|
const path2d = new Path2D(path);
|
|
296
295
|
ctx.fill(path2d);
|
|
297
296
|
}, [modifiedProps]);
|
|
@@ -2269,7 +2268,6 @@ const circle = (center, radius) => ({
|
|
|
2269
2268
|
// Left-most point is returned as 0th element of array
|
|
2270
2269
|
// Right-most point is returned as 1st elemennt of array
|
|
2271
2270
|
intersection(circle1) {
|
|
2272
|
-
// eslint-disable-line max-statements
|
|
2273
2271
|
const P0 = this.center;
|
|
2274
2272
|
const P1 = circle1.center;
|
|
2275
2273
|
const r0 = this.radius;
|
|
@@ -2436,8 +2434,6 @@ const getVerticalBarPoints = (position, sign, cr) => {
|
|
|
2436
2434
|
y0,
|
|
2437
2435
|
y1
|
|
2438
2436
|
} = position;
|
|
2439
|
-
|
|
2440
|
-
// eslint-disable-next-line max-statements, max-len
|
|
2441
2437
|
const getHalfPoints = side => {
|
|
2442
2438
|
const isLeft = side === "Left";
|
|
2443
2439
|
const signL = isLeft ? 1 : -1;
|
|
@@ -2521,8 +2517,6 @@ const getHorizontalBarPoints = (position, sign, cr) => {
|
|
|
2521
2517
|
} = position;
|
|
2522
2518
|
const x0 = position.x0 < position.x1 ? position.x0 : position.x1;
|
|
2523
2519
|
const x1 = position.x0 < position.x1 ? position.x1 : position.x0;
|
|
2524
|
-
|
|
2525
|
-
// eslint-disable-next-line max-statements, max-len
|
|
2526
2520
|
const getHalfPoints = side => {
|
|
2527
2521
|
const isTop = side === "top";
|
|
2528
2522
|
const signL = isTop ? -1 : 1;
|
|
@@ -2602,8 +2596,6 @@ const getHorizontalBarPoints = (position, sign, cr) => {
|
|
|
2602
2596
|
// eslint-disable-next-line no-magic-numbers
|
|
2603
2597
|
bottomPoints[3], bottomPoints[2]];
|
|
2604
2598
|
};
|
|
2605
|
-
|
|
2606
|
-
// eslint-disable-next-line max-params
|
|
2607
2599
|
const getVerticalBarPath = (props, width, cornerRadius) => {
|
|
2608
2600
|
const position = getPosition(props, width);
|
|
2609
2601
|
const sign = position.y0 > position.y1 ? 1 : -1;
|
|
@@ -2611,8 +2603,6 @@ const getVerticalBarPath = (props, width, cornerRadius) => {
|
|
|
2611
2603
|
const points = getVerticalBarPoints(position, sign, cornerRadius);
|
|
2612
2604
|
return mapPointsToPath(points, cornerRadius, direction);
|
|
2613
2605
|
};
|
|
2614
|
-
|
|
2615
|
-
// eslint-disable-next-line max-params
|
|
2616
2606
|
const getHorizontalBarPath = (props, width, cornerRadius) => {
|
|
2617
2607
|
const position = getPosition(props, width);
|
|
2618
2608
|
const sign = position.x0 < position.x1 ? 1 : -1;
|
|
@@ -2670,8 +2660,6 @@ const getVerticalPolarBarPath = (props, cornerRadius) => {
|
|
|
2670
2660
|
leftMiddle
|
|
2671
2661
|
};
|
|
2672
2662
|
};
|
|
2673
|
-
|
|
2674
|
-
// eslint-disable-next-line max-statements
|
|
2675
2663
|
const getTopPath = () => {
|
|
2676
2664
|
const {
|
|
2677
2665
|
topRight,
|
|
@@ -2714,8 +2702,6 @@ const getVerticalPolarBarPath = (props, cornerRadius) => {
|
|
|
2714
2702
|
coords: subCoords[i].split(",")
|
|
2715
2703
|
}));
|
|
2716
2704
|
};
|
|
2717
|
-
|
|
2718
|
-
// eslint-disable-next-line max-statements
|
|
2719
2705
|
const getBottomPath = () => {
|
|
2720
2706
|
const {
|
|
2721
2707
|
bottomRight,
|
|
@@ -2816,7 +2802,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2816
2802
|
|
|
2817
2803
|
|
|
2818
2804
|
|
|
2819
|
-
/* eslint-disable no-use-before-define */
|
|
2820
2805
|
|
|
2821
2806
|
// Private Functions
|
|
2822
2807
|
|
package/es/canvas-point.js
CHANGED
package/lib/canvas-point.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-canvas",
|
|
3
|
-
"version": "37.3.
|
|
3
|
+
"version": "37.3.2",
|
|
4
4
|
"description": "HTML5 Canvas Components for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
|
-
"victory-bar": "37.3.
|
|
25
|
-
"victory-core": "37.3.
|
|
24
|
+
"victory-bar": "37.3.2",
|
|
25
|
+
"victory-core": "37.3.2"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": ">=16.6.0"
|
|
@@ -214,11 +214,9 @@
|
|
|
214
214
|
]
|
|
215
215
|
},
|
|
216
216
|
"lint": {
|
|
217
|
-
"command": "
|
|
217
|
+
"command": "eslint src",
|
|
218
218
|
"files": [
|
|
219
|
-
"src/**"
|
|
220
|
-
"../../.eslintignore",
|
|
221
|
-
"../../.eslintrc.js"
|
|
219
|
+
"src/**"
|
|
222
220
|
],
|
|
223
221
|
"output": [],
|
|
224
222
|
"dependencies": [
|
|
@@ -232,11 +230,9 @@
|
|
|
232
230
|
]
|
|
233
231
|
},
|
|
234
232
|
"lint:fix": {
|
|
235
|
-
"command": "
|
|
233
|
+
"command": "eslint --fix src",
|
|
236
234
|
"files": [
|
|
237
|
-
"src/**"
|
|
238
|
-
"../../.eslintignore",
|
|
239
|
-
"../../.eslintrc.js"
|
|
235
|
+
"src/**"
|
|
240
236
|
],
|
|
241
237
|
"output": [],
|
|
242
238
|
"dependencies": [
|
package/src/canvas-curve.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import { LineRadial } from "../../victory-vendor/d3-shape";
|
|
|
10
10
|
|
|
11
11
|
export interface CanvasCurveProps extends VictoryCommonPrimitiveProps {
|
|
12
12
|
ariaLabel?: StringOrCallback;
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
14
14
|
interpolation?: string | Function;
|
|
15
15
|
openCurve?: boolean;
|
|
16
16
|
tabIndex?: NumberOrCallback;
|
package/src/canvas-point.tsx
CHANGED
|
@@ -10,9 +10,9 @@ import { useCanvasContext } from "./hooks/use-canvas-context";
|
|
|
10
10
|
export interface CanvasPointProps extends VictoryCommonPrimitiveProps {
|
|
11
11
|
datum?: any;
|
|
12
12
|
getPath?: (x: number, y: number, size: number) => string;
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
14
14
|
size?: number | Function;
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
16
16
|
symbol?: ScatterSymbolType | Function;
|
|
17
17
|
x?: number;
|
|
18
18
|
y?: number;
|
|
@@ -68,7 +68,7 @@ export const CanvasPoint = (props: CanvasPointProps) => {
|
|
|
68
68
|
const { style } = modifiedProps;
|
|
69
69
|
const path = getPath(modifiedProps);
|
|
70
70
|
ctx.fillStyle = style.fill;
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
const path2d = new Path2D(path);
|
|
73
73
|
ctx.fill(path2d);
|
|
74
74
|
},
|