@dfsj/echarts
Version:
专业的水文曲线组件或构造函数以及通用的echart二次封装图表
137 lines (136 loc) • 3.23 kB
TypeScript
export interface Config {
color: string[];
areaColor: Record<string, string>;
indexColor: Record<number, string>;
markColor: Record<string | number, string>;
rainfallColor: string[];
icon: Record<string, string>;
resizeDelay: number;
mark: {
series: {
z: number;
name: string;
type: string;
color: string;
};
shape: {
symbol: {
label: Record<string, unknown>;
};
index: {
lineStyle: Record<string, unknown>;
};
rect: Record<string, unknown>;
line: {
itemStyle: Record<string, unknown>;
};
text: {
label: Record<string, unknown>;
};
};
side: Array<{
symbol: string;
itemStyle: Record<string, unknown>;
label: Record<string, unknown>;
}>;
};
tooltip: (items: Array<{
marker: string;
seriesName: string;
value: any[];
encode: {
y: number[];
};
axisValueLabel: string;
}>) => string;
}
export interface EChartsGlobalOptions {
$export: {
file?: string;
sheet?: string;
prevent: boolean;
};
color: string[];
toolbox: Record<string, unknown>;
grid: Record<string, unknown>;
tooltip: Record<string, unknown>;
dataset: {
sourceHeader: boolean;
source: unknown[];
};
axisPointer: Record<string, unknown>;
series: unknown[] | null;
}
declare const config: Config;
export declare const options: EChartsGlobalOptions;
export declare const axis: {
axisLine: {
show: boolean;
lineStyle: {
color: string;
};
};
axisLabel: {
color: string;
fontSize: number;
};
axisTick: {
show: boolean;
lineStyle: {
color: string;
};
};
splitLine: {
show: boolean;
lineStyle: {
color: string;
type: "dashed";
};
};
nameTextStyle: {
color: string;
fontSize: number;
};
};
export declare const CATEGORY: {
RAINFALL: number;
STAGE: number;
FLOW: number;
CAPACITY: number;
SWC: number;
OTHER: number;
TOP_LEFT: number;
TOP_RIGHT: number;
MIDDLE_LEFT: number;
MIDDLE_RIGHT: number;
BOTTOM_LEFT: number;
BOTTOM_RIGHT: number;
};
export declare const TYPE_SYMBOL: {
top: string;
bottom: string;
under: string;
current: string;
};
export interface EChartsConfigOverrides {
color?: string[];
axis?: Partial<typeof axis>;
grid?: Record<string, unknown>;
tooltip?: Record<string, unknown>;
}
export declare function createEChartsConfig(overrides?: EChartsConfigOverrides): {
color: string[];
axis: any;
grid: any;
tooltip: any;
};
export declare const colorScheme: {
readonly primary: string;
readonly secondary: string;
readonly danger: string;
readonly warning: string;
readonly safe: string;
readonly current: string;
readonly extreme: string;
};
export default config;