1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
| import type { ComposeOption } from 'echarts/core';
| import type { BarSeriesOption, LineSeriesOption, PieSeriesOption } from 'echarts/charts';
| import type {
| TitleComponentOption,
| TooltipComponentOption,
| GridComponentOption,
| DatasetComponentOption,
| LegendComponentOption,
| } from 'echarts/components';
|
| // 主题类型
| export type ThemeType = 'light' | 'dark' | (string & {});
|
| // 扩展配置接口
| export interface ChartExtendedConfig {
| enableNumberFormat?: boolean; // 是否启用数值格式化
| }
|
| // 组合ECharts需要的组件类型
| export type ECOption = ComposeOption<
| | BarSeriesOption
| | LineSeriesOption
| | PieSeriesOption
| | TitleComponentOption
| | TooltipComponentOption
| | GridComponentOption
| | DatasetComponentOption
| | LegendComponentOption
| >;
|
| export interface ChartProps {
| options: ECOption;
| width?: string;
| height?: string;
| theme?: ThemeType;
| extendedConfig?: ChartExtendedConfig; // 添加扩展配置
| }
|
|