Skip to content

Commit 8dea465

Browse files
authored
feat: export utils of shape (#3693)
1 parent edb61ea commit 8dea465

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/core.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ import { getAngle, getSectorPath, polarToCartesian } from './util/graphics';
6060
import { rotate, transform, translate, zoom } from './util/transform';
6161
import { getTooltipItems } from './util/tooltip';
6262
import { getDelegationObject } from './interaction/action/util';
63+
import { getPathPoints } from './geometry/shape/util/get-path-points';
64+
import { getPath } from './geometry/shape/line';
65+
6366
export const Util = {
6467
getLegendItems,
6568
translate,
@@ -72,4 +75,7 @@ export const Util = {
7275
getDelegationObject,
7376
getTooltipItems,
7477
getMappingValue,
78+
// shape 的一些操作方法
79+
getPath,
80+
getPathPoints,
7581
};

src/geometry/shape/line/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ function getRangePath(
8282
return topPath.concat(bottomPath);
8383
}
8484

85-
function getPath(
85+
/**
86+
* 获取折线图 path
87+
*/
88+
export function getPath(
8689
points: Point[] | RangePoint[],
8790
isInCircle: boolean,
8891
isStack?: boolean,

0 commit comments

Comments
 (0)