UNPKG

@alicloud/cloud-charts

Version:

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

38 lines (37 loc) 1.33 kB
import { IGroup } from '@antv/g-base'; import { Chart, Types, G2Dependents } from './types'; import { customFormatterConfig } from './common'; declare type avoidCallback = (isVertical: boolean, labelGroup: IGroup, limitLength?: number) => boolean; export interface XAxisConfig extends customFormatterConfig { visible?: boolean; alias?: boolean; autoRotate?: boolean | avoidCallback; rotate?: number; autoHide?: boolean | avoidCallback | string | { type?: string; cfg?: { /** 最小间距配置 */ minGap?: number; }; }; autoEllipsis?: boolean | 'head' | 'middle' | 'tail'; label?: Types.AxisCfg['label']; labelFormatter?: NonNullable<Types.AxisCfg['label']>['formatter']; tickLine?: boolean | G2Dependents.AxisTickLineCfg; overlapOrder?: string[]; customConfig?: Types.AxisCfg; categories?: number[] | string[]; } /** * rectXAxis 直角坐标系的X轴配置 * * @param {this} ctx 组件实例 this 指针 * @param {Chart} chart 图表实例 * @param {Object} config 配置项 * @param {Object} defaultConfig 组件的自定义配置 * */ export default function <T>(ctx: T, chart: Chart, config: { grid?: boolean; xAxis?: (Types.ScaleOption & XAxisConfig) | false; }, defaultConfig?: Types.AxisCfg): void; export {};