You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.3 KiB

4 months ago
import { Circle } from './circle';
import type { BaseStyleProps, DisplayObjectConfig, Group } from '@antv/g';
import type { CategoricalPalette } from '../../palettes/types';
import type { DonutRound, Prefix } from '../../types';
import type { CircleStyleProps } from './circle';
/**
* <zh/>
*
* <en/> Donut node style props
*/
export interface DonutStyleProps extends CircleStyleProps, Prefix<'donut', BaseStyleProps> {
/**
* <zh/> 使
*
* <en/> Inner ring radius, using percentage or pixel value.
* @defaultValue '50%'
*/
innerR?: string | number;
/**
* <zh/>
*
* <en/> Donut data.
*/
donuts?: number[] | DonutRound[];
/**
* <zh/>
*
* <en/> Color or palette.
* @defaultValue 'tableau'
*/
donutPalette?: string | CategoricalPalette;
}
/**
* <zh/>
*
* <en/> Donut node
*/
export declare class Donut extends Circle {
static defaultStyleProps: Partial<DonutStyleProps>;
constructor(options: DisplayObjectConfig<DonutStyleProps>);
private parseOuterR;
private parseInnerR;
protected drawDonutShape(attributes: Required<DonutStyleProps>, container: Group): void;
render(attributes: Required<DonutStyleProps>, container?: Group): void;
}