UNPKG

utils-echart

Version:

Echart component

131 lines (130 loc) 3.53 kB
import * as echarts from "echarts"; import { FlyLineFormat, mapFlyLineFormat, mapPointFormat, defaultFlyLineFormat } from "./interface"; /** 地图类 */ export declare class Map { /** 是否开启下钻 */ static isDrill: boolean; /** 地图名称 */ static mapName: string; /** 层级列表 */ static mapList: string[]; /** 地图数据列表 */ static mapJsonList: { [key: string]: any; }; /** 地图配置项 */ static option: { backgroundColor: string; tooltip: { show: boolean; trigger: string; alwaysShowContent: boolean; backgroundColor: string; borderColor: string; showDelay: number; hideDelay: number; triggerOn: string; enterable: boolean; textStyle: { color: string; fontSize: string; width: number; height: number; overflow: string; }; }; geo: { map: string; roam: boolean; zlevel: number; zoom: number; label: { show: boolean; color: string; }; itemStyle: { areaColor: string; borderColor: string; borderType: string; borderWidth: number; }; emphasis: { itemStyle: { borderWidth: number; }; label: { color: string; }; }; tooltip: { show: boolean; }; regions: any[]; }; series: any[]; }; /** 飞线系列 */ static flySeries: { type: string; zlevel: number; effect: { show: boolean; period: number; trailLength: number; color: string; symbol: string; symbolSize: number; }; lineStyle: { show: boolean; color: string; width: number; opacity: number; curveness: number; }; data: FlyLineFormat[]; }; /** 飞线列表 */ static flyLineList: mapFlyLineFormat[]; /** 点位系列 */ static pointSeries: { type: string; coordinateSystem: string; zlevel: number; geoIndex: number; symbolSize: number; itemStyle: { color: string; }; encode: { tooltip: number; }; data: any[]; }; /** 点位列表 */ static pointList: mapPointFormat[]; /** * 设置飞线 * @param flyLine 飞线数据 */ static setFlyLine(flyLine: (defaultFlyLineFormat | FlyLineFormat)[]): void; /** * 设置点位 * @param point 点位数据 */ static setPoint(point: (string | any)[]): void; /** * 添加或删除层级列表 * @param action 操作(push or pop) */ static handleMapList(action: string): string; /** * 创建地图 * @param id 标签id */ static initMap(id: string): echarts.ECharts; /** * 初始化option,遍历是否有该地图飞线、点位数据 */ static initOption(): void; }