@antv/g2plot
Version:
G2 Plot, a market of plots built with the Grammar of Graphics'
56 lines (55 loc) • 1.71 kB
TypeScript
import { LayerConfig } from '../../base/layer';
import ViewLayer, { ViewConfig } from '../../base/view-layer';
import { LineStyle } from '../line/layer';
import './component/label/rose-label';
interface RoseStyle extends LineStyle {
stroke?: string;
lineWidth?: number;
}
export interface RoseViewConfig extends ViewConfig {
radiusField: string;
categoryField: string;
colorField?: string;
stackField?: string;
groupField?: string;
radius?: number;
innerRadius?: number;
/** 每个扇形切片的样式 */
sectorStyle?: RoseStyle | ((...args: any[]) => RoseStyle);
label?: RoseLabel;
}
declare type RoseLabel = ViewConfig['label'] & {
type: 'outer' | 'inner';
/** 自动调整颜色 */
adjustColor?: boolean;
/** 自动旋转 */
autoRotate?: boolean;
};
export interface RoseLayerConfig extends RoseViewConfig, LayerConfig {
}
export default class RoseLayer<T extends RoseLayerConfig = RoseLayerConfig> extends ViewLayer<T> {
static getDefaultOptions(): any;
rose: any;
type: string;
getOptions(props: T): any;
protected geometryParser(dim: any, type: any): any;
protected scale(): void;
/** 不显示坐标轴 */
protected axis(): void;
protected coord(): void;
protected addGeometry(): void;
protected adjustColorFieldMapping(): void;
protected adjustRoseAdjust(): {
type: string;
}[] | {
type: string;
marginRatio: number;
}[];
protected animation(): void;
protected annotation(): void;
protected parseEvents(eventParser: any): void;
protected extractLabel(): any;
private adjustLabelOptions;
private adjustLegendOptions;
}
export {};