Skip to content

Commit

Permalink
feat: export utils of shape (#3693)
Browse files Browse the repository at this point in the history
  • Loading branch information
visiky committed Oct 27, 2021
1 parent edb61ea commit 8dea465
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/core.ts
Expand Up @@ -60,6 +60,9 @@ import { getAngle, getSectorPath, polarToCartesian } from './util/graphics';
import { rotate, transform, translate, zoom } from './util/transform';
import { getTooltipItems } from './util/tooltip';
import { getDelegationObject } from './interaction/action/util';
import { getPathPoints } from './geometry/shape/util/get-path-points';
import { getPath } from './geometry/shape/line';

export const Util = {
getLegendItems,
translate,
Expand All @@ -72,4 +75,7 @@ export const Util = {
getDelegationObject,
getTooltipItems,
getMappingValue,
// shape 的一些操作方法
getPath,
getPathPoints,
};
5 changes: 4 additions & 1 deletion src/geometry/shape/line/index.ts
Expand Up @@ -82,7 +82,10 @@ function getRangePath(
return topPath.concat(bottomPath);
}

function getPath(
/**
* 获取折线图 path
*/
export function getPath(
points: Point[] | RangePoint[],
isInCircle: boolean,
isStack?: boolean,
Expand Down

0 comments on commit 8dea465

Please sign in to comment.