-
Notifications
You must be signed in to change notification settings - Fork 597
Expand file tree
/
Copy pathlab.ts
More file actions
34 lines (31 loc) · 852 Bytes
/
lab.ts
File metadata and controls
34 lines (31 loc) · 852 Bytes
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
import { Mix } from './plots/mix';
/** 实验室图表所处的阶段 */
export enum Stage {
DEV = 'DEV',
BETA = 'BETA',
STABLE = 'STABLE',
}
/**
* 不同阶段打印一些消息给开发者
* @param stage
*/
export function notice(stage: Stage, plotType: string) {
console.warn(
stage === Stage.DEV
? `Plot '${plotType}' is in DEV stage, just give us issues.`
: stage === Stage.BETA
? `Plot '${plotType}' is in BETA stage, DO NOT use it in production env.`
: stage === Stage.STABLE
? `Plot '${plotType}' is in STABLE stage, import it by "import { ${plotType} } from '@antv/g2plot'".`
: 'invalid Stage type.'
);
}
/**
* 实验室图表,实验室中的图表分成不同的阶段。
*/
export class Lab {
static get MultiView() {
notice(Stage.STABLE, 'MultiView');
return Mix;
}
}