import { EChartsReactProps } from 'echarts-for-react'; /** * 图表类型定义 */ export type EChartsProps = Partial & { /** * 是否开发模式 * @default false * @description 开发模式下,在渲染之前,会在控制台打印出图表 option 信息,方便用户操作 option */ readonly isDev?: boolean; /** * chart data, default is `[]` */ readonly data?: T; /** * chart config, default is `{}` */ readonly config?: K; /** * 拓展配置 */ readonly ext?: Record; /** * 当改变时间时 */ readonly onTimeChange?: (params: Record) => void; /** * 当 BubbleUp 时 */ readonly onBubbleUp?: (params: Record) => void; }; /** * 时序图配置 */ export type TimeSeriesChartConfig = { /** * 图表类型 * @default 'line' * @description 'line' | 'area' | 'bar' */ type?: 'line' | 'area' | 'bar'; /** * 大小 */ size?: string | string[]; /** 图例 */ legend?: { show?: boolean; position?: 'bottom' | 'right'; }; /** 提示框 */ tooltip?: { show?: boolean; }; /** 标签 */ label?: string; /** 时间相关 */ time?: { /** 粒度--数值 */ timeNum?: number; /** 粒度--单位 */ timeUnit?: string; }; }; /** * 分类柱状图配置 */ export type BarChartConfig = { /** * 图表类型 * @default 'pie' * @description 'pie' | 'donut' | 'donut-round' */ type?: 'vertical' | 'horizontal'; /** * 大小 */ size?: string | string[]; /** 图例 */ legend?: { show?: boolean; position?: 'bottom' | 'right'; }; /** 提示框 */ tooltip?: { show?: boolean; }; label?: { show?: boolean; }; }; /** * 饼状图配置 */ export type PieChartConfig = { /** * 图表类型 * @default 'pie' * @description 'pie' | 'donut' */ type?: 'pie' | 'donut'; /** * 大小 * default is '70%' 或者 ['40%', '70%'] */ size?: string | string[]; /** * 自定义配置 */ custom?: PieChartConfigPieType | PieChartConfigDonutType | any; }; /** * 饼图配置--饼图类型 */ type PieChartConfigPieType = { /** 提示框 */ tooltip?: { show?: boolean; }; /** * 标签 */ label?: { show?: boolean; }; }; /** 饼图配置--环形图类型 */ type PieChartConfigDonutType = { /** 是否支持圆角 */ rounded?: number; /** 标签 */ label?: { fontSize?: number; }; }; /** * 热力图配置 */ export type HeatmapChartConfig = { /** * 图表类型 */ type?: ''; /** 标签 */ label?: string; /** 时间相关 */ time?: { /** 粒度--数值 */ timeNum?: number; /** 粒度--单位 */ timeUnit?: string; }; }; /** 图表颜色 */ export declare const ChartColor: { default: string[]; defaultExtension: string[]; }; /** 图表数据类型 */ export type ChartData = { /** x轴的值 */ x: string | number | boolean; /** y轴的值 */ y: string | number | boolean; /** 系列 */ s: string | number | boolean; /** 值,用于 visualMap 映射 */ value?: string | number; }; /** Heatmap数据类型 */ export type HeatmapChartData = { /** x轴的值:13位时间戳 */ x: number; /** y轴的值:如 1-2 */ y: string; /** 系列 */ s?: string; /** 值,用于 visualMap 映射 */ value: number; }; declare global { interface Window { __POWERED_BY_WUJIE__?: boolean; __WUJIE_PUBLIC_PATH__: string; __WUJIE_RAW_DOCUMENT_QUERY_SELECTOR__: typeof Document.prototype.querySelector; __WUJIE_RAW_DOCUMENT_QUERY_SELECTOR_ALL__: typeof Document.prototype.querySelectorAll; __WUJIE_RAW_WINDOW__: Window; __WUJIE: any; __WUJIE_MOUNT: () => void; __WUJIE_UNMOUNT: () => void; $wujie: { bus: any; shadowRoot?: ShadowRoot; props: { [key: string]: any; }; location?: Object; }; } } export {};