Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('get outer-label', () => {
expect(getElementLabels('outer')).toBeDefined();
});
import { getElementLabels, registerElementLabels } from '@antv/g2';
import { Shape, BBox, Marker } from '@antv/g';
import Polar from '@antv/coord/lib/coord/polar';
import _ from 'lodash';
import { getEndPoint, getQuadrantByAngle, getOverlapArea, inPanel, getCenter } from '../utils';
import { LabelItem as BaseLabelItem } from '@antv/component/lib/interface';
const PieElementLabels = getElementLabels('pie');
/** upgrade-pie label config */
interface LabelItem extends BaseLabelItem {
offset?: number;
labelLine?: {
smooth?: boolean;
};
}
/** 默认label和element的偏移 16px */
const DEFAULT_OFFSET = 16;
const DEFAULT_TEXT_LINE_OFFSET = 4;
const MaxOverlapArea = 28;
type C = {
rx: number;
ry: number;