48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
/*
|
||
* @FilePath: \daping\src\utils\echarts.d.ts
|
||
* @Author: 王路平
|
||
* @文件版本: V1.0.0
|
||
* @Date: 2023-01-30 11:37:13
|
||
* @Description:
|
||
*
|
||
* 版权信息 : 2023 by ${再登软件}, All Rights Reserved.
|
||
*/
|
||
import { ComposeOption } from 'echarts/core';
|
||
import {
|
||
BarSeriesOption,
|
||
LineSeriesOption,
|
||
GaugeSeriesOption,
|
||
CustomSeriesOption,
|
||
PieSeriesOption,
|
||
MapSeriesOption
|
||
} from 'echarts/charts';
|
||
//2.引入组件,也就是option选项中的类型
|
||
// import {LiquidfillChart,
|
||
// LiquidfillSeriesOption,} from 'echarts-liquidfill'
|
||
import {
|
||
// 组件类型的定义后缀都为 ComponentOption
|
||
TitleComponentOption,
|
||
TooltipComponentOption,
|
||
GridComponentOption,
|
||
// 数据集组件
|
||
DatasetComponentOption,
|
||
MarkLineComponentOption,
|
||
} from 'echarts/components';
|
||
|
||
// 3.通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型
|
||
type ECOption = ComposeOption<
|
||
| BarSeriesOption
|
||
| LineSeriesOption
|
||
| GaugeSeriesOption
|
||
| PieSeriesOption
|
||
| MapSeriesOption
|
||
| CustomSeriesOption
|
||
// | LiquidfillSeriesOption
|
||
| TitleComponentOption
|
||
| TooltipComponentOption
|
||
| GridComponentOption
|
||
| DatasetComponentOption
|
||
| MarkLineComponentOption
|
||
>;
|
||
// 4.将这个类型暴露出去
|
||
export { ECOption } |