@visactor/vchart-extension 2.0.4-alpha.0 → 2.0.4-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +533 -0
- package/build/index.min.js +2 -2
- package/cjs/charts/candlestick/candlestick-transformer.d.ts +6 -0
- package/cjs/charts/candlestick/candlestick-transformer.js +24 -0
- package/cjs/charts/candlestick/candlestick-transformer.js.map +1 -0
- package/cjs/charts/candlestick/candlestick.d.ts +10 -0
- package/cjs/charts/candlestick/candlestick.js +25 -0
- package/cjs/charts/candlestick/candlestick.js.map +1 -0
- package/cjs/charts/candlestick/index.d.ts +3 -0
- package/cjs/charts/candlestick/index.js +22 -0
- package/cjs/charts/candlestick/index.js.map +1 -0
- package/cjs/charts/candlestick/interface.d.ts +6 -0
- package/cjs/charts/candlestick/interface.js +6 -0
- package/cjs/charts/candlestick/interface.js.map +1 -0
- package/cjs/charts/candlestick/mark/candlestick.d.ts +11 -0
- package/cjs/charts/candlestick/mark/candlestick.js +62 -0
- package/cjs/charts/candlestick/mark/candlestick.js.map +1 -0
- package/cjs/charts/candlestick/mark/interface.d.ts +9 -0
- package/cjs/charts/candlestick/mark/interface.js +6 -0
- package/cjs/charts/candlestick/mark/interface.js.map +1 -0
- package/cjs/charts/candlestick/series/animation.d.ts +32 -0
- package/cjs/charts/candlestick/series/animation.js +132 -0
- package/cjs/charts/candlestick/series/animation.js.map +1 -0
- package/cjs/charts/candlestick/series/candlestick.d.ts +105 -0
- package/cjs/charts/candlestick/series/candlestick.js +143 -0
- package/cjs/charts/candlestick/series/candlestick.js.map +1 -0
- package/cjs/charts/candlestick/series/constant.d.ts +77 -0
- package/cjs/charts/candlestick/series/constant.js +26 -0
- package/cjs/charts/candlestick/series/constant.js.map +1 -0
- package/cjs/charts/candlestick/series/interface.d.ts +20 -0
- package/cjs/charts/candlestick/series/interface.js +6 -0
- package/cjs/charts/candlestick/series/interface.js.map +1 -0
- package/cjs/charts/candlestick/series/theme.d.ts +3 -0
- package/cjs/charts/candlestick/series/theme.js +34 -0
- package/cjs/charts/candlestick/series/theme.js.map +1 -0
- package/cjs/charts/candlestick/series/tooltip-helper.d.ts +9 -0
- package/cjs/charts/candlestick/series/tooltip-helper.js +70 -0
- package/cjs/charts/candlestick/series/tooltip-helper.js.map +1 -0
- package/cjs/charts/conversion-funnel/constants.js +2 -1
- package/cjs/charts/funnel-3d/theme.js +1 -2
- package/cjs/charts/image-cloud/image-cloud-transformer.js +2 -1
- package/cjs/charts/pictogram/element-highlight-by-graphic-name.js +1 -1
- package/cjs/charts/pictogram/element-select-by-graphic-name.js +1 -1
- package/cjs/charts/pictogram/index.js +1 -1
- package/cjs/charts/pictogram/interface.js +1 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +3 -2
- package/cjs/index.js.map +1 -1
- package/esm/charts/candlestick/candlestick-transformer.d.ts +6 -0
- package/esm/charts/candlestick/candlestick-transformer.js +16 -0
- package/esm/charts/candlestick/candlestick-transformer.js.map +1 -0
- package/esm/charts/candlestick/candlestick.d.ts +10 -0
- package/esm/charts/candlestick/candlestick.js +22 -0
- package/esm/charts/candlestick/candlestick.js.map +1 -0
- package/esm/charts/candlestick/index.d.ts +3 -0
- package/esm/charts/candlestick/index.js +6 -0
- package/esm/charts/candlestick/index.js.map +1 -0
- package/esm/charts/candlestick/interface.d.ts +6 -0
- package/esm/charts/candlestick/interface.js +2 -0
- package/esm/charts/candlestick/interface.js.map +1 -0
- package/esm/charts/candlestick/mark/candlestick.d.ts +11 -0
- package/esm/charts/candlestick/mark/candlestick.js +58 -0
- package/esm/charts/candlestick/mark/candlestick.js.map +1 -0
- package/esm/charts/candlestick/mark/interface.d.ts +9 -0
- package/esm/charts/candlestick/mark/interface.js +2 -0
- package/esm/charts/candlestick/mark/interface.js.map +1 -0
- package/esm/charts/candlestick/series/animation.d.ts +32 -0
- package/esm/charts/candlestick/series/animation.js +124 -0
- package/esm/charts/candlestick/series/animation.js.map +1 -0
- package/esm/charts/candlestick/series/candlestick.d.ts +105 -0
- package/esm/charts/candlestick/series/candlestick.js +145 -0
- package/esm/charts/candlestick/series/candlestick.js.map +1 -0
- package/esm/charts/candlestick/series/constant.d.ts +77 -0
- package/esm/charts/candlestick/series/constant.js +27 -0
- package/esm/charts/candlestick/series/constant.js.map +1 -0
- package/esm/charts/candlestick/series/interface.d.ts +20 -0
- package/esm/charts/candlestick/series/interface.js +2 -0
- package/esm/charts/candlestick/series/interface.js.map +1 -0
- package/esm/charts/candlestick/series/theme.d.ts +3 -0
- package/esm/charts/candlestick/series/theme.js +52 -0
- package/esm/charts/candlestick/series/theme.js.map +1 -0
- package/esm/charts/candlestick/series/tooltip-helper.d.ts +9 -0
- package/esm/charts/candlestick/series/tooltip-helper.js +64 -0
- package/esm/charts/candlestick/series/tooltip-helper.js.map +1 -0
- package/esm/charts/conversion-funnel/constants.js +2 -1
- package/esm/charts/funnel-3d/theme.js +1 -2
- package/esm/charts/image-cloud/image-cloud-transformer.js +2 -1
- package/esm/charts/pictogram/element-highlight-by-graphic-name.js +1 -1
- package/esm/charts/pictogram/element-select-by-graphic-name.js +1 -1
- package/esm/charts/pictogram/index.js +1 -1
- package/esm/charts/pictogram/interface.js +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -0
- package/esm/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export declare const CANDLESTICK_CHART_TYPE = "candlestick";
|
|
2
|
+
export declare const CANDLESTICK_SERIES_TYPE = "candlestick";
|
|
3
|
+
export declare enum CANDLESTICK_TOOLTIP_KEYS {
|
|
4
|
+
OPEN = "open",
|
|
5
|
+
HIGH = "high",
|
|
6
|
+
LOW = "low",
|
|
7
|
+
CLOSE = "close",
|
|
8
|
+
SERIES_FIELD = "seriesField"
|
|
9
|
+
}
|
|
10
|
+
export declare const enum CandlestickMarkNameEnum {
|
|
11
|
+
candlestick = "candlestick"
|
|
12
|
+
}
|
|
13
|
+
export declare const CandlestickSeriesMark: {
|
|
14
|
+
candlestick: {
|
|
15
|
+
name: CandlestickMarkNameEnum;
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
label?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
19
|
+
point?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
20
|
+
line?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
21
|
+
area?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
22
|
+
bar?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
23
|
+
boxPlot?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
24
|
+
outlier?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
25
|
+
circlePacking?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
26
|
+
group?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
27
|
+
gridBackground?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
28
|
+
grid?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
29
|
+
dot?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
30
|
+
title?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
31
|
+
subTitle?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
32
|
+
symbol?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
33
|
+
funnel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
34
|
+
transform?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
35
|
+
transformLabel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
36
|
+
outerLabel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
37
|
+
outerLabelLine?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
38
|
+
pin?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
39
|
+
pinBackground?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
40
|
+
pointer?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
41
|
+
segment?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
42
|
+
track?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
43
|
+
cell?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
44
|
+
cellBackground?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
45
|
+
link?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
46
|
+
arrow?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
47
|
+
pie?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
48
|
+
labelLine?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
49
|
+
progress?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
50
|
+
minLabel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
51
|
+
maxLabel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
52
|
+
rose?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
53
|
+
node?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
54
|
+
sunburst?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
55
|
+
nonLeaf?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
56
|
+
leaf?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
57
|
+
nonLeafLabel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
58
|
+
leaderLine?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
59
|
+
stackLabel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
60
|
+
word?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
61
|
+
fillingWord?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
62
|
+
wordMask?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
63
|
+
nodePoint?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
64
|
+
ripplePoint?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
65
|
+
centerPoint?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
66
|
+
centerLabel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
67
|
+
barBackground?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
68
|
+
lineLabel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
69
|
+
areaLabel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
70
|
+
liquidGroup?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
71
|
+
liquid?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
72
|
+
liquidBackground?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
73
|
+
liquidOutline?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
74
|
+
circle?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
75
|
+
overlap?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
76
|
+
overlapLabel?: import("@visactor/vchart").ISeriesMarkInfo;
|
|
77
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { baseSeriesMark } from "@visactor/vchart";
|
|
2
|
+
|
|
3
|
+
export const CANDLESTICK_CHART_TYPE = "candlestick";
|
|
4
|
+
|
|
5
|
+
export const CANDLESTICK_SERIES_TYPE = "candlestick";
|
|
6
|
+
|
|
7
|
+
export var CANDLESTICK_TOOLTIP_KEYS;
|
|
8
|
+
|
|
9
|
+
!function(CANDLESTICK_TOOLTIP_KEYS) {
|
|
10
|
+
CANDLESTICK_TOOLTIP_KEYS.OPEN = "open", CANDLESTICK_TOOLTIP_KEYS.HIGH = "high",
|
|
11
|
+
CANDLESTICK_TOOLTIP_KEYS.LOW = "low", CANDLESTICK_TOOLTIP_KEYS.CLOSE = "close",
|
|
12
|
+
CANDLESTICK_TOOLTIP_KEYS.SERIES_FIELD = "seriesField";
|
|
13
|
+
}(CANDLESTICK_TOOLTIP_KEYS || (CANDLESTICK_TOOLTIP_KEYS = {}));
|
|
14
|
+
|
|
15
|
+
export var CandlestickMarkNameEnum;
|
|
16
|
+
|
|
17
|
+
!function(CandlestickMarkNameEnum) {
|
|
18
|
+
CandlestickMarkNameEnum.candlestick = "candlestick";
|
|
19
|
+
}(CandlestickMarkNameEnum || (CandlestickMarkNameEnum = {}));
|
|
20
|
+
|
|
21
|
+
export const CandlestickSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), {
|
|
22
|
+
candlestick: {
|
|
23
|
+
name: "candlestick",
|
|
24
|
+
type: "candlestick"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/charts/candlestick/series/constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAC;AACpD,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAErD,MAAM,CAAN,IAAY,wBAMX;AAND,WAAY,wBAAwB;IAClC,yCAAa,CAAA;IACb,yCAAa,CAAA;IACb,uCAAW,CAAA;IACX,2CAAe,CAAA;IACf,wDAA4B,CAAA;AAC9B,CAAC,EANW,wBAAwB,KAAxB,wBAAwB,QAMnC;AAED,MAAM,CAAN,IAAkB,uBAEjB;AAFD,WAAkB,uBAAuB;IACvC,sDAA2B,CAAA;AAC7B,CAAC,EAFiB,uBAAuB,KAAvB,uBAAuB,QAExC;AAED,MAAM,CAAC,MAAM,qBAAqB,mCAC7B,cAAc,KACjB,eAAqC,EAAE,EAAE,IAAI,eAAqC,EAAE,IAAI,EAAE,aAAa,EAAE,GAC1G,CAAC","file":"constant.js","sourcesContent":["import { baseSeriesMark } from '@visactor/vchart';\n\nexport const CANDLESTICK_CHART_TYPE = 'candlestick';\nexport const CANDLESTICK_SERIES_TYPE = 'candlestick';\n\nexport enum CANDLESTICK_TOOLTIP_KEYS {\n OPEN = 'open',\n HIGH = 'high',\n LOW = 'low',\n CLOSE = 'close',\n SERIES_FIELD = 'seriesField'\n}\n\nexport const enum CandlestickMarkNameEnum {\n candlestick = 'candlestick'\n}\n\nexport const CandlestickSeriesMark = {\n ...baseSeriesMark,\n [CandlestickMarkNameEnum.candlestick]: { name: CandlestickMarkNameEnum.candlestick, type: 'candlestick' }\n};\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IAnimationSpec, IMarkSpec, ICartesianSeriesSpec, SeriesMarkNameEnum, IMarkTheme, ICartesianSeriesTheme } from '@visactor/vchart';
|
|
2
|
+
import type { ICandlestickMarkSpec } from '../mark/interface';
|
|
3
|
+
export interface ICandlestickSeriesSpec extends Omit<ICartesianSeriesSpec, 'xField' | 'yField' | 'direction'>, IAnimationSpec<SeriesMarkNameEnum.boxPlot, string> {
|
|
4
|
+
type: 'candlestick';
|
|
5
|
+
xField: string | string[];
|
|
6
|
+
openField?: string;
|
|
7
|
+
highField?: string;
|
|
8
|
+
lowField?: string;
|
|
9
|
+
closeField?: string;
|
|
10
|
+
rising?: IMarkSpec<ICandlestickMarkSpec>;
|
|
11
|
+
falling?: IMarkSpec<ICandlestickMarkSpec>;
|
|
12
|
+
doji?: IMarkSpec<ICandlestickMarkSpec>;
|
|
13
|
+
candlestick?: IMarkSpec<ICandlestickMarkSpec>;
|
|
14
|
+
}
|
|
15
|
+
export interface ICandlestickSeriesTheme extends ICartesianSeriesTheme {
|
|
16
|
+
candlestick?: Partial<IMarkTheme<ICandlestickMarkSpec>>;
|
|
17
|
+
rising?: Partial<IMarkTheme<ICandlestickMarkSpec>>;
|
|
18
|
+
falling?: Partial<IMarkTheme<ICandlestickMarkSpec>>;
|
|
19
|
+
doji?: Partial<IMarkTheme<ICandlestickMarkSpec>>;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/charts/candlestick/series/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type {\n IAnimationSpec,\n IMarkSpec,\n ICartesianSeriesSpec,\n SeriesMarkNameEnum,\n IMarkTheme,\n ICartesianSeriesTheme\n} from '@visactor/vchart';\nimport type { ICandlestickMarkSpec } from '../mark/interface';\n\nexport interface ICandlestickSeriesSpec\n extends Omit<ICartesianSeriesSpec, 'xField' | 'yField' | 'direction'>,\n IAnimationSpec<SeriesMarkNameEnum.boxPlot, string> {\n type: 'candlestick';\n /**\n * 时间轴字段\n */\n xField: string | string[];\n /**\n * 开盘价字段\n */\n openField?: string;\n /**\n * 最高价字段\n */\n highField?: string;\n /**\n * 最低价字段\n */\n lowField?: string;\n /**\n * 收盘价字段\n */\n closeField?: string;\n /**\n * 上涨蜡烛图颜色\n */\n rising?: IMarkSpec<ICandlestickMarkSpec>;\n /**\n * 下跌蜡烛图颜色\n */\n falling?: IMarkSpec<ICandlestickMarkSpec>;\n /**\n * 平盘蜡烛图颜色\n */\n doji?: IMarkSpec<ICandlestickMarkSpec>;\n /**\n * 蜡烛图标记配置\n */\n candlestick?: IMarkSpec<ICandlestickMarkSpec>;\n}\n\nexport interface ICandlestickSeriesTheme extends ICartesianSeriesTheme {\n candlestick?: Partial<IMarkTheme<ICandlestickMarkSpec>>;\n rising?: Partial<IMarkTheme<ICandlestickMarkSpec>>;\n falling?: Partial<IMarkTheme<ICandlestickMarkSpec>>;\n doji?: Partial<IMarkTheme<ICandlestickMarkSpec>>;\n}\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export const getCandlestickTheme = () => ({
|
|
2
|
+
rising: {
|
|
3
|
+
style: {
|
|
4
|
+
boxFill: "#FF0000",
|
|
5
|
+
stroke: "#FF0000"
|
|
6
|
+
}
|
|
7
|
+
},
|
|
8
|
+
falling: {
|
|
9
|
+
style: {
|
|
10
|
+
boxFill: "#00AA00",
|
|
11
|
+
stroke: "#00AA00"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
doji: {
|
|
15
|
+
style: {
|
|
16
|
+
boxFill: "#000000",
|
|
17
|
+
stroke: "#000000"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
candlestick: {
|
|
21
|
+
style: {
|
|
22
|
+
lineWidth: 1
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const candlestick = {
|
|
28
|
+
rising: {
|
|
29
|
+
style: {
|
|
30
|
+
boxFill: "#FF0000",
|
|
31
|
+
stroke: "#FF0000"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
falling: {
|
|
35
|
+
style: {
|
|
36
|
+
boxFill: "#00AA00",
|
|
37
|
+
stroke: "#00AA00"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
doji: {
|
|
41
|
+
style: {
|
|
42
|
+
boxFill: "#000000",
|
|
43
|
+
stroke: "#000000"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
candlestick: {
|
|
47
|
+
style: {
|
|
48
|
+
lineWidth: 1
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/charts/candlestick/series/theme.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAA4B,EAAE;IAC/D,MAAM,GAAG,GAA4B;QACnC,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,OAAO,EAAE,SAAS;gBAClB,MAAM,EAAE,SAAS;aAClB;SACF;QACD,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,OAAO,EAAE,SAAS;gBAClB,MAAM,EAAE,SAAS;aAClB;SACF;QACD,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,OAAO,EAAE,SAAS;gBAClB,MAAM,EAAE,SAAS;aAClB;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE;gBACL,SAAS,EAAE,CAAC;aACb;SACF;KACF,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAA4B,mBAAmB,EAAE,CAAC","file":"theme.js","sourcesContent":["import type { ICandlestickSeriesTheme } from '../series/interface';\n\nexport const getCandlestickTheme = (): ICandlestickSeriesTheme => {\n const res: ICandlestickSeriesTheme = {\n rising: {\n style: {\n boxFill: '#FF0000',\n stroke: '#FF0000'\n }\n },\n falling: {\n style: {\n boxFill: '#00AA00',\n stroke: '#00AA00'\n }\n },\n doji: {\n style: {\n boxFill: '#000000',\n stroke: '#000000'\n }\n },\n candlestick: {\n style: {\n lineWidth: 1\n }\n }\n };\n return res;\n};\n\nexport const candlestick: ICandlestickSeriesTheme = getCandlestickTheme();\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ISeriesTooltipHelper, Datum, ITooltipLinePattern, TooltipActiveType } from '@visactor/vchart';
|
|
2
|
+
import { BaseSeriesTooltipHelper } from '@visactor/vchart';
|
|
3
|
+
import { CANDLESTICK_TOOLTIP_KEYS } from './constant';
|
|
4
|
+
export declare class CandlestickSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
|
|
5
|
+
protected getDefaultContentList(activeType: TooltipActiveType): ITooltipLinePattern[];
|
|
6
|
+
getContentKey: (contentType: CANDLESTICK_TOOLTIP_KEYS) => (datum: any) => string;
|
|
7
|
+
getContentValue: (contentType: CANDLESTICK_TOOLTIP_KEYS) => (datum: any) => any;
|
|
8
|
+
shapeColorCallback: (datum: Datum) => any;
|
|
9
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { BaseSeriesTooltipHelper } from "@visactor/vchart";
|
|
2
|
+
|
|
3
|
+
import { CANDLESTICK_TOOLTIP_KEYS } from "./constant";
|
|
4
|
+
|
|
5
|
+
export class CandlestickSeriesTooltipHelper extends BaseSeriesTooltipHelper {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments), this.getContentKey = contentType => datum => {
|
|
8
|
+
switch (contentType) {
|
|
9
|
+
case CANDLESTICK_TOOLTIP_KEYS.OPEN:
|
|
10
|
+
return this.series.getOpenField();
|
|
11
|
+
|
|
12
|
+
case CANDLESTICK_TOOLTIP_KEYS.HIGH:
|
|
13
|
+
return this.series.getHighField();
|
|
14
|
+
|
|
15
|
+
case CANDLESTICK_TOOLTIP_KEYS.LOW:
|
|
16
|
+
return this.series.getLowField();
|
|
17
|
+
|
|
18
|
+
case CANDLESTICK_TOOLTIP_KEYS.CLOSE:
|
|
19
|
+
return this.series.getCloseField();
|
|
20
|
+
|
|
21
|
+
case CANDLESTICK_TOOLTIP_KEYS.SERIES_FIELD:
|
|
22
|
+
return this.series.getSeriesField();
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}, this.getContentValue = contentType => datum => {
|
|
26
|
+
switch (contentType) {
|
|
27
|
+
case CANDLESTICK_TOOLTIP_KEYS.OPEN:
|
|
28
|
+
return datum[this.series.getOpenField()];
|
|
29
|
+
|
|
30
|
+
case CANDLESTICK_TOOLTIP_KEYS.HIGH:
|
|
31
|
+
return datum[this.series.getHighField()];
|
|
32
|
+
|
|
33
|
+
case CANDLESTICK_TOOLTIP_KEYS.LOW:
|
|
34
|
+
return datum[this.series.getLowField()];
|
|
35
|
+
|
|
36
|
+
case CANDLESTICK_TOOLTIP_KEYS.CLOSE:
|
|
37
|
+
return datum[this.series.getCloseField()];
|
|
38
|
+
|
|
39
|
+
case CANDLESTICK_TOOLTIP_KEYS.SERIES_FIELD:
|
|
40
|
+
return datum[this.series.getSeriesField()];
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}, this.shapeColorCallback = datum => this.series.getMarkInName("candlestick").getAttribute("stroke", datum);
|
|
44
|
+
}
|
|
45
|
+
getDefaultContentList(activeType) {
|
|
46
|
+
return [ {
|
|
47
|
+
key: this.getContentKey(CANDLESTICK_TOOLTIP_KEYS.OPEN),
|
|
48
|
+
value: this.getContentValue(CANDLESTICK_TOOLTIP_KEYS.OPEN)
|
|
49
|
+
}, {
|
|
50
|
+
key: this.getContentKey(CANDLESTICK_TOOLTIP_KEYS.HIGH),
|
|
51
|
+
value: this.getContentValue(CANDLESTICK_TOOLTIP_KEYS.HIGH)
|
|
52
|
+
}, {
|
|
53
|
+
key: this.getContentKey(CANDLESTICK_TOOLTIP_KEYS.LOW),
|
|
54
|
+
value: this.getContentValue(CANDLESTICK_TOOLTIP_KEYS.LOW)
|
|
55
|
+
}, {
|
|
56
|
+
key: this.getContentKey(CANDLESTICK_TOOLTIP_KEYS.CLOSE),
|
|
57
|
+
value: this.getContentValue(CANDLESTICK_TOOLTIP_KEYS.CLOSE)
|
|
58
|
+
}, {
|
|
59
|
+
key: this.getContentKey(CANDLESTICK_TOOLTIP_KEYS.SERIES_FIELD),
|
|
60
|
+
value: this.getContentValue(CANDLESTICK_TOOLTIP_KEYS.SERIES_FIELD)
|
|
61
|
+
} ];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=tooltip-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/charts/candlestick/series/tooltip-helper.ts"],"names":[],"mappings":"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","file":"tooltip-helper.js","sourcesContent":["import type { ISeriesTooltipHelper, Datum, ITooltipLinePattern, TooltipActiveType } from '@visactor/vchart';\nimport { BaseSeriesTooltipHelper } from '@visactor/vchart';\nimport { CANDLESTICK_TOOLTIP_KEYS } from './constant';\nimport type { CandlestickSeries } from './candlestick';\n\nexport class CandlestickSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {\n /** 获取默认的tooltip pattern */\n protected getDefaultContentList(activeType: TooltipActiveType): ITooltipLinePattern[] {\n return [\n {\n key: this.getContentKey(CANDLESTICK_TOOLTIP_KEYS.OPEN),\n value: this.getContentValue(CANDLESTICK_TOOLTIP_KEYS.OPEN)\n },\n {\n key: this.getContentKey(CANDLESTICK_TOOLTIP_KEYS.HIGH),\n value: this.getContentValue(CANDLESTICK_TOOLTIP_KEYS.HIGH)\n },\n {\n key: this.getContentKey(CANDLESTICK_TOOLTIP_KEYS.LOW),\n value: this.getContentValue(CANDLESTICK_TOOLTIP_KEYS.LOW)\n },\n {\n key: this.getContentKey(CANDLESTICK_TOOLTIP_KEYS.CLOSE),\n value: this.getContentValue(CANDLESTICK_TOOLTIP_KEYS.CLOSE)\n },\n {\n key: this.getContentKey(CANDLESTICK_TOOLTIP_KEYS.SERIES_FIELD),\n value: this.getContentValue(CANDLESTICK_TOOLTIP_KEYS.SERIES_FIELD)\n }\n ];\n }\n getContentKey = (contentType: CANDLESTICK_TOOLTIP_KEYS) => (datum: any) => {\n switch (contentType) {\n case CANDLESTICK_TOOLTIP_KEYS.OPEN: {\n const openField = (this.series as CandlestickSeries).getOpenField();\n return openField;\n }\n case CANDLESTICK_TOOLTIP_KEYS.HIGH: {\n const highField = (this.series as CandlestickSeries).getHighField();\n return highField;\n }\n case CANDLESTICK_TOOLTIP_KEYS.LOW: {\n const lowField = (this.series as CandlestickSeries).getLowField();\n return lowField;\n }\n case CANDLESTICK_TOOLTIP_KEYS.CLOSE: {\n const closeField = (this.series as CandlestickSeries).getCloseField();\n return closeField;\n }\n case CANDLESTICK_TOOLTIP_KEYS.SERIES_FIELD: {\n const seriesField = (this.series as CandlestickSeries).getSeriesField();\n return seriesField;\n }\n }\n\n return null;\n };\n\n getContentValue = (contentType: CANDLESTICK_TOOLTIP_KEYS) => (datum: any) => {\n switch (contentType) {\n case CANDLESTICK_TOOLTIP_KEYS.OPEN: {\n const openField = (this.series as CandlestickSeries).getOpenField();\n return datum[openField];\n }\n case CANDLESTICK_TOOLTIP_KEYS.HIGH: {\n const highField = (this.series as CandlestickSeries).getHighField();\n return datum[highField];\n }\n case CANDLESTICK_TOOLTIP_KEYS.LOW: {\n const lowField = (this.series as CandlestickSeries).getLowField();\n return datum[lowField];\n }\n case CANDLESTICK_TOOLTIP_KEYS.CLOSE: {\n const closeField = (this.series as CandlestickSeries).getCloseField();\n return datum[closeField];\n }\n case CANDLESTICK_TOOLTIP_KEYS.SERIES_FIELD: {\n const seriesField = (this.series as CandlestickSeries).getSeriesField();\n return datum[seriesField];\n }\n }\n\n return null;\n };\n shapeColorCallback = (datum: Datum) => {\n return this.series.getMarkInName('candlestick').getAttribute('stroke' as any, datum) as any;\n };\n}\n"]}
|
|
@@ -7,4 +7,5 @@ export class ImageCloudChartSpecTransformer extends BaseChartSpecTransformer {
|
|
|
7
7
|
_getDefaultSeriesSpec(spec) {
|
|
8
8
|
return super._getDefaultSeriesSpec(spec, [ "urlField", "nameField", "valueField", "imageSize", "imageSizeRange", "ratio", "maskShape", "imageMask", "layoutConfig", "image" ]);
|
|
9
9
|
}
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=image-cloud-transformer.js.map
|
|
@@ -46,4 +46,4 @@ ElementHighlightByGraphicName.type = type;
|
|
|
46
46
|
export const registerElementHighlightByGraphicName = () => {
|
|
47
47
|
Factory.registerInteractionTrigger(ElementHighlightByGraphicName.type, ElementHighlightByGraphicName);
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=element-highlight-by-graphic-name.js.map
|
|
49
|
+
//# sourceMappingURL=element-highlight-by-graphic-name.js.map
|
|
@@ -22,4 +22,4 @@ ElementSelectByGraphicName.type = type;
|
|
|
22
22
|
export const registerElementSelectByGraphicName = () => {
|
|
23
23
|
Factory.registerInteractionTrigger(ElementSelectByGraphicName.type, ElementSelectByGraphicName);
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=element-select-by-graphic-name.js.map
|
|
25
|
+
//# sourceMappingURL=element-select-by-graphic-name.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { };
|
|
2
|
-
//# sourceMappingURL=interface.js.map
|
|
2
|
+
//# sourceMappingURL=interface.js.map
|
package/esm/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './charts/range-column-3d';
|
|
|
14
14
|
export { register3DPlugin } from './charts/3d/plugin';
|
|
15
15
|
export * from './charts/pictogram';
|
|
16
16
|
export * from './charts/image-cloud';
|
|
17
|
+
export * from './charts/candlestick';
|
|
17
18
|
export * from './components/series-break';
|
|
18
19
|
export * from './components/bar-link';
|
|
19
20
|
export * from './components/series-label';
|
package/esm/index.js
CHANGED
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AACnE,cAAc,wDAAwD,CAAC;AAEvE,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AAErC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC","file":"index.js","sourcesContent":["export * from './charts/ranking-bar/ranking-bar';\nexport * from './charts/ranking-list/ranking-list';\nexport * from './charts/conversion-funnel';\nexport * from './charts/sequence-scatter-link/sequence-scatter-link';\nexport * from './charts/sequence-scatter-kde/sequence-scatter-kde';\nexport * from './charts/sequence-scatter-pixel/sequence-scatter-pixel';\n\nexport * from './charts/bar-3d';\nexport * from './charts/funnel-3d';\nexport * from './charts/histogram-3d';\nexport * from './charts/pie-3d';\nexport * from './charts/word-cloud-3d';\nexport * from './charts/axis-3d';\nexport * from './charts/range-column-3d';\nexport { register3DPlugin } from './charts/3d/plugin';\nexport * from './charts/pictogram';\nexport * from './charts/image-cloud';\n\nexport * from './components/series-break';\nexport * from './components/bar-link';\nexport * from './components/series-label';\nexport * from './components/map-label';\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AACnE,cAAc,wDAAwD,CAAC;AAEvE,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AAErC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC","file":"index.js","sourcesContent":["export * from './charts/ranking-bar/ranking-bar';\nexport * from './charts/ranking-list/ranking-list';\nexport * from './charts/conversion-funnel';\nexport * from './charts/sequence-scatter-link/sequence-scatter-link';\nexport * from './charts/sequence-scatter-kde/sequence-scatter-kde';\nexport * from './charts/sequence-scatter-pixel/sequence-scatter-pixel';\n\nexport * from './charts/bar-3d';\nexport * from './charts/funnel-3d';\nexport * from './charts/histogram-3d';\nexport * from './charts/pie-3d';\nexport * from './charts/word-cloud-3d';\nexport * from './charts/axis-3d';\nexport * from './charts/range-column-3d';\nexport { register3DPlugin } from './charts/3d/plugin';\nexport * from './charts/pictogram';\nexport * from './charts/image-cloud';\nexport * from './charts/candlestick';\n\nexport * from './components/series-break';\nexport * from './components/bar-link';\nexport * from './components/series-label';\nexport * from './components/map-label';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vchart-extension",
|
|
3
|
-
"version": "2.0.4-alpha.
|
|
3
|
+
"version": "2.0.4-alpha.2",
|
|
4
4
|
"description": "vchart extension package, including extension plugins and components",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "cjs/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@visactor/vutils": "~1.0.6",
|
|
20
20
|
"@visactor/vdataset": "~1.0.6",
|
|
21
21
|
"@visactor/vlayouts": "~1.0.6",
|
|
22
|
-
"@visactor/vchart": "2.0.4-alpha.
|
|
22
|
+
"@visactor/vchart": "2.0.4-alpha.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@rushstack/eslint-patch": "~1.1.4",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"rollup-plugin-sizes": "1.0.5",
|
|
45
45
|
"rollup": "3.20.5",
|
|
46
46
|
"@internal/ts-config": "0.0.1",
|
|
47
|
-
"@internal/
|
|
48
|
-
"@internal/
|
|
47
|
+
"@internal/bundler": "0.0.1",
|
|
48
|
+
"@internal/eslint-config": "0.0.1"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public",
|