import { PropType } from 'vue'; /** * 单个数据点 */ export interface BarDataItem { name: string; value: number; on?: boolean; [key: string]: any; } /** * 柱状图数据项(单系列或复合系列的每个系列) */ export interface BarDatum { name: string; value: number; type?: string; mode?: string; yAxis?: 'left' | 'right'; on?: boolean; /** 复合系列时使用嵌套 data 代替 value */ data?: BarDataItem[]; [key: string]: any; } /** * 渐变色配置 */ export interface ColorGradient { start: string; end: string; } export interface LegendConfig { show?: boolean; position?: string; icon?: string; orient?: string; [key: string]: any; } export interface SplitConfig { type?: string; color?: string; show?: boolean; } export interface AxisStyleConfig { type?: string; color?: string; textColor?: string; show?: boolean; } export type EchartsBarShape = '' | 'cube' | 'cylinder'; export interface EchartsBarProps { data?: BarDatum[]; type?: string; color?: string | ColorGradient | ColorGradient[]; borderColor?: string; borderRadius?: string | number; /** 柱状图形状:cube(方柱3D) / cylinder(圆柱3D),空值为普通2D */ shape?: EchartsBarShape; dir?: 'v' | 'h'; fontSize?: string | number; width?: string | number; height?: string | number; rotate?: number; legend?: LegendConfig; split?: SplitConfig; xAxisStyle?: AxisStyleConfig; yAxisStyle?: AxisStyleConfig; rightYAxisStyle?: AxisStyleConfig; unit?: string; rightUnit?: string; showValue?: boolean; showTooltip?: boolean; tipFontSize?: string | number; interval?: number | string; tooltipType?: string; tooltipTextColor?: string; tooltipBgColor?: string; tooltipBorderColor?: string; showDefaultTooltip?: boolean; showMaxMarkPoint?: boolean; } export declare const echartsBarProps: { data: { type: PropType; default: () => any[]; }; type: { type: StringConstructor; default: string; }; color: { type: PropType; default: string; }; borderColor: { type: StringConstructor; default: string; }; borderRadius: { type: (NumberConstructor | StringConstructor)[]; default: number; }; shape: { type: PropType; default: string; }; dir: { type: PropType<"v" | "h">; default: string; }; fontSize: { type: (NumberConstructor | StringConstructor)[]; default: number; }; width: { type: (NumberConstructor | StringConstructor)[]; default: string; }; height: { type: (NumberConstructor | StringConstructor)[]; default: string; }; rotate: { type: NumberConstructor; default: number; }; legend: { type: PropType; default: () => { show: boolean; position: string; }; }; split: { type: PropType; default: () => { type: string; color: string; show: boolean; }; }; xAxisStyle: { type: PropType; default: () => { type: string; color: string; textColor: string; show: boolean; }; }; yAxisStyle: { type: PropType; default: () => { type: string; color: string; textColor: string; show: boolean; }; }; rightYAxisStyle: { type: PropType; default: () => { type: string; color: string; textColor: string; show: boolean; }; }; unit: { type: StringConstructor; default: string; }; rightUnit: { type: StringConstructor; default: string; }; showValue: { type: BooleanConstructor; default: boolean; }; showTooltip: { type: BooleanConstructor; default: boolean; }; tipFontSize: { type: (NumberConstructor | StringConstructor)[]; default: number; }; interval: { type: NumberConstructor; default: number; }; tooltipType: { type: StringConstructor; default: string; }; tooltipTextColor: { type: StringConstructor; default: string; }; tooltipBgColor: { type: StringConstructor; default: string; }; tooltipBorderColor: { type: StringConstructor; default: string; }; showDefaultTooltip: { type: BooleanConstructor; default: boolean; }; mode: { type: StringConstructor; default: string; }; showMaxMarkPoint: { type: BooleanConstructor; default: boolean; }; }; export declare const echartsBarEmits: { 'item-click': (_: any) => boolean; };