UNPKG

@alicloud/cloud-charts

Version:

![](https://img.shields.io/npm/v/@alicloud/cloud-charts?color=%23ff8200)

56 lines (55 loc) 1.88 kB
import { Chart, View, Types, G2Dependents, Status } from './types'; export interface GuideConfig { visible?: boolean; line?: GuideLineConfig | GuideLineConfig[]; area?: GuideAreaConfig | GuideAreaConfig[]; filter?: GuideFilterConfig | GuideFilterConfig[]; } /** * 绘制辅助标记通用函数 * * @param {Chart} chart 图表实例 * @param {object} config 图表配置项 * * */ export default function (chart: Chart, config: { guide?: GuideConfig; }): void; interface GuideLineTextConfig extends Omit<G2Dependents.LineAnnotationTextCfg, 'content'> { title: string | number; align?: 'start' | 'center' | 'end' | 'left' | 'right'; } export interface GuideLineConfig { top?: boolean; status?: Status; axis?: 'x' | 'y' | 'y0' | 'y1'; value?: number | string; start?: Types.AnnotationPosition; end?: Types.AnnotationPosition; style?: G2Dependents.ShapeAttrs; text?: string | GuideLineTextConfig; } export declare function drawGuideLine(chart: Chart | View, guideLine: GuideLineConfig, config?: any): void; export interface GuideAreaConfig { top?: boolean; status?: Status; axis?: 'x' | 'y' | 'y0' | 'y1'; value?: [number | string, number | string]; start?: Types.AnnotationPosition; end?: Types.AnnotationPosition; style?: G2Dependents.ShapeAttrs; } export declare function drawGuideArea(chart: Chart | View, guideArea: GuideAreaConfig): void; export interface GuideFilterConfig { top?: boolean; status?: Status; axis?: 'x' | 'y' | 'y0' | 'y1'; value?: [number | string, number | string]; start?: Types.AnnotationPosition; end?: Types.AnnotationPosition; apply?: string[]; style?: G2Dependents.ShapeAttrs; useGradient?: boolean; } export declare function drawGuideFilter(chart: Chart | View, guideFilter: GuideFilterConfig, config?: any): void; export {};