tvcharts 0.9.45 → 0.9.47

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.
@@ -0,0 +1,102 @@
1
+
2
+ /*
3
+ * Licensed to the Apache Software Foundation (ASF) under one
4
+ * or more contributor license agreements. See the NOTICE file
5
+ * distributed with this work for additional information
6
+ * regarding copyright ownership. The ASF licenses this file
7
+ * to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance
9
+ * with the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ */
20
+
21
+
22
+ /**
23
+ * AUTO-GENERATED FILE. DO NOT MODIFY.
24
+ */
25
+
26
+ /*
27
+ * Licensed to the Apache Software Foundation (ASF) under one
28
+ * or more contributor license agreements. See the NOTICE file
29
+ * distributed with this work for additional information
30
+ * regarding copyright ownership. The ASF licenses this file
31
+ * to you under the Apache License, Version 2.0 (the
32
+ * "License"); you may not use this file except in compliance
33
+ * with the License. You may obtain a copy of the License at
34
+ *
35
+ * http://www.apache.org/licenses/LICENSE-2.0
36
+ *
37
+ * Unless required by applicable law or agreed to in writing,
38
+ * software distributed under the License is distributed on an
39
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
40
+ * KIND, either express or implied. See the License for the
41
+ * specific language governing permissions and limitations
42
+ * under the License.
43
+ */
44
+ /* global Float32Array */
45
+ import createRenderPlanner from '../helper/createRenderPlanner.js';
46
+ import { createFloat32Array } from '../../util/vendor.js';
47
+ import { map } from 'tvrender/lib/core/util.js';
48
+ var hlcAreaLayout = {
49
+ seriesType: 'hlcArea',
50
+ plan: createRenderPlanner(),
51
+ reset: function (seriesModel) {
52
+ var data = seriesModel.getData();
53
+ var coordSys = seriesModel.coordinateSystem;
54
+ if (!coordSys) {
55
+ return;
56
+ }
57
+ // const dims = map(coordSys.dimensions, function (dim) {
58
+ // return data.mapDimension(dim);
59
+ // });
60
+ var cDimIdx = 0;
61
+ var vDimIdx = 1;
62
+ var coordDims = ['x', 'y'];
63
+ var cDimI = data.getDimensionIndex(data.mapDimension(coordDims[cDimIdx]));
64
+ var vDimsI = map(data.mapDimensionsAll(coordDims[vDimIdx]), data.getDimensionIndex, data);
65
+ var store = data.getStore();
66
+ var dimIdx0 = data.getDimensionIndex(cDimI);
67
+ var closeDimI = data.getDimensionIndex(vDimsI[0]);
68
+ var lowestDimI = data.getDimensionIndex(vDimsI[1]);
69
+ var highestDimI = data.getDimensionIndex(vDimsI[2]);
70
+ return {
71
+ progress: function (params, data) {
72
+ var segCount = params.end - params.start;
73
+ var xPoints = createFloat32Array(segCount);
74
+ var cPoints = createFloat32Array(segCount);
75
+ var lPoints = createFloat32Array(segCount);
76
+ var hPoints = createFloat32Array(segCount);
77
+ var tmpIn = [];
78
+ var tmpOut = [];
79
+ for (var i = params.start; i < params.end; i++) {
80
+ tmpIn[0] = store.get(dimIdx0, i);
81
+ tmpIn[1] = store.get(closeDimI, i);
82
+ // Let coordinate system to handle the NaN data.
83
+ var point = coordSys.dataToPoint(tmpIn, null, tmpOut);
84
+ // const index = i;
85
+ xPoints[i] = point[0];
86
+ cPoints[i] = point[1];
87
+ tmpIn[1] = store.get(lowestDimI, i);
88
+ point = coordSys.dataToPoint(tmpIn, null, tmpOut);
89
+ lPoints[i] = point[1];
90
+ tmpIn[1] = store.get(highestDimI, i);
91
+ point = coordSys.dataToPoint(tmpIn, null, tmpOut);
92
+ hPoints[i] = point[1];
93
+ }
94
+ data.setLayout('xPoints', xPoints);
95
+ data.setLayout('cPoints', cPoints);
96
+ data.setLayout('lPoints', lPoints);
97
+ data.setLayout('hPoints', hPoints);
98
+ }
99
+ };
100
+ }
101
+ };
102
+ export default hlcAreaLayout;
@@ -0,0 +1,99 @@
1
+
2
+ /*
3
+ * Licensed to the Apache Software Foundation (ASF) under one
4
+ * or more contributor license agreements. See the NOTICE file
5
+ * distributed with this work for additional information
6
+ * regarding copyright ownership. The ASF licenses this file
7
+ * to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance
9
+ * with the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ */
20
+
21
+
22
+ /**
23
+ * AUTO-GENERATED FILE. DO NOT MODIFY.
24
+ */
25
+
26
+ /*
27
+ * Licensed to the Apache Software Foundation (ASF) under one
28
+ * or more contributor license agreements. See the NOTICE file
29
+ * distributed with this work for additional information
30
+ * regarding copyright ownership. The ASF licenses this file
31
+ * to you under the Apache License, Version 2.0 (the
32
+ * "License"); you may not use this file except in compliance
33
+ * with the License. You may obtain a copy of the License at
34
+ *
35
+ * http://www.apache.org/licenses/LICENSE-2.0
36
+ *
37
+ * Unless required by applicable law or agreed to in writing,
38
+ * software distributed under the License is distributed on an
39
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
40
+ * KIND, either express or implied. See the License for the
41
+ * specific language governing permissions and limitations
42
+ * under the License.
43
+ */
44
+ import { __extends } from "tslib";
45
+ import createSeriesData from '../helper/createSeriesData.js';
46
+ import SeriesModel from '../../model/Series.js';
47
+ var HlcAreaSeriesModel = /** @class */function (_super) {
48
+ __extends(HlcAreaSeriesModel, _super);
49
+ function HlcAreaSeriesModel() {
50
+ var _this = _super !== null && _super.apply(this, arguments) || this;
51
+ _this.type = HlcAreaSeriesModel.type;
52
+ _this.ignoreStyleOnData = true;
53
+ return _this;
54
+ }
55
+ HlcAreaSeriesModel.prototype.getInitialData = function (option) {
56
+ if (process.env.NODE_ENV !== 'production') {
57
+ var coordSys = option.coordinateSystem;
58
+ if (coordSys !== 'polar' && coordSys !== 'cartesian2d') {
59
+ throw new Error('HlcArea not support coordinateSystem besides cartesian and polar');
60
+ }
61
+ }
62
+ return createSeriesData(null, this, {
63
+ useEncodeDefaulter: true
64
+ });
65
+ };
66
+ HlcAreaSeriesModel.type = 'series.hlcArea';
67
+ HlcAreaSeriesModel.dependencies = ['grid', 'polar'];
68
+ HlcAreaSeriesModel.defaultOption = {
69
+ // zlevel: 0,
70
+ z: 3,
71
+ coordinateSystem: 'cartesian2d',
72
+ itemStyle: {
73
+ hColor: "#00DCB4",
74
+ hLineWidth: 2,
75
+ hVisible: true,
76
+ lColor: "#E91E63",
77
+ lLineWidth: 2,
78
+ lVisible: true,
79
+ cColor: "#2962ff",
80
+ cLineWidth: 2,
81
+ fill1: "rgba(0, 188, 212, 0.25)",
82
+ fill2: "rgba(233, 30, 99, 0.25)"
83
+ },
84
+ clip: true,
85
+ dimensions: ['x', 'close', 'lowest', 'highest'],
86
+ encode: {
87
+ x: ['x'],
88
+ y: ['close', 'lowest', 'highest']
89
+ },
90
+ emphasis: {
91
+ scale: true,
92
+ emphasisState: {
93
+ zlevel: 1
94
+ }
95
+ }
96
+ };
97
+ return HlcAreaSeriesModel;
98
+ }(SeriesModel);
99
+ export default HlcAreaSeriesModel;
@@ -0,0 +1,179 @@
1
+
2
+ /*
3
+ * Licensed to the Apache Software Foundation (ASF) under one
4
+ * or more contributor license agreements. See the NOTICE file
5
+ * distributed with this work for additional information
6
+ * regarding copyright ownership. The ASF licenses this file
7
+ * to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance
9
+ * with the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ */
20
+
21
+
22
+ /**
23
+ * AUTO-GENERATED FILE. DO NOT MODIFY.
24
+ */
25
+
26
+ /*
27
+ * Licensed to the Apache Software Foundation (ASF) under one
28
+ * or more contributor license agreements. See the NOTICE file
29
+ * distributed with this work for additional information
30
+ * regarding copyright ownership. The ASF licenses this file
31
+ * to you under the Apache License, Version 2.0 (the
32
+ * "License"); you may not use this file except in compliance
33
+ * with the License. You may obtain a copy of the License at
34
+ *
35
+ * http://www.apache.org/licenses/LICENSE-2.0
36
+ *
37
+ * Unless required by applicable law or agreed to in writing,
38
+ * software distributed under the License is distributed on an
39
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
40
+ * KIND, either express or implied. See the License for the
41
+ * specific language governing permissions and limitations
42
+ * under the License.
43
+ */
44
+ import { __extends } from "tslib";
45
+ import ChartView from '../../view/Chart.js';
46
+ import { createClipPath } from '../helper/createClipPathFromCoordSys.js';
47
+ import PolyLinePath from './PolyLinePath.js';
48
+ import PolyLineFillPath from './PolyLineFillPath.js';
49
+ import { getECData } from '../../util/innerStore.js';
50
+ import { toggleHoverEmphasis } from '../../util/states.js';
51
+ var HlcAreaView = /** @class */function (_super) {
52
+ __extends(HlcAreaView, _super);
53
+ function HlcAreaView() {
54
+ var _this = _super !== null && _super.apply(this, arguments) || this;
55
+ _this.type = HlcAreaView.type;
56
+ return _this;
57
+ }
58
+ // init() {
59
+ // }
60
+ HlcAreaView.prototype.render = function (seriesModel, ecModel, api) {
61
+ this._renderNormal(seriesModel);
62
+ };
63
+ HlcAreaView.prototype._renderNormal = function (seriesModel) {
64
+ var data = seriesModel.getData();
65
+ // const oldData = this._data;
66
+ var group = this.group;
67
+ group.removeAll();
68
+ // const info = seriesModel.get('info');
69
+ var emphasisState = seriesModel.get('emphasis').emphasisState;
70
+ var groupId = seriesModel.get('groupId');
71
+ var coordSys = seriesModel.coordinateSystem;
72
+ var itemStyle = seriesModel.get('itemStyle');
73
+ var xPoints = data.getLayout('xPoints');
74
+ var cPoints = data.getLayout('cPoints');
75
+ var lPoints = data.getLayout('lPoints');
76
+ var hPoints = data.getLayout('hPoints');
77
+ var lVisible = itemStyle.lVisible,
78
+ lColor = itemStyle.lColor,
79
+ lLineWidth = itemStyle.lLineWidth,
80
+ hVisible = itemStyle.hVisible,
81
+ hLineWidth = itemStyle.hLineWidth,
82
+ hColor = itemStyle.hColor,
83
+ cColor = itemStyle.cColor,
84
+ cLineWidth = itemStyle.cLineWidth,
85
+ fill1 = itemStyle.fill1,
86
+ fill2 = itemStyle.fill2;
87
+ var polyFill1 = new PolyLineFillPath({
88
+ shape: {
89
+ xPoints: xPoints,
90
+ y1Points: hPoints,
91
+ y2Points: cPoints
92
+ },
93
+ style: {
94
+ fill: fill1,
95
+ stroke: 'none'
96
+ }
97
+ });
98
+ polyFill1.states.emphasis = emphasisState;
99
+ group.add(polyFill1);
100
+ var polyFill2 = new PolyLineFillPath({
101
+ shape: {
102
+ xPoints: xPoints,
103
+ y1Points: lPoints,
104
+ y2Points: cPoints
105
+ },
106
+ style: {
107
+ fill: fill2,
108
+ stroke: 'none'
109
+ }
110
+ });
111
+ polyFill2.states.emphasis = emphasisState;
112
+ group.add(polyFill2);
113
+ if (lVisible) {
114
+ var polyline_1 = new PolyLinePath({
115
+ shape: {
116
+ xPoints: xPoints,
117
+ yPoints: lPoints
118
+ },
119
+ style: {
120
+ fill: 'none',
121
+ stroke: lColor,
122
+ lineWidth: lLineWidth
123
+ }
124
+ });
125
+ polyline_1.states.emphasis = emphasisState;
126
+ group.add(polyline_1);
127
+ }
128
+ if (hVisible) {
129
+ var polyline_2 = new PolyLinePath({
130
+ shape: {
131
+ xPoints: xPoints,
132
+ yPoints: hPoints
133
+ },
134
+ style: {
135
+ fill: 'none',
136
+ stroke: hColor,
137
+ lineWidth: hLineWidth
138
+ }
139
+ });
140
+ polyline_2.states.emphasis = emphasisState;
141
+ group.add(polyline_2);
142
+ }
143
+ var polyline = new PolyLinePath({
144
+ shape: {
145
+ xPoints: xPoints,
146
+ yPoints: cPoints
147
+ },
148
+ style: {
149
+ fill: 'none',
150
+ stroke: cColor,
151
+ lineWidth: cLineWidth
152
+ }
153
+ });
154
+ polyline.states.emphasis = emphasisState;
155
+ group.add(polyline);
156
+ // const polyline = this._newPolyline(points);
157
+ // polyline.states.emphasis = emphasisState;
158
+ // group.add(polyline);
159
+ var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;
160
+ if (clipPath) {
161
+ this.group.setClipPath(clipPath);
162
+ } else {
163
+ this.group.removeClipPath();
164
+ }
165
+ toggleHoverEmphasis(this.group, null, null, false);
166
+ getECData(this.group).groupId = groupId;
167
+ };
168
+ HlcAreaView.prototype.remove = function (ecModel) {
169
+ this._clear();
170
+ };
171
+ HlcAreaView.prototype._clear = function () {
172
+ this.group.removeAll();
173
+ // this._data = null;
174
+ };
175
+
176
+ HlcAreaView.type = 'hlcArea';
177
+ return HlcAreaView;
178
+ }(ChartView);
179
+ export default HlcAreaView;
@@ -0,0 +1,91 @@
1
+
2
+ /*
3
+ * Licensed to the Apache Software Foundation (ASF) under one
4
+ * or more contributor license agreements. See the NOTICE file
5
+ * distributed with this work for additional information
6
+ * regarding copyright ownership. The ASF licenses this file
7
+ * to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance
9
+ * with the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ */
20
+
21
+
22
+ /**
23
+ * AUTO-GENERATED FILE. DO NOT MODIFY.
24
+ */
25
+
26
+ /*
27
+ * Licensed to the Apache Software Foundation (ASF) under one
28
+ * or more contributor license agreements. See the NOTICE file
29
+ * distributed with this work for additional information
30
+ * regarding copyright ownership. The ASF licenses this file
31
+ * to you under the Apache License, Version 2.0 (the
32
+ * "License"); you may not use this file except in compliance
33
+ * with the License. You may obtain a copy of the License at
34
+ *
35
+ * http://www.apache.org/licenses/LICENSE-2.0
36
+ *
37
+ * Unless required by applicable law or agreed to in writing,
38
+ * software distributed under the License is distributed on an
39
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
40
+ * KIND, either express or implied. See the License for the
41
+ * specific language governing permissions and limitations
42
+ * under the License.
43
+ */
44
+ import { __extends } from "tslib";
45
+ /* global Float32Array */
46
+ // TODO Batch by color
47
+ import * as graphic from '../../util/graphic.js';
48
+ var LargePolyLinePathShape = /** @class */function () {
49
+ function LargePolyLinePathShape() {}
50
+ return LargePolyLinePathShape;
51
+ }();
52
+ var PolyLinePath = /** @class */function (_super) {
53
+ __extends(PolyLinePath, _super);
54
+ // private _ctx: CanvasRenderingContext2D;
55
+ function PolyLinePath(opts) {
56
+ return _super.call(this, opts) || this;
57
+ }
58
+ PolyLinePath.prototype.getDefaultShape = function () {
59
+ return new LargePolyLinePathShape();
60
+ };
61
+ PolyLinePath.prototype.buildPath = function (path, shape) {
62
+ var xPoints = shape.xPoints,
63
+ y1Points = shape.y1Points,
64
+ y2Points = shape.y2Points;
65
+ var isMove = true;
66
+ for (var i = 0; i < y1Points.length; i++) {
67
+ var x = xPoints[i];
68
+ var y = y1Points[i];
69
+ if (isNaN(x) || isNaN(y)) {
70
+ continue;
71
+ }
72
+ if (isMove) {
73
+ isMove = false;
74
+ path.moveTo(x, y);
75
+ continue;
76
+ }
77
+ path.lineTo(x, y);
78
+ }
79
+ for (var i = y2Points.length - 1; i >= 0; i--) {
80
+ var x = xPoints[i];
81
+ var y = y2Points[i];
82
+ if (isNaN(x) || isNaN(y)) {
83
+ continue;
84
+ }
85
+ path.lineTo(x, y);
86
+ }
87
+ path.closePath();
88
+ };
89
+ return PolyLinePath;
90
+ }(graphic.Path);
91
+ export default PolyLinePath;
@@ -0,0 +1,81 @@
1
+
2
+ /*
3
+ * Licensed to the Apache Software Foundation (ASF) under one
4
+ * or more contributor license agreements. See the NOTICE file
5
+ * distributed with this work for additional information
6
+ * regarding copyright ownership. The ASF licenses this file
7
+ * to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance
9
+ * with the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ */
20
+
21
+
22
+ /**
23
+ * AUTO-GENERATED FILE. DO NOT MODIFY.
24
+ */
25
+
26
+ /*
27
+ * Licensed to the Apache Software Foundation (ASF) under one
28
+ * or more contributor license agreements. See the NOTICE file
29
+ * distributed with this work for additional information
30
+ * regarding copyright ownership. The ASF licenses this file
31
+ * to you under the Apache License, Version 2.0 (the
32
+ * "License"); you may not use this file except in compliance
33
+ * with the License. You may obtain a copy of the License at
34
+ *
35
+ * http://www.apache.org/licenses/LICENSE-2.0
36
+ *
37
+ * Unless required by applicable law or agreed to in writing,
38
+ * software distributed under the License is distributed on an
39
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
40
+ * KIND, either express or implied. See the License for the
41
+ * specific language governing permissions and limitations
42
+ * under the License.
43
+ */
44
+ import { __extends } from "tslib";
45
+ /* global Float32Array */
46
+ // TODO Batch by color
47
+ import * as graphic from '../../util/graphic.js';
48
+ var LargePolyLinePathShape = /** @class */function () {
49
+ function LargePolyLinePathShape() {}
50
+ return LargePolyLinePathShape;
51
+ }();
52
+ var PolyLinePath = /** @class */function (_super) {
53
+ __extends(PolyLinePath, _super);
54
+ // private _ctx: CanvasRenderingContext2D;
55
+ function PolyLinePath(opts) {
56
+ return _super.call(this, opts) || this;
57
+ }
58
+ PolyLinePath.prototype.getDefaultShape = function () {
59
+ return new LargePolyLinePathShape();
60
+ };
61
+ PolyLinePath.prototype.buildPath = function (path, shape) {
62
+ var xPoints = shape.xPoints,
63
+ yPoints = shape.yPoints;
64
+ var isMove = true;
65
+ for (var i = 0; i < xPoints.length; i++) {
66
+ var x = xPoints[i];
67
+ var y = yPoints[i];
68
+ if (isNaN(x) || isNaN(y)) {
69
+ continue;
70
+ }
71
+ if (isMove) {
72
+ isMove = false;
73
+ path.moveTo(x, y);
74
+ continue;
75
+ }
76
+ path.lineTo(x, y);
77
+ }
78
+ };
79
+ return PolyLinePath;
80
+ }(graphic.Path);
81
+ export default PolyLinePath;
@@ -0,0 +1,51 @@
1
+
2
+ /*
3
+ * Licensed to the Apache Software Foundation (ASF) under one
4
+ * or more contributor license agreements. See the NOTICE file
5
+ * distributed with this work for additional information
6
+ * regarding copyright ownership. The ASF licenses this file
7
+ * to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance
9
+ * with the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ */
20
+
21
+
22
+ /**
23
+ * AUTO-GENERATED FILE. DO NOT MODIFY.
24
+ */
25
+
26
+ /*
27
+ * Licensed to the Apache Software Foundation (ASF) under one
28
+ * or more contributor license agreements. See the NOTICE file
29
+ * distributed with this work for additional information
30
+ * regarding copyright ownership. The ASF licenses this file
31
+ * to you under the Apache License, Version 2.0 (the
32
+ * "License"); you may not use this file except in compliance
33
+ * with the License. You may obtain a copy of the License at
34
+ *
35
+ * http://www.apache.org/licenses/LICENSE-2.0
36
+ *
37
+ * Unless required by applicable law or agreed to in writing,
38
+ * software distributed under the License is distributed on an
39
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
40
+ * KIND, either express or implied. See the License for the
41
+ * specific language governing permissions and limitations
42
+ * under the License.
43
+ */
44
+ import HlcAreaSeries from './HlcAreaSeries.js';
45
+ import HlcAreaView from './HlcAreaView.js';
46
+ import HlcAreaLayout from './HlcAreaLayout.js';
47
+ export function install(registers) {
48
+ registers.registerChartView(HlcAreaView);
49
+ registers.registerSeriesModel(HlcAreaSeries);
50
+ registers.registerLayout(HlcAreaLayout);
51
+ }
@@ -108,7 +108,8 @@ var markerTypeCalculator = {
108
108
  };
