import { DataItem } from './graph/base'; export type AxisData = { baseAxisData: DataItem[]; valueAxisData: DataItem[]; }; type LineStyleOptions = { color?: string; width?: number; type?: string; }; type AxisLineOptions = { show?: boolean; onZero?: boolean; symbol?: string; lineStyle?: LineStyleOptions; }; type AxisTickOptions = { show?: boolean; alignWithLabel?: boolean; length?: number; lineStyle?: LineStyleOptions; }; export type AxisLayoutData = { text: string; rotate: number; }; export type AxisLabelOptions = { show?: boolean; rotate?: number; margin?: number; formatter?: string | ((value: any) => string); color?: string; fontStyle?: string; fontWeight?: string; fontSize?: number; align?: 'left' | 'right' | 'center'; verticalAlign?: 'top' | 'bottom' | 'middle'; lineHeight?: number; padding?: number; width?: number; height?: number; overflow?: 'visible' | 'hidden'; }; /** * data: * 含义:类目数据 * 样例: * xAxis: { * type: 'category', * data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], * } * yAxis: { * type: 'value', * data: [1, 2, 3, 4, 5, 6, 7, 8, 9] * } */ interface SplitLineOptions { show?: boolean; } type CriticalValueFunction = (value: { min: number; max: number; }) => number | null | undefined; type CriticalValue = number | string | CriticalValueFunction; export interface AxisOptions { id?: string; show?: boolean; type?: 'category' | 'value' | 'time' | 'log'; name?: string; nameLocation?: 'start' | 'middle' | 'end'; nameGap?: number; boundaryGap?: boolean; scale?: boolean; splitNumber?: number; min?: CriticalValue; max?: CriticalValue; minInterval?: number; maxInterval?: number; axisLine?: AxisLineOptions; axisTick?: AxisTickOptions; axisLabel?: AxisLabelOptions; axisTextMode?: 'default' | 'classic'; splitLine?: SplitLineOptions; data?: Array; } export interface GeneralAxisOptions { x: AxisOptions; y: AxisOptions; } export {};