109
109
  }
110
110
  var fill = (_a = seriesData.getItemVisual(lastIndex, 'style')) === null || _a === void 0 ? void 0 : _a.fill;
111
- if (isCandle(seriesModel.subType)) {
111
+ var seriesType = seriesModel.subType;
112
+ if (isCandle(seriesType)) {
112
113
  var dataItem = seriesData.getItemModel(lastIndex, true);
113
114
  var sign = 1;
114
115
  if (seriesModel.get('signByPrev') && lastIndex) {
@@ -126,10 +127,13 @@ var markerTypeCalculator = {
126
127
  if (fill === 'none') {
127
128
  fill = dataItem.get(sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery);
128
129
  }
129
- } else if (isPlot(seriesModel.subType)) {
130
+ } else if (isPlot(seriesType)) {
130
131
  var isLinesPlot = linePlotTypes.includes(seriesModel.subType);
131
132
  var dataItem = seriesData.getItemModel(lastIndex, true);
132
133
  fill = formatTextColor(dataItem.get([isLinesPlot ? 'lineStyle' : 'itemStyle', 'color']), height);
134
+ } else if (seriesType === 'hlcArea') {
135
+ var dataItem = seriesData.getItemModel(lastIndex, true);
136
+ fill = dataItem.get('itemStyle').cColor;
133
137
  }
134
138
  return {
135
139
  value: seriesData.getByRawIndex(item.valueDim, lastIndex),
@@ -153,13 +157,14 @@ var markerTypeCalculator = {
153
157
  if (lastIndex >= count || lastIndex < 0) {
154
158
  return null;
155
159
  }
160
+ var seriesType = seriesModel.subType;
156
161
  var lastItem = seriesData.count() - 1;
157
162
  var fill = (_a = seriesData.getItemVisual(lastItem, 'style')) === null || _a === void 0 ? void 0 : _a.fill;
158
- if (isPlot(seriesModel.subType)) {
159
- var isLinesPlot = linePlotTypes.includes(seriesModel.subType);
163
+ if (isPlot(seriesType)) {
164
+ var isLinesPlot = linePlotTypes.includes(seriesType);
160
165
  var dataItem = seriesData.getItemModel(lastItem);
161
166
  fill = formatTextColor(dataItem.get([isLinesPlot ? 'lineStyle' : 'itemStyle', 'color']), height);
162
- } else if (isCandle(seriesModel.subType)) {
167
+ } else if (isCandle(seriesType)) {
163
168
  var dataItem = seriesData.getItemModel(lastItem);
164
169
  var sign = 1;
165
170
  if (seriesModel.get('signByPrev') && lastIndex) {
@@ -175,6 +180,9 @@ var markerTypeCalculator = {
175
180
  if (fill === 'none') {
176
181
  fill = dataItem.get(sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery);
177
182
  }
183
+ } else if (seriesType === 'hlcArea') {
184
+ var dataItem = seriesData.getItemModel(lastIndex, true);
185
+ fill = dataItem.get('itemStyle').cColor;
178
186
  }
179
187
  return {
180
188
  value: seriesData.getByRawIndex(item.valueDim, lastIndex),
@@ -75,6 +75,7 @@ export { install as CandlePlotChart } from '../chart/candlePlot/install.js';
75
75
  export { install as CandleVolumeChart } from '../chart/candleVolume/install.js';
76
76
  export { install as SymbolLineChart } from '../chart/symbolLine/install.js';
77
77
  export { install as HeikinAshiChart } from '../chart/heikinAshi/install.js';
78
+ export { install as HlcAreaChart } from '../chart/hlcArea/install.js';
78
79
  export { install as VolPathChart } from '../chart/volPath/install.js';
79
80
  export { install as VolPathRectChart } from '../chart/volPathRect/install.js';
80
81
  export { install as VolPathTableChart } from '../chart/volPathTable/install.js';
@@ -145,6 +145,7 @@ var BUILTIN_CHARTS_MAP = {
145
145
  candlePlot: 'CandlePlotChart',
146
146
  candleVolume: 'CandleVolumeChart',
147
147
  symbolLine: 'SymbolLineChart',
148
+ hlcArea: 'HlcAreaChart',
148
149
  heikinAshi: 'HeikinAshiChart',
149
150
  volPath: 'VolPathChart',
150
151
  volPathRect: "VolPathRectChart",
package/lib/util/color.js CHANGED
@@ -82,7 +82,7 @@ function parseColor(color) {
82
82
  }
83
83
  function contrastColor(color, lightweight) {
84
84
  if (lightweight === void 0) {
85
- lightweight = 130;
85
+ lightweight = 140;
86
86
  }
87
87
  var _a = parseColor(color),
88
88
  r = _a[0],
@@ -47,7 +47,7 @@ import { liftColor } from 'tvrender/lib/tool/color.js';
47
47
  import { queryDataIndex, makeInner } from './model.js';
48
48
  import Path from 'tvrender/lib/graphic/Path.js';
49
49
  import { error } from './log.js';
50
- import { isCandle, isShowValuePlot } from '../util/seriesType.js';
50
+ import { isCandle } from '../util/seriesType.js';
51
51
  import { positiveDataColorQuery, negativeDataColorQuery } from '../chart/candlestick/candlestickVisual.js';
52
52
  // Reserve 0 as default.
53
53
  var _highlightNextDigit = 1;
@@ -658,41 +658,71 @@ export function getSeriesPointData(ecModel, payload) {
658
658
  var isCandlesStick = isCandle(seriesModel.subType);
659
659
  var dim = isCandlesStick ? 'close' : 'y';
660
660
  var fnKey = isRaw ? 'getByRawIndex' : 'get';
661
- if (isCandlesStick) {
662
- var sign = 1;
663
- if (seriesModel.get('signByPrev') && rawDataIndex) {
664
- var openValue = data.getByRawIndex('close', rawDataIndex - 1);
665
- var closeValue = data.getByRawIndex('close', index);
666
- sign = openValue > closeValue ? -1 : 1;
667
- } else {
668
- var closeValue = data[fnKey]('close', index);
669
- var openValue = data[fnKey]('open', index);
670
- sign = openValue > closeValue ? -1 : 1;
671
- }
672
- var dataItem = data.getItemModel(index, isRaw);
673
- var fill = dataItem.get(sign > 0 ? positiveDataColorQuery : negativeDataColorQuery);
674
- if (fill) {
675
- color = fill;
676
- }
677
- } else if (isShowValuePlot(seriesModel.subType)) {
678
- var isLinesPlot = seriesModel.subType === 'linesPlot';
679
- var dataItem = data.getItemModel(index, isRaw);
680
- var fill = dataItem.get([isLinesPlot ? 'lineStyle' : 'itemStyle', 'color']);
681
- if (!isLinesPlot) {
682
- values = [index, dataItem.get('showValue')];
683
- }
684
- if (fill) {
685
- color = fill;
686
- }
687
- } else {
688
- var closeValue = data[fnKey]('y', index);
689
- var openValue = data[fnKey]('y', index - 1);
690
- var dataItem = data.getItemModel(index, isRaw);
691
- var sign = openValue > closeValue ? -1 : 1;
692
- var fill = dataItem.get(sign > 0 ? positiveDataColorQuery : negativeDataColorQuery);
693
- if (fill) {
694
- color = fill;
695
- }
661
+ switch (seriesModel.subType) {
662
+ case 'candlestick':
663
+ case 'candlePlot':
664
+ case 'barPlot':
665
+ case 'heikinAshi':
666
+ case 'volPath':
667
+ case 'candleVolume':
668
+ {
669
+ var sign_1 = 1;
670
+ if (seriesModel.get('signByPrev') && rawDataIndex) {
671
+ var openValue_1 = data.getByRawIndex('close', rawDataIndex - 1);
672
+ var closeValue_1 = data.getByRawIndex('close', index);
673
+ sign_1 = openValue_1 > closeValue_1 ? -1 : 1;
674
+ } else {
675
+ var closeValue_2 = data[fnKey]('close', index);
676
+ var openValue_2 = data[fnKey]('open', index);
677
+ sign_1 = openValue_2 > closeValue_2 ? -1 : 1;
678
+ }
679
+ var dataItem_1 = data.getItemModel(index, isRaw);
680
+ var fill_1 = dataItem_1.get(sign_1 > 0 ? positiveDataColorQuery : negativeDataColorQuery);
681
+ if (fill_1) {
682
+ color = fill_1;
683
+ }
684
+ }
685
+ break;
686
+ case 'labels':
687
+ case 'linesPlot':
688
+ case 'charPlot':
689
+ case 'arrowsPlot':
690
+ {
691
+ var isLinesPlot = seriesModel.subType === 'linesPlot';
692
+ var dataItem_2 = data.getItemModel(index, isRaw);
693
+ var fill_2 = dataItem_2.get([isLinesPlot ? 'lineStyle' : 'itemStyle', 'color']);
694
+ if (!isLinesPlot) {
695
+ values = [index, dataItem_2.get('showValue')];
696
+ }
697
+ if (fill_2) {
698
+ color = fill_2;
699
+ }
700
+ }
701
+ break;
702
+ case 'hlcArea':
703
+ {
704
+ dim = 'close';
705
+ var sign_2 = 1;
706
+ var openValue_3 = data.getByRawIndex('close', rawDataIndex - 1);
707
+ var closeValue_3 = data.getByRawIndex('close', index);
708
+ sign_2 = openValue_3 > closeValue_3 ? -1 : 1;
709
+ var dataItem_3 = data.getItemModel(index, isRaw);
710
+ var fill_3 = dataItem_3.get(sign_2 > 0 ? positiveDataColorQuery : negativeDataColorQuery);
711
+ if (fill_3) {
712
+ color = fill_3;
713
+ }
714
+ break;
715
+ }
716
+ default:
717
+ var closeValue = data[fnKey]('y', index);
718
+ var openValue = data[fnKey]('y', index - 1);
719
+ var dataItem = data.getItemModel(index, isRaw);
720
+ var sign = openValue > closeValue ? -1 : 1;
721
+ var fill = dataItem.get(sign > 0 ? positiveDataColorQuery : negativeDataColorQuery);
722
+ if (fill) {
723
+ color = fill;
724
+ }
725
+ break;
696
726
  }
697
727
  var currentValue = data[fnKey](dim, index);
698
728
  var prevValue = data[fnKey](dim, index - 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tvcharts",
3
- "version": "0.9.45",
3
+ "version": "0.9.47",
4
4
  "main": "dist/echarts.js",
5
5
  "module": "index.js",
6
6
  "jsdelivr": "dist/echarts.min.js",
@@ -1 +1 @@
1
- export { install$33 as ArrowsPlotChart, install$1 as BarChart, install$32 as BarPlotChart, BarSeriesOption, install$37 as BgColorChart, install$23 as BoxesChart, install$13 as BoxplotChart, BoxplotSeriesOption, install$25 as CandlePlotChart, install$26 as CandleVolumeChart, install$14 as CandlestickChart, CandlestickSeriesOption, install$24 as CharPlotChart, install$42 as CustomChart, CustomSeriesOption, install$15 as EffectScatterChart, EffectScatterSeriesOption, install$36 as FillsChart, install$10 as FunnelChart, FunnelSeriesOption, install$9 as GaugeChart, GaugeSeriesOption, install$8 as GraphChart, GraphSeriesOption, install$35 as HLinesChart, install$38 as HeatmapChart, HeatmapSeriesOption, install$28 as HeikinAshiChart, install$34 as LabelsChart, install as LineChart, install$22 as LineFillsChart, LineSeriesOption, install$16 as LinesChart, install$17 as LinesPlotChart, LinesPlotSeriesOption, LinesSeriesOption, install$5 as MapChart, MapSeriesOption, install$20 as MineLinesChart, install$21 as MinePolyLinesChart, install$11 as ParallelChart, ParallelSeriesOption, install$39 as PictorialBarChart, PictorialBarSeriesOption, install$2 as PieChart, PieSeriesOption, install$19 as PlaybackOrderChart, install$4 as RadarChart, RadarSeriesOption, install$12 as SankeyChart, SankeySeriesOption, install$3 as ScatterChart, ScatterSeriesOption, install$18 as StrategyChart, StrategySeriesOption, install$41 as SunburstChart, SunburstSeriesOption, install$27 as SymbolLineChart, install$40 as ThemeRiverChart, ThemeRiverSeriesOption, install$6 as TreeChart, TreeSeriesOption, install$7 as TreemapChart, TreemapSeriesOption, install$29 as VolPathChart, install$30 as VolPathRectChart, install$31 as VolPathTableChart } from './shared';
1
+ export { install$34 as ArrowsPlotChart, install$1 as BarChart, install$33 as BarPlotChart, BarSeriesOption, install$38 as BgColorChart, install$23 as BoxesChart, install$13 as BoxplotChart, BoxplotSeriesOption, install$25 as CandlePlotChart, install$26 as CandleVolumeChart, install$14 as CandlestickChart, CandlestickSeriesOption, install$24 as CharPlotChart, install$43 as CustomChart, CustomSeriesOption, install$15 as EffectScatterChart, EffectScatterSeriesOption, install$37 as FillsChart, install$10 as FunnelChart, FunnelSeriesOption, install$9 as GaugeChart, GaugeSeriesOption, install$8 as GraphChart, GraphSeriesOption, install$36 as HLinesChart, install$39 as HeatmapChart, HeatmapSeriesOption, install$28 as HeikinAshiChart, install$29 as HlcAreaChart, install$35 as LabelsChart, install as LineChart, install$22 as LineFillsChart, LineSeriesOption, install$16 as LinesChart, install$17 as LinesPlotChart, LinesPlotSeriesOption, LinesSeriesOption, install$5 as MapChart, MapSeriesOption, install$20 as MineLinesChart, install$21 as MinePolyLinesChart, install$11 as ParallelChart, ParallelSeriesOption, install$40 as PictorialBarChart, PictorialBarSeriesOption, install$2 as PieChart, PieSeriesOption, install$19 as PlaybackOrderChart, install$4 as RadarChart, RadarSeriesOption, install$12 as SankeyChart, SankeySeriesOption, install$3 as ScatterChart, ScatterSeriesOption, install$18 as StrategyChart, StrategySeriesOption, install$42 as SunburstChart, SunburstSeriesOption, install$27 as SymbolLineChart, install$41 as ThemeRiverChart, ThemeRiverSeriesOption, install$6 as TreeChart, TreeSeriesOption, install$7 as TreemapChart, TreemapSeriesOption, install$30 as VolPathChart, install$31 as VolPathRectChart, install$32 as VolPathTableChart } from './shared';
@@ -1 +1 @@
1
- export { install$61 as AlarmComponent, install$80 as AriaComponent, AriaOption as AriaComponentOption, install$54 as AxisPointerComponent, AxisPointerOption as AxisPointerComponentOption, install$62 as BgRectComponent, install$55 as BrushComponent, BrushOption as BrushComponentOption, install$50 as CalendarComponent, CalendarOption as CalendarComponentOption, install$59 as CursorPointerComponent, install$74 as DataZoomComponent, DataZoomComponentOption, install$75 as DataZoomInsideComponent, install$76 as DataZoomSliderComponent, install$82 as DatasetComponent, DatasetOption as DatasetComponentOption, install$57 as EventsComponent, install$47 as GeoComponent, GeoOption as GeoComponentOption, install$51 as GraphicComponent, GraphicComponentLooseOption as GraphicComponentOption, install$44 as GridComponent, GridOption as GridComponentOption, install$43 as GridSimpleComponent, install$71 as LegendComponent, LegendComponentOption, install$73 as LegendPlainComponent, install$72 as LegendScrollComponent, install$70 as LimitTipComponent, install$64 as LogoComponent, install$68 as MarkAreaComponent, MarkAreaOption as MarkAreaComponentOption, install$69 as MarkLabelComponent, MarkLabelOption as MarkLabelComponentOption, install$67 as MarkLineComponent, MarkLineOption as MarkLineComponentOption, install$66 as MarkPointComponent, MarkPointOption as MarkPointComponentOption, install$49 as ParallelComponent, ParallelCoordinateSystemOption as ParallelComponentOption, install$63 as PlaybackComponent, install$45 as PolarComponent, PolarOption as PolarComponentOption, install$46 as RadarComponent, RadarOption as RadarComponentOption, install$48 as SingleAxisComponent, SingleAxisOption as SingleAxisComponentOption, install$60 as TableComponent, install$65 as TimelineComponent, TimelineOption as TimelineComponentOption, install$56 as TitleComponent, TitleOption as TitleComponentOption, install$52 as ToolboxComponent, ToolboxComponentOption, install$53 as TooltipComponent, TooltipOption as TooltipComponentOption, install$58 as TradeDayComponent, install$81 as TransformComponent, install$77 as VisualMapComponent, VisualMapComponentOption, install$78 as VisualMapContinuousComponent, install$79 as VisualMapPiecewiseComponent } from './shared';
1
+ export { install$62 as AlarmComponent, install$81 as AriaComponent, AriaOption as AriaComponentOption, install$55 as AxisPointerComponent, AxisPointerOption as AxisPointerComponentOption, install$63 as BgRectComponent, install$56 as BrushComponent, BrushOption as BrushComponentOption, install$51 as CalendarComponent, CalendarOption as CalendarComponentOption, install$60 as CursorPointerComponent, install$75 as DataZoomComponent, DataZoomComponentOption, install$76 as DataZoomInsideComponent, install$77 as DataZoomSliderComponent, install$83 as DatasetComponent, DatasetOption as DatasetComponentOption, install$58 as EventsComponent, install$48 as GeoComponent, GeoOption as GeoComponentOption, install$52 as GraphicComponent, GraphicComponentLooseOption as GraphicComponentOption, install$45 as GridComponent, GridOption as GridComponentOption, install$44 as GridSimpleComponent, install$72 as LegendComponent, LegendComponentOption, install$74 as LegendPlainComponent, install$73 as LegendScrollComponent, install$71 as LimitTipComponent, install$65 as LogoComponent, install$69 as MarkAreaComponent, MarkAreaOption as MarkAreaComponentOption, install$70 as MarkLabelComponent, MarkLabelOption as MarkLabelComponentOption, install$68 as MarkLineComponent, MarkLineOption as MarkLineComponentOption, install$67 as MarkPointComponent, MarkPointOption as MarkPointComponentOption, install$50 as ParallelComponent, ParallelCoordinateSystemOption as ParallelComponentOption, install$64 as PlaybackComponent, install$46 as PolarComponent, PolarOption as PolarComponentOption, install$47 as RadarComponent, RadarOption as RadarComponentOption, install$49 as SingleAxisComponent, SingleAxisOption as SingleAxisComponentOption, install$61 as TableComponent, install$66 as TimelineComponent, TimelineOption as TimelineComponentOption, install$57 as TitleComponent, TitleOption as TitleComponentOption, install$53 as ToolboxComponent, ToolboxComponentOption, install$54 as TooltipComponent, TooltipOption as TooltipComponentOption, install$59 as TradeDayComponent, install$82 as TransformComponent, install$78 as VisualMapComponent, VisualMapComponentOption, install$79 as VisualMapContinuousComponent, install$80 as VisualMapPiecewiseComponent } from './shared';
@@ -1 +1 @@
1
- export { install$84 as CanvasRenderer, install$83 as SVGRenderer } from './shared';
1
+ export { install$85 as CanvasRenderer, install$84 as SVGRenderer } from './shared';
@@ -9333,6 +9333,8 @@ declare function install$G(registers: EChartsExtensionInstallRegisters): void;
9333
9333
 
9334
9334
  declare function install$H(registers: EChartsExtensionInstallRegisters): void;
9335
9335
 
9336
+ declare function install$I(registers: EChartsExtensionInstallRegisters): void;
9337
+
9336
9338
  interface RadarIndicatorOption {
9337
9339
  name?: string;
9338
9340
  /**
@@ -9565,7 +9567,7 @@ interface TitleOption extends ComponentOption, BoxLayoutOptionMixin, BorderOptio
9565
9567
  */
9566
9568
  borderRadius?: number | number[];
9567
9569
  }
9568
- declare function install$I(registers: EChartsExtensionInstallRegisters): void;
9570
+ declare function install$J(registers: EChartsExtensionInstallRegisters): void;
9569
9571
 
9570
9572
  interface TimelineControlStyle extends ItemStyleOption {
9571
9573
  show?: boolean;
@@ -11560,8 +11562,6 @@ interface EChartsOption extends ECBasicOption {
11560
11562
  baseOption?: EChartsOption;
11561
11563
  }
11562
11564
 
11563
- declare function install$J(registers: EChartsExtensionInstallRegisters): void;
11564
-
11565
11565
  declare function install$K(registers: EChartsExtensionInstallRegisters): void;
11566
11566
 
11567
11567
  declare function install$L(registers: EChartsExtensionInstallRegisters): void;
@@ -11640,8 +11640,10 @@ declare function install$1j(registers: EChartsExtensionInstallRegisters): void;
11640
11640
 
11641
11641
  declare function install$1k(registers: EChartsExtensionInstallRegisters): void;
11642
11642
 
11643
+ declare function install$1l(registers: EChartsExtensionInstallRegisters): void;
11644
+
11643
11645
  declare function installUniversalTransition(registers: EChartsExtensionInstallRegisters): void;
11644
11646
 
11645
11647
  declare function installLabelLayout(registers: EChartsExtensionInstallRegisters): void;
11646
11648
 
11647
- export { AngleAxisOption, AnimationDelayCallback, AnimationDelayCallbackParam, AnimationDurationCallback, AriaOption, Axis, AxisPointerOption, BarSeriesOption$1 as BarSeriesOption, BoxplotSeriesOption$1 as BoxplotSeriesOption, BrushOption, CalendarOption, CallbackDataParams, CandlestickSeriesOption$1 as CandlestickSeriesOption, ChartView, ComponentModel, ComponentView, ComposeOption, ContinousVisualMapOption, CustomSeriesOption$1 as CustomSeriesOption, CustomSeriesRenderItem, CustomSeriesRenderItemAPI, CustomSeriesRenderItemParams, CustomSeriesRenderItemReturn, DataZoomComponentOption, DatasetOption, DownplayPayload, ECBasicOption, ECElementEvent, EChartsInitOpts, EChartsOption, EChartsType, EffectScatterSeriesOption$1 as EffectScatterSeriesOption, ElementEvent, FunnelSeriesOption$1 as FunnelSeriesOption, GaugeSeriesOption$1 as GaugeSeriesOption, GeoOption, GraphSeriesOption$1 as GraphSeriesOption, GraphicComponentLooseOption, GridOption, HeatmapSeriesOption$1 as HeatmapSeriesOption, HighlightPayload, ImagePatternObject, InsideDataZoomOption, LabelFormatterCallback, LabelLayoutOptionCallback, LabelLayoutOptionCallbackParams, LegendComponentOption, LegendOption, LineSeriesOption$1 as LineSeriesOption, LinearGradientObject, LinesPlotSeriesOption$1 as LinesPlotSeriesOption, LinesSeriesOption$1 as LinesSeriesOption, MapSeriesOption$1 as MapSeriesOption, MarkAreaOption, MarkLabelOption, MarkLineOption, MarkPointOption, MineLinesSeriesOption$1 as MineLinesSeriesOption, Model, PRIORITY, ParallelCoordinateSystemOption, ParallelSeriesOption$1 as ParallelSeriesOption, PatternObject, Payload, PictorialBarSeriesOption$1 as PictorialBarSeriesOption, PieSeriesOption$1 as PieSeriesOption, PiecewiseVisualMapOption, PolarOption, RadarOption, RadarSeriesOption$1 as RadarSeriesOption, RadialGradientObject, RadiusAxisOption, RegisteredSeriesOption, ResizeOpts, SVGPatternObject, SankeySeriesOption$1 as SankeySeriesOption, ScatterSeriesOption$1 as ScatterSeriesOption, ScrollableLegendOption, SelectChangedPayload, SeriesData, SeriesModel, SeriesOption$1 as SeriesOption, SetOptionOpts, SetOptionTransitionOpt, SetOptionTransitionOptItem, SingleAxisOption, SliderDataZoomOption, StrategySeriesOption$1 as StrategySeriesOption, SunburstSeriesOption$1 as SunburstSeriesOption, ThemeRiverSeriesOption$1 as ThemeRiverSeriesOption, TimelineOption, TitleOption, ToolboxComponentOption, TooltipFormatterCallback, TooltipOption, TooltipPositionCallback, TooltipPositionCallbackParams, TopLevelFormatterParams, TreeSeriesOption$1 as TreeSeriesOption, TreemapSeriesOption$1 as TreemapSeriesOption, VisualMapComponentOption, XAXisOption, YAXisOption, ZRColor, brushSingle, colorToRgba, color_d, connect, connectLayoutAction, connectLayouts, contrastColor, dataTool, dependencies, disConnect, disconnect, disconnectLayoutAction, disconnectLayouts, dispose$1 as dispose, env, extendChartView, extendComponentModel, extendComponentView, extendSeriesModel, format_d, getCoordinateSystemDimensions, getInstanceByDom, getInstanceById, getMap, graphic_d, helper_d, init$1 as init, install$1 as install, install$2 as install$1, install$b as install$10, install$c as install$11, install$d as install$12, install$e as install$13, install$f as install$14, install$g as install$15, install$h as install$16, install$i as install$17, install$j as install$18, install$k as install$19, install$3 as install$2, install$l as install$20, install$m as install$21, install$n as install$22, install$o as install$23, install$p as install$24, install$q as install$25, install$r as install$26, install$s as install$27, install$t as install$28, install$u as install$29, install$4 as install$3, install$v as install$30, install$w as install$31, install$x as install$32, install$y as install$33, install$z as install$34, install$A as install$35, install$B as install$36, install$C as install$37, install$D as install$38, install$E as install$39, install$5 as install$4, install$F as install$40, install$G as install$41, install$H as install$42, install$J as install$43, install$K as install$44, install$L as install$45, install$M as install$46, install$N as install$47, install$O as install$48, install$P as install$49, install$6 as install$5, install$Q as install$50, install$R as install$51, install$S as install$52, install$T as install$53, install$U as install$54, install$V as install$55, install$I as install$56, install$W as install$57, install$X as install$58, install$Y as install$59, install$7 as install$6, install$Z as install$60, install$_ as install$61, install$$ as install$62, install$10 as install$63, install$11 as install$64, install$12 as install$65, install$13 as install$66, install$14 as install$67, install$15 as install$68, install$16 as install$69, install$8 as install$7, install$17 as install$70, install$18 as install$71, install$19 as install$72, install$1a as install$73, install$1b as install$74, install$1c as install$75, install$1d as install$76, install$1e as install$77, install$1f as install$78, install$1g as install$79, install$9 as install$8, install$1h as install$80, install$1i as install$81, install as install$82, install$1j as install$83, install$1k as install$84, install$a as install$9, installLabelLayout, installUniversalTransition, matrix_d, number_d, parseGeoJSON, registerAction, registerCoordinateSystem, registerLayout, registerLoading, registerLocale, registerMap, registerPostInit, registerPostUpdate, registerPreprocessor, registerProcessor, registerTheme, registerTransform, registerUpdateLifecycle, registerVisual, setCanvasCreator, setPlatformAPI, throttle, time_d, use, util_d, util_d$1, vector_d, version$1 as version, zrender_d };
11649
+ export { AngleAxisOption, AnimationDelayCallback, AnimationDelayCallbackParam, AnimationDurationCallback, AriaOption, Axis, AxisPointerOption, BarSeriesOption$1 as BarSeriesOption, BoxplotSeriesOption$1 as BoxplotSeriesOption, BrushOption, CalendarOption, CallbackDataParams, CandlestickSeriesOption$1 as CandlestickSeriesOption, ChartView, ComponentModel, ComponentView, ComposeOption, ContinousVisualMapOption, CustomSeriesOption$1 as CustomSeriesOption, CustomSeriesRenderItem, CustomSeriesRenderItemAPI, CustomSeriesRenderItemParams, CustomSeriesRenderItemReturn, DataZoomComponentOption, DatasetOption, DownplayPayload, ECBasicOption, ECElementEvent, EChartsInitOpts, EChartsOption, EChartsType, EffectScatterSeriesOption$1 as EffectScatterSeriesOption, ElementEvent, FunnelSeriesOption$1 as FunnelSeriesOption, GaugeSeriesOption$1 as GaugeSeriesOption, GeoOption, GraphSeriesOption$1 as GraphSeriesOption, GraphicComponentLooseOption, GridOption, HeatmapSeriesOption$1 as HeatmapSeriesOption, HighlightPayload, ImagePatternObject, InsideDataZoomOption, LabelFormatterCallback, LabelLayoutOptionCallback, LabelLayoutOptionCallbackParams, LegendComponentOption, LegendOption, LineSeriesOption$1 as LineSeriesOption, LinearGradientObject, LinesPlotSeriesOption$1 as LinesPlotSeriesOption, LinesSeriesOption$1 as LinesSeriesOption, MapSeriesOption$1 as MapSeriesOption, MarkAreaOption, MarkLabelOption, MarkLineOption, MarkPointOption, MineLinesSeriesOption$1 as MineLinesSeriesOption, Model, PRIORITY, ParallelCoordinateSystemOption, ParallelSeriesOption$1 as ParallelSeriesOption, PatternObject, Payload, PictorialBarSeriesOption$1 as PictorialBarSeriesOption, PieSeriesOption$1 as PieSeriesOption, PiecewiseVisualMapOption, PolarOption, RadarOption, RadarSeriesOption$1 as RadarSeriesOption, RadialGradientObject, RadiusAxisOption, RegisteredSeriesOption, ResizeOpts, SVGPatternObject, SankeySeriesOption$1 as SankeySeriesOption, ScatterSeriesOption$1 as ScatterSeriesOption, ScrollableLegendOption, SelectChangedPayload, SeriesData, SeriesModel, SeriesOption$1 as SeriesOption, SetOptionOpts, SetOptionTransitionOpt, SetOptionTransitionOptItem, SingleAxisOption, SliderDataZoomOption, StrategySeriesOption$1 as StrategySeriesOption, SunburstSeriesOption$1 as SunburstSeriesOption, ThemeRiverSeriesOption$1 as ThemeRiverSeriesOption, TimelineOption, TitleOption, ToolboxComponentOption, TooltipFormatterCallback, TooltipOption, TooltipPositionCallback, TooltipPositionCallbackParams, TopLevelFormatterParams, TreeSeriesOption$1 as TreeSeriesOption, TreemapSeriesOption$1 as TreemapSeriesOption, VisualMapComponentOption, XAXisOption, YAXisOption, ZRColor, brushSingle, colorToRgba, color_d, connect, connectLayoutAction, connectLayouts, contrastColor, dataTool, dependencies, disConnect, disconnect, disconnectLayoutAction, disconnectLayouts, dispose$1 as dispose, env, extendChartView, extendComponentModel, extendComponentView, extendSeriesModel, format_d, getCoordinateSystemDimensions, getInstanceByDom, getInstanceById, getMap, graphic_d, helper_d, init$1 as init, install$1 as install, install$2 as install$1, install$b as install$10, install$c as install$11, install$d as install$12, install$e as install$13, install$f as install$14, install$g as install$15, install$h as install$16, install$i as install$17, install$j as install$18, install$k as install$19, install$3 as install$2, install$l as install$20, install$m as install$21, install$n as install$22, install$o as install$23, install$p as install$24, install$q as install$25, install$r as install$26, install$s as install$27, install$t as install$28, install$u as install$29, install$4 as install$3, install$v as install$30, install$w as install$31, install$x as install$32, install$y as install$33, install$z as install$34, install$A as install$35, install$B as install$36, install$C as install$37, install$D as install$38, install$E as install$39, install$5 as install$4, install$F as install$40, install$G as install$41, install$H as install$42, install$I as install$43, install$K as install$44, install$L as install$45, install$M as install$46, install$N as install$47, install$O as install$48, install$P as install$49, install$6 as install$5, install$Q as install$50, install$R as install$51, install$S as install$52, install$T as install$53, install$U as install$54, install$V as install$55, install$W as install$56, install$J as install$57, install$X as install$58, install$Y as install$59, install$7 as install$6, install$Z as install$60, install$_ as install$61, install$$ as install$62, install$10 as install$63, install$11 as install$64, install$12 as install$65, install$13 as install$66, install$14 as install$67, install$15 as install$68, install$16 as install$69, install$8 as install$7, install$17 as install$70, install$18 as install$71, install$19 as install$72, install$1a as install$73, install$1b as install$74, install$1c as install$75, install$1d as install$76, install$1e as install$77, install$1f as install$78, install$1g as install$79, install$9 as install$8, install$1h as install$80, install$1i as install$81, install$1j as install$82, install as install$83, install$1k as install$84, install$1l as install$85, install$a as install$9, installLabelLayout, installUniversalTransition, matrix_d, number_d, parseGeoJSON, registerAction, registerCoordinateSystem, registerLayout, registerLoading, registerLocale, registerMap, registerPostInit, registerPostUpdate, registerPreprocessor, registerProcessor, registerTheme, registerTransform, registerUpdateLifecycle, registerVisual, setCanvasCreator, setPlatformAPI, throttle, time_d, use, util_d, util_d$1, vector_d, version$1 as version, zrender_d };
@@ -0,0 +1,3 @@
1
+ import { StageHandler } from '../../util/types.js';
2
+ declare const hlcAreaLayout: StageHandler;
3
+ export default hlcAreaLayout;
@@ -0,0 +1,61 @@
1
+ import SeriesModel from '../../model/Series.js';
2
+ import { SeriesOnCartesianOptionMixin, SeriesOption, SeriesLabelOption, LineStyleOption, ItemStyleOption, AreaStyleOption, OptionDataValue, SymbolOptionMixin, SeriesSamplingOptionMixin, StatesOptionMixin, SeriesEncodeOptionMixin, CallbackDataParams, DefaultEmphasisFocus } from '../../util/types.js';
3
+ import SeriesData from '../../data/SeriesData.js';
4
+ import type Cartesian2D from '../../coord/cartesian/Cartesian2D.js';
5
+ import type Polar from '../../coord/polar/Polar.js';
6
+ import { PathState } from 'tvrender/lib/graphic/Path.js';
7
+ declare type HlcAreaDataValue = OptionDataValue | OptionDataValue[];
8
+ interface HlcAreaStateOptionMixin {
9
+ emphasis?: {
10
+ focus?: DefaultEmphasisFocus;
11
+ scale?: boolean | number;
12
+ emphasisState?: PathState;
13
+ };
14
+ }
15
+ interface HlcAreaItemStyleOption extends ItemStyleOption {
16
+ hVisible?: boolean;
17
+ hLineWidth: number;
18
+ hColor: string;
19
+ cLineWidth: number;
20
+ cColor: string;
21
+ lVisible?: boolean;
22
+ lLineWidth: number;
23
+ lColor: string;
24
+ fill1: string;
25
+ fill2: string;
26
+ }
27
+ export interface HlcAreaStateOption<TCbParams = never> {
28
+ itemStyle?: HlcAreaItemStyleOption;
29
+ label?: SeriesLabelOption;
30
+ endLabel?: HlcAreaEndLabelOption;
31
+ }
32
+ export interface HlcAreaDataItemOption extends SymbolOptionMixin, HlcAreaStateOption, StatesOptionMixin<HlcAreaStateOption, HlcAreaStateOptionMixin> {
33
+ name?: string;
34
+ value?: HlcAreaDataValue;
35
+ }
36
+ export interface HlcAreaEndLabelOption extends SeriesLabelOption {
37
+ valueAnimation?: boolean;
38
+ }
39
+ export interface HlcAreaSeriesOption extends SeriesOption<HlcAreaStateOption<CallbackDataParams>, HlcAreaStateOptionMixin & {
40
+ emphasis?: {
41
+ lineStyle?: Omit<LineStyleOption, 'width'> & {
42
+ width?: LineStyleOption['width'] | 'bolder';
43
+ };
44
+ areaStyle?: AreaStyleOption;
45
+ };
46
+ }>, HlcAreaStateOption<CallbackDataParams>, SeriesOnCartesianOptionMixin, SeriesSamplingOptionMixin, SeriesEncodeOptionMixin {
47
+ type?: 'hlcArea';
48
+ coordinateSystem?: 'cartesian2d' | 'polar';
49
+ clip?: boolean;
50
+ data?: (HlcAreaDataValue | HlcAreaDataItemOption)[];
51
+ }
52
+ declare class HlcAreaSeriesModel extends SeriesModel<HlcAreaSeriesOption> {
53
+ static readonly type = "series.hlcArea";
54
+ type: string;
55
+ static readonly dependencies: string[];
56
+ coordinateSystem: Cartesian2D | Polar;
57
+ ignoreStyleOnData: boolean;
58
+ getInitialData(option: HlcAreaSeriesOption): SeriesData;
59
+ static defaultOption: HlcAreaSeriesOption;
60
+ }
61
+ export default HlcAreaSeriesModel;
@@ -0,0 +1,13 @@
1
+ import ChartView from '../../view/Chart.js';
2
+ import GlobalModel from '../../model/Global.js';
3
+ import ExtensionAPI from '../../core/ExtensionAPI.js';
4
+ import HlcAreaSeriesModel from './HlcAreaSeries.js';
5
+ declare class HlcAreaView extends ChartView {
6
+ static readonly type = "hlcArea";
7
+ readonly type = "hlcArea";
8
+ render(seriesModel: HlcAreaSeriesModel, ecModel: GlobalModel, api: ExtensionAPI): void;
9
+ _renderNormal(seriesModel: HlcAreaSeriesModel): void;
10
+ remove(ecModel: GlobalModel): void;
11
+ _clear(): void;
12
+ }
13
+ export default HlcAreaView;
@@ -0,0 +1,21 @@
1
+ import * as graphic from '../../util/graphic.js';
2
+ import { createSymbol } from '../../util/symbol.js';
3
+ import { PathProps } from 'tvrender/lib/graphic/Path.js';
4
+ import PathProxy from 'tvrender/lib/core/PathProxy.js';
5
+ declare class LargePolyLinePathShape {
6
+ xPoints: number[];
7
+ y1Points: number[];
8
+ y2Points: number[];
9
+ }
10
+ declare type LargePolyLinePathProps = PathProps & {
11
+ shape?: Partial<LargePolyLinePathShape>;
12
+ };
13
+ declare type ECSymbol = ReturnType<typeof createSymbol>;
14
+ declare class PolyLinePath extends graphic.Path<LargePolyLinePathProps> {
15
+ shape: LargePolyLinePathShape;
16
+ symbolProxy: ECSymbol;
17
+ constructor(opts?: LargePolyLinePathProps);
18
+ getDefaultShape(): LargePolyLinePathShape;
19
+ buildPath(path: PathProxy, shape: LargePolyLinePathShape): void;
20
+ }
21
+ export default PolyLinePath;
@@ -0,0 +1,20 @@
1
+ import * as graphic from '../../util/graphic.js';
2
+ import { createSymbol } from '../../util/symbol.js';
3
+ import { PathProps } from 'tvrender/lib/graphic/Path.js';
4
+ import PathProxy from 'tvrender/lib/core/PathProxy.js';
5
+ declare class LargePolyLinePathShape {
6
+ xPoints: number[];
7
+ yPoints: number[];
8
+ }
9
+ declare type LargePolyLinePathProps = PathProps & {
10
+ shape?: Partial<LargePolyLinePathShape>;
11
+ };
12
+ declare type ECSymbol = ReturnType<typeof createSymbol>;
13
+ declare class PolyLinePath extends graphic.Path<LargePolyLinePathProps> {
14
+ shape: LargePolyLinePathShape;
15
+ symbolProxy: ECSymbol;
16
+ constructor(opts?: LargePolyLinePathProps);
17
+ getDefaultShape(): LargePolyLinePathShape;
18
+ buildPath(path: PathProxy, shape: LargePolyLinePathShape): void;
19
+ }
20
+ export default PolyLinePath;
@@ -0,0 +1,2 @@
1
+ import { EChartsExtensionInstallRegisters } from '../../extension.js';
2
+ export declare function install(registers: EChartsExtensionInstallRegisters): void;
@@ -27,6 +27,7 @@ export { install as CandlePlotChart } from '../chart/candlePlot/install.js';
27
27
  export { install as CandleVolumeChart } from '../chart/candleVolume/install.js';
28
28
  export { install as SymbolLineChart } from '../chart/symbolLine/install.js';
29
29
  export { install as HeikinAshiChart } from '../chart/heikinAshi/install.js';
30
+ export { install as HlcAreaChart } from '../chart/hlcArea/install.js';
30
31
  export { install as VolPathChart } from '../chart/volPath/install.js';
31
32
  export { install as VolPathRectChart } from '../chart/volPathRect/install.js';
32
33
  export { install as VolPathTableChart } from '../chart/volPathTable/install.js';