evui 3.3.39 → 3.3.41
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/dist/evui.common.js +2477 -197
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +2477 -197
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chart/Chart.vue +95 -5
- package/src/components/chart/ChartToolbar.vue +52 -0
- package/src/components/chart/chart.core.js +71 -27
- package/src/components/chart/chartZoom.core.js +479 -0
- package/src/components/chart/element/element.line.js +2 -1
- package/src/components/chart/element/element.scatter.js +8 -2
- package/src/components/chart/element/element.tip.js +41 -33
- package/src/components/chart/model/model.store.js +34 -5
- package/src/components/chart/plugins/plugins.interaction.js +28 -4
- package/src/components/chart/plugins/plugins.legend.js +11 -1
- package/src/components/chart/plugins/plugins.title.js +13 -8
- package/src/components/chart/scale/scale.js +8 -3
- package/src/components/chart/style/chart.scss +14 -0
- package/src/components/chart/uses.js +329 -6
- package/src/components/chartBrush/ChartBrush.vue +298 -0
- package/src/components/chartBrush/chartBrush.core.js +458 -0
- package/src/components/chartBrush/index.js +9 -0
- package/src/components/chartBrush/uses.js +22 -0
- package/src/components/chartGroup/ChartGroup.vue +125 -0
- package/src/components/chartGroup/index.js +9 -0
- package/src/components/chartGroup/style/chartGroup.scss +5 -0
- package/src/components/chartGroup/uses.js +48 -0
- package/src/components/pagination/pageButton.vue +1 -0
- package/src/main.js +4 -0
package/dist/evui.common.js
CHANGED
|
@@ -153,6 +153,21 @@ module.exports = function (fn, that, length) {
|
|
|
153
153
|
/* unused harmony reexport * */
|
|
154
154
|
|
|
155
155
|
|
|
156
|
+
/***/ }),
|
|
157
|
+
|
|
158
|
+
/***/ "052a":
|
|
159
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
160
|
+
|
|
161
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
162
|
+
|
|
163
|
+
// load the styles
|
|
164
|
+
var content = __webpack_require__("17c0");
|
|
165
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
166
|
+
if(content.locals) module.exports = content.locals;
|
|
167
|
+
// add the styles to the DOM
|
|
168
|
+
var add = __webpack_require__("499e").default
|
|
169
|
+
var update = add("68157d0e", content, true, {"sourceMap":false,"shadowMode":false});
|
|
170
|
+
|
|
156
171
|
/***/ }),
|
|
157
172
|
|
|
158
173
|
/***/ "0538":
|
|
@@ -275,6 +290,20 @@ $({ target: 'Object', stat: true }, {
|
|
|
275
290
|
});
|
|
276
291
|
|
|
277
292
|
|
|
293
|
+
/***/ }),
|
|
294
|
+
|
|
295
|
+
/***/ "08a2":
|
|
296
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
297
|
+
|
|
298
|
+
// Imports
|
|
299
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
300
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
301
|
+
// Module
|
|
302
|
+
exports.push([module.i, ".ev-chart-group__wrapper[data-v-bd8c6660]{display:flex;height:100%;flex-direction:column}", ""]);
|
|
303
|
+
// Exports
|
|
304
|
+
module.exports = exports;
|
|
305
|
+
|
|
306
|
+
|
|
278
307
|
/***/ }),
|
|
279
308
|
|
|
280
309
|
/***/ "0924":
|
|
@@ -284,6 +313,21 @@ module.exports = __webpack_require__.p + "img/icon_oracle.0572d3ee.svg";
|
|
|
284
313
|
|
|
285
314
|
/***/ }),
|
|
286
315
|
|
|
316
|
+
/***/ "0b6e":
|
|
317
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
318
|
+
|
|
319
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
320
|
+
|
|
321
|
+
// load the styles
|
|
322
|
+
var content = __webpack_require__("cdcc");
|
|
323
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
324
|
+
if(content.locals) module.exports = content.locals;
|
|
325
|
+
// add the styles to the DOM
|
|
326
|
+
var add = __webpack_require__("499e").default
|
|
327
|
+
var update = add("0311a9bf", content, true, {"sourceMap":false,"shadowMode":false});
|
|
328
|
+
|
|
329
|
+
/***/ }),
|
|
330
|
+
|
|
287
331
|
/***/ "0cfb":
|
|
288
332
|
/***/ (function(module, exports, __webpack_require__) {
|
|
289
333
|
|
|
@@ -628,6 +672,20 @@ if(content.locals) module.exports = content.locals;
|
|
|
628
672
|
var add = __webpack_require__("499e").default
|
|
629
673
|
var update = add("ede85a96", content, true, {"sourceMap":false,"shadowMode":false});
|
|
630
674
|
|
|
675
|
+
/***/ }),
|
|
676
|
+
|
|
677
|
+
/***/ "17c0":
|
|
678
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
679
|
+
|
|
680
|
+
// Imports
|
|
681
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
682
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
683
|
+
// Module
|
|
684
|
+
exports.push([module.i, ".ev-chart-brush-wrapper,.ev-chart-wrapper{display:block;position:relative;width:100%;height:100%}.ev-chart-brush-container,.ev-chart-container{position:relative;overflow:hidden;width:100%;height:100%}.ev-chart-title{top:0;left:0;width:100%;padding-left:10px;word-wrap:normal;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ev-chart-legend,.ev-chart-title{position:absolute;overflow:hidden}.ev-chart-legend{padding:5px 0 0 0}.ev-chart-legend-container{position:relative}.ev-chart-legend-color,.ev-chart-legend-color--point-line{position:absolute;top:50%;left:0;transform:translateY(-50%);width:18px;height:4px}.ev-chart-legend-color--point-line:after{display:inline-block;position:absolute;top:-2px;left:5px;width:8px;height:8px;content:\" \";border-radius:50%;background-color:inherit}.ev-chart-legend-name{position:absolute;top:50%;left:0;width:100%;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:12px;margin-left:24px;padding-right:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-weight:400;transform:translateY(-50%)}.ev-chart-legend-name:hover{font-weight:700}.ev-chart-legend-value{float:right;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ev-chart-legend--table{width:100%;font-size:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-collapse:collapse}.ev-chart-legend--table td,.ev-chart-legend--table th{padding:3px;text-align:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ev-chart-legend--table__row{cursor:pointer;min-height:18px}.ev-chart-legend--table__row:hover{font-weight:700}.ev-chart-legend--table__color{width:18px}.ev-chart-legend--table__color-wrapper{position:relative;min-width:18px}.ev-chart-legend--table__color--line{height:4px}.ev-chart-legend--table__color--point-line{position:absolute;top:50%;left:3px;transform:translateY(-50%);height:4px}.ev-chart-legend--table__color--point-line:after{display:inline-block;position:absolute;top:-2px;left:5px;width:8px;height:8px;content:\" \";border-radius:50%;background-color:inherit}.ev-chart-legend--table__name,.ev-chart-legend--table__value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ev-chart-legend-line{position:relative;width:100%;height:100%;border-radius:10px;background-color:#e3e3e3}.ev-chart-legend-line-layer,.ev-chart-legend-thumb{position:absolute;top:0;left:0;width:100%;height:100%}.ev-chart-legend-thumb{border-radius:10px;color:#000}.ev-chart-legend-handle{position:absolute;top:0;left:0;cursor:pointer}.ev-chart-legend-handle.dragging,.ev-chart-legend-handle:hover{transform:scale(1.2)}.ev-chart-legend-handle-btn{width:100%;height:100%;border-radius:50%;background-color:#fff;transition:transform .1s ease-in-out;box-sizing:border-box;border:2px solid #979797}.ev-chart-legend-handle-btn-color{position:absolute;top:4px;left:4px;width:calc(100% - 8px);height:calc(100% - 8px);border-radius:50%}.ev-chart-legend-label{position:absolute;font-size:12px;line-height:1.4em}.ev-chart-legend-label-text{display:block;white-space:nowrap}.ev-chart-legend-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ev-chart-legend-overlay .ev-chart-legend-overlay-item{position:absolute;top:1px;left:1px;border-radius:50%;border:1px solid #fff;background-color:transparent}.ev-chart-legend-overlay .ev-chart-legend-overlay-tooltip{position:absolute;font-size:12px;line-height:1.4em}.ev-chart-resize-bar{position:absolute;background:transparent;opacity:.5;z-index:10}.ev-chart-resize-bar:hover,.ev-chart-resize-ghost{background-color:#e2e2e2}.ev-chart-resize-ghost{position:absolute;width:4px;height:100%;cursor:col-resize;opacity:.5}.ev-chart-resize-ghost.horizontal{width:100%;height:4px;cursor:row-resize}.ev-chart-tooltip{position:absolute;z-index:850;top:0;left:0;overflow-y:hidden;overflow-x:hidden;border-radius:8px}.ev-chart-tooltip .ev-chart-tooltip-header{padding:8px 16px 0 16px;overflow:hidden;font-size:16px}.ev-chart-tooltip .ev-chart-tooltip-header--wrap{word-wrap:break-word}.ev-chart-tooltip .ev-chart-tooltip-header--ellipsis{text-overflow:ellipsis;white-space:nowrap}.ev-chart-tooltip .ev-chart-tooltip-body{overflow-x:hidden;overflow-y:hidden}", ""]);
|
|
685
|
+
// Exports
|
|
686
|
+
module.exports = exports;
|
|
687
|
+
|
|
688
|
+
|
|
631
689
|
/***/ }),
|
|
632
690
|
|
|
633
691
|
/***/ "17c2":
|
|
@@ -649,21 +707,6 @@ module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callback
|
|
|
649
707
|
} : [].forEach;
|
|
650
708
|
|
|
651
709
|
|
|
652
|
-
/***/ }),
|
|
653
|
-
|
|
654
|
-
/***/ "1839":
|
|
655
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
656
|
-
|
|
657
|
-
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
658
|
-
|
|
659
|
-
// load the styles
|
|
660
|
-
var content = __webpack_require__("1d10");
|
|
661
|
-
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
662
|
-
if(content.locals) module.exports = content.locals;
|
|
663
|
-
// add the styles to the DOM
|
|
664
|
-
var add = __webpack_require__("499e").default
|
|
665
|
-
var update = add("34615be8", content, true, {"sourceMap":false,"shadowMode":false});
|
|
666
|
-
|
|
667
710
|
/***/ }),
|
|
668
711
|
|
|
669
712
|
/***/ "196e":
|
|
@@ -4182,20 +4225,6 @@ var userAgent = __webpack_require__("342f");
|
|
|
4182
4225
|
module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);
|
|
4183
4226
|
|
|
4184
4227
|
|
|
4185
|
-
/***/ }),
|
|
4186
|
-
|
|
4187
|
-
/***/ "1d10":
|
|
4188
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4189
|
-
|
|
4190
|
-
// Imports
|
|
4191
|
-
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
4192
|
-
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
4193
|
-
// Module
|
|
4194
|
-
exports.push([module.i, ".ev-chart-wrapper{display:block}.ev-chart-container,.ev-chart-wrapper{position:relative;width:100%;height:100%}.ev-chart-container{overflow:hidden}.ev-chart-title{top:0;left:0;width:100%;padding-left:10px;word-wrap:normal;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ev-chart-legend,.ev-chart-title{position:absolute;overflow:hidden}.ev-chart-legend{padding:5px 0 0 0}.ev-chart-legend-container{position:relative}.ev-chart-legend-color,.ev-chart-legend-color--point-line{position:absolute;top:50%;left:0;transform:translateY(-50%);width:18px;height:4px}.ev-chart-legend-color--point-line:after{display:inline-block;position:absolute;top:-2px;left:5px;width:8px;height:8px;content:\" \";border-radius:50%;background-color:inherit}.ev-chart-legend-name{position:absolute;top:50%;left:0;width:100%;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:12px;margin-left:24px;padding-right:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-weight:400;transform:translateY(-50%)}.ev-chart-legend-name:hover{font-weight:700}.ev-chart-legend-value{float:right;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ev-chart-legend--table{width:100%;font-size:12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-collapse:collapse}.ev-chart-legend--table td,.ev-chart-legend--table th{padding:3px;text-align:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ev-chart-legend--table__row{cursor:pointer;min-height:18px}.ev-chart-legend--table__row:hover{font-weight:700}.ev-chart-legend--table__color{width:18px}.ev-chart-legend--table__color-wrapper{position:relative;min-width:18px}.ev-chart-legend--table__color--line{height:4px}.ev-chart-legend--table__color--point-line{position:absolute;top:50%;left:3px;transform:translateY(-50%);height:4px}.ev-chart-legend--table__color--point-line:after{display:inline-block;position:absolute;top:-2px;left:5px;width:8px;height:8px;content:\" \";border-radius:50%;background-color:inherit}.ev-chart-legend--table__name,.ev-chart-legend--table__value{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ev-chart-legend-line{position:relative;width:100%;height:100%;border-radius:10px;background-color:#e3e3e3}.ev-chart-legend-line-layer,.ev-chart-legend-thumb{position:absolute;top:0;left:0;width:100%;height:100%}.ev-chart-legend-thumb{border-radius:10px;color:#000}.ev-chart-legend-handle{position:absolute;top:0;left:0;cursor:pointer}.ev-chart-legend-handle.dragging,.ev-chart-legend-handle:hover{transform:scale(1.2)}.ev-chart-legend-handle-btn{width:100%;height:100%;border-radius:50%;background-color:#fff;transition:transform .1s ease-in-out;box-sizing:border-box;border:2px solid #979797}.ev-chart-legend-handle-btn-color{position:absolute;top:4px;left:4px;width:calc(100% - 8px);height:calc(100% - 8px);border-radius:50%}.ev-chart-legend-label{position:absolute;font-size:12px;line-height:1.4em}.ev-chart-legend-label-text{display:block;white-space:nowrap}.ev-chart-legend-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ev-chart-legend-overlay .ev-chart-legend-overlay-item{position:absolute;top:1px;left:1px;border-radius:50%;border:1px solid #fff;background-color:transparent}.ev-chart-legend-overlay .ev-chart-legend-overlay-tooltip{position:absolute;font-size:12px;line-height:1.4em}.ev-chart-resize-bar{position:absolute;background:transparent;opacity:.5;z-index:10}.ev-chart-resize-bar:hover,.ev-chart-resize-ghost{background-color:#e2e2e2}.ev-chart-resize-ghost{position:absolute;width:4px;height:100%;cursor:col-resize;opacity:.5}.ev-chart-resize-ghost.horizontal{width:100%;height:4px;cursor:row-resize}.ev-chart-tooltip{position:absolute;z-index:850;top:0;left:0;overflow-y:hidden;overflow-x:hidden;border-radius:8px}.ev-chart-tooltip .ev-chart-tooltip-header{padding:8px 16px 0 16px;overflow:hidden;font-size:16px}.ev-chart-tooltip .ev-chart-tooltip-header--wrap{word-wrap:break-word}.ev-chart-tooltip .ev-chart-tooltip-header--ellipsis{text-overflow:ellipsis;white-space:nowrap}.ev-chart-tooltip .ev-chart-tooltip-body{overflow-x:hidden;overflow-y:hidden}", ""]);
|
|
4195
|
-
// Exports
|
|
4196
|
-
module.exports = exports;
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
4228
|
/***/ }),
|
|
4200
4229
|
|
|
4201
4230
|
/***/ "1d80":
|
|
@@ -6815,6 +6844,17 @@ exports.push([module.i, ".ev-input,.ev-textarea{width:100%;outline:0;background-
|
|
|
6815
6844
|
module.exports = exports;
|
|
6816
6845
|
|
|
6817
6846
|
|
|
6847
|
+
/***/ }),
|
|
6848
|
+
|
|
6849
|
+
/***/ "6938":
|
|
6850
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6851
|
+
|
|
6852
|
+
"use strict";
|
|
6853
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_ChartToolbar_vue_vue_type_style_index_0_id_691b9473_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0b6e");
|
|
6854
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_ChartToolbar_vue_vue_type_style_index_0_id_691b9473_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_ChartToolbar_vue_vue_type_style_index_0_id_691b9473_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
6855
|
+
/* unused harmony reexport * */
|
|
6856
|
+
|
|
6857
|
+
|
|
6818
6858
|
/***/ }),
|
|
6819
6859
|
|
|
6820
6860
|
/***/ "69f3":
|
|
@@ -7200,6 +7240,17 @@ module.exports = function (NAME) {
|
|
|
7200
7240
|
};
|
|
7201
7241
|
|
|
7202
7242
|
|
|
7243
|
+
/***/ }),
|
|
7244
|
+
|
|
7245
|
+
/***/ "74f8":
|
|
7246
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7247
|
+
|
|
7248
|
+
"use strict";
|
|
7249
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_Chart_vue_vue_type_style_index_0_id_0627777b_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("052a");
|
|
7250
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_Chart_vue_vue_type_style_index_0_id_0627777b_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_Chart_vue_vue_type_style_index_0_id_0627777b_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
|
|
7251
|
+
/* unused harmony reexport * */
|
|
7252
|
+
|
|
7253
|
+
|
|
7203
7254
|
/***/ }),
|
|
7204
7255
|
|
|
7205
7256
|
/***/ "76c7":
|
|
@@ -7587,6 +7638,17 @@ module.exports = function (it) {
|
|
|
7587
7638
|
};
|
|
7588
7639
|
|
|
7589
7640
|
|
|
7641
|
+
/***/ }),
|
|
7642
|
+
|
|
7643
|
+
/***/ "8352":
|
|
7644
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7645
|
+
|
|
7646
|
+
"use strict";
|
|
7647
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_ChartGroup_vue_vue_type_style_index_0_id_bd8c6660_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c920");
|
|
7648
|
+
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_ChartGroup_vue_vue_type_style_index_0_id_bd8c6660_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_ChartGroup_vue_vue_type_style_index_0_id_bd8c6660_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
7649
|
+
/* unused harmony reexport * */
|
|
7650
|
+
|
|
7651
|
+
|
|
7590
7652
|
/***/ }),
|
|
7591
7653
|
|
|
7592
7654
|
/***/ "83ab":
|
|
@@ -7909,7 +7971,7 @@ $({ target: 'Number', stat: true }, {
|
|
|
7909
7971
|
/***/ "9224":
|
|
7910
7972
|
/***/ (function(module) {
|
|
7911
7973
|
|
|
7912
|
-
module.exports = JSON.parse("{\"a\":\"3.3.
|
|
7974
|
+
module.exports = JSON.parse("{\"a\":\"3.3.41\"}");
|
|
7913
7975
|
|
|
7914
7976
|
/***/ }),
|
|
7915
7977
|
|
|
@@ -10537,6 +10599,21 @@ module.exports = function (METHOD_NAME) {
|
|
|
10537
10599
|
};
|
|
10538
10600
|
|
|
10539
10601
|
|
|
10602
|
+
/***/ }),
|
|
10603
|
+
|
|
10604
|
+
/***/ "c920":
|
|
10605
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10606
|
+
|
|
10607
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
10608
|
+
|
|
10609
|
+
// load the styles
|
|
10610
|
+
var content = __webpack_require__("08a2");
|
|
10611
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
10612
|
+
if(content.locals) module.exports = content.locals;
|
|
10613
|
+
// add the styles to the DOM
|
|
10614
|
+
var add = __webpack_require__("499e").default
|
|
10615
|
+
var update = add("7946d016", content, true, {"sourceMap":false,"shadowMode":false});
|
|
10616
|
+
|
|
10540
10617
|
/***/ }),
|
|
10541
10618
|
|
|
10542
10619
|
/***/ "c975":
|
|
@@ -10679,6 +10756,20 @@ $({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
|
|
|
10679
10756
|
/* unused harmony reexport * */
|
|
10680
10757
|
|
|
10681
10758
|
|
|
10759
|
+
/***/ }),
|
|
10760
|
+
|
|
10761
|
+
/***/ "cdcc":
|
|
10762
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10763
|
+
|
|
10764
|
+
// Imports
|
|
10765
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
10766
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
10767
|
+
// Module
|
|
10768
|
+
exports.push([module.i, ".ev-chart__toolbar__wrapper[data-v-691b9473]{height:30px;text-align:right;padding-right:30px}.ev-chart__toolbar__wrapper__icon i[data-v-691b9473]{pointer-events:none;opacity:.5;cursor:pointer}.ev-chart__toolbar__wrapper__icon i+i[data-v-691b9473]{margin-left:10px}.ev-chart__toolbar__wrapper__icon .active[data-v-691b9473]{font-weight:700}", ""]);
|
|
10769
|
+
// Exports
|
|
10770
|
+
module.exports = exports;
|
|
10771
|
+
|
|
10772
|
+
|
|
10682
10773
|
/***/ }),
|
|
10683
10774
|
|
|
10684
10775
|
/***/ "cdf9":
|
|
@@ -12229,17 +12320,6 @@ if(content.locals) module.exports = content.locals;
|
|
|
12229
12320
|
var add = __webpack_require__("499e").default
|
|
12230
12321
|
var update = add("235b9c6e", content, true, {"sourceMap":false,"shadowMode":false});
|
|
12231
12322
|
|
|
12232
|
-
/***/ }),
|
|
12233
|
-
|
|
12234
|
-
/***/ "e83f":
|
|
12235
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12236
|
-
|
|
12237
|
-
"use strict";
|
|
12238
|
-
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_Chart_vue_vue_type_style_index_0_id_ca3428ac_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1839");
|
|
12239
|
-
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_Chart_vue_vue_type_style_index_0_id_ca3428ac_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_v16_dist_index_js_ref_0_1_Chart_vue_vue_type_style_index_0_id_ca3428ac_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
|
|
12240
|
-
/* unused harmony reexport * */
|
|
12241
|
-
|
|
12242
|
-
|
|
12243
12323
|
/***/ }),
|
|
12244
12324
|
|
|
12245
12325
|
/***/ "e843":
|
|
@@ -18979,7 +19059,7 @@ Slider.install = function (app) {
|
|
|
18979
19059
|
|
|
18980
19060
|
/* harmony default export */ var components_slider = (Slider);
|
|
18981
19061
|
// EXTERNAL MODULE: ./src/style/lib/icon.css
|
|
18982
|
-
var
|
|
19062
|
+
var lib_icon = __webpack_require__("2d5d");
|
|
18983
19063
|
|
|
18984
19064
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/icon/Icon.vue?vue&type=template&id=5c77b16f
|
|
18985
19065
|
|
|
@@ -30813,18 +30893,27 @@ Grid.install = function (app) {
|
|
|
30813
30893
|
};
|
|
30814
30894
|
|
|
30815
30895
|
/* harmony default export */ var grid = (Grid);
|
|
30816
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/chart/Chart.vue?vue&type=template&id=
|
|
30896
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/chart/Chart.vue?vue&type=template&id=0627777b
|
|
30897
|
+
|
|
30898
|
+
var Chartvue_type_template_id_0627777b_hoisted_1 = {
|
|
30899
|
+
key: 0,
|
|
30900
|
+
ref: "evChartToolbarRef"
|
|
30901
|
+
};
|
|
30902
|
+
function Chartvue_type_template_id_0627777b_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
30903
|
+
var _component_ev_chart_toolbar = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ev-chart-toolbar");
|
|
30817
30904
|
|
|
30818
|
-
function Chartvue_type_template_id_ca3428ac_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
30819
30905
|
var _directive_resize = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("resize");
|
|
30820
30906
|
|
|
30821
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["
|
|
30907
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [$setup.zoomOptions.toolbar.show && !$setup.injectIsChartGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", Chartvue_type_template_id_0627777b_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ev_chart_toolbar, {
|
|
30908
|
+
toolbar: $setup.zoomOptions.toolbar,
|
|
30909
|
+
onOnClickToolbar: $setup.onClickToolbar
|
|
30910
|
+
}, null, 8, ["toolbar", "onOnClickToolbar"])], 512)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", {
|
|
30822
30911
|
ref: "wrapper",
|
|
30823
30912
|
style: $setup.wrapperStyle,
|
|
30824
30913
|
class: "ev-chart"
|
|
30825
|
-
}, null, 4)
|
|
30914
|
+
}, null, 4), [[_directive_resize, $setup.onResize]])], 64);
|
|
30826
30915
|
}
|
|
30827
|
-
// CONCATENATED MODULE: ./src/components/chart/Chart.vue?vue&type=template&id=
|
|
30916
|
+
// CONCATENATED MODULE: ./src/components/chart/Chart.vue?vue&type=template&id=0627777b
|
|
30828
30917
|
|
|
30829
30918
|
// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayEach.js
|
|
30830
30919
|
/**
|
|
@@ -33166,17 +33255,49 @@ var modules = {
|
|
|
33166
33255
|
|
|
33167
33256
|
return findInfo;
|
|
33168
33257
|
},
|
|
33169
|
-
getItem: function getItem(
|
|
33170
|
-
var
|
|
33171
|
-
|
|
33258
|
+
getItem: function getItem(selectedInfo) {
|
|
33259
|
+
var _this6 = this;
|
|
33260
|
+
|
|
33172
33261
|
var useApproximate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
33173
|
-
var
|
|
33262
|
+
var seriesID = selectedInfo.seriesID,
|
|
33263
|
+
dataIndex = selectedInfo.dataIndex;
|
|
33264
|
+
var itemPosition;
|
|
33174
33265
|
|
|
33175
|
-
if (
|
|
33176
|
-
|
|
33266
|
+
if ('seriesID' in selectedInfo) {
|
|
33267
|
+
var dataInfo = this.getDataByValues(seriesID, dataIndex);
|
|
33268
|
+
|
|
33269
|
+
if (!dataInfo || !(dataInfo !== null && dataInfo !== void 0 && dataInfo.xp) || !(dataInfo !== null && dataInfo !== void 0 && dataInfo.yp)) {
|
|
33270
|
+
return null;
|
|
33271
|
+
}
|
|
33272
|
+
|
|
33273
|
+
itemPosition = [this.getItemByPosition([dataInfo.xp, dataInfo.yp], useApproximate)];
|
|
33274
|
+
} else {
|
|
33275
|
+
var seriesList = Object.entries(this.seriesList);
|
|
33276
|
+
var firShowSeriesID;
|
|
33277
|
+
|
|
33278
|
+
for (var i = 0; i < seriesList.length; i++) {
|
|
33279
|
+
var _seriesList$i = _slicedToArray(seriesList[i], 2),
|
|
33280
|
+
id = _seriesList$i[0],
|
|
33281
|
+
info = _seriesList$i[1];
|
|
33282
|
+
|
|
33283
|
+
if (info.show) {
|
|
33284
|
+
firShowSeriesID = id;
|
|
33285
|
+
break;
|
|
33286
|
+
}
|
|
33287
|
+
}
|
|
33288
|
+
|
|
33289
|
+
itemPosition = dataIndex.map(function (idx) {
|
|
33290
|
+
var dataInfo = _this6.getDataByValues(firShowSeriesID, idx);
|
|
33291
|
+
|
|
33292
|
+
if (!dataInfo || !(dataInfo !== null && dataInfo !== void 0 && dataInfo.xp) || !(dataInfo !== null && dataInfo !== void 0 && dataInfo.yp)) {
|
|
33293
|
+
return null;
|
|
33294
|
+
}
|
|
33295
|
+
|
|
33296
|
+
return _this6.getItemByPosition([dataInfo.xp, dataInfo.yp], useApproximate);
|
|
33297
|
+
});
|
|
33177
33298
|
}
|
|
33178
33299
|
|
|
33179
|
-
return
|
|
33300
|
+
return itemPosition;
|
|
33180
33301
|
},
|
|
33181
33302
|
|
|
33182
33303
|
/**
|
|
@@ -33282,7 +33403,7 @@ var modules = {
|
|
|
33282
33403
|
* @returns {object} clicked series id
|
|
33283
33404
|
*/
|
|
33284
33405
|
getSeriesIdByPosition: function getSeriesIdByPosition(offset) {
|
|
33285
|
-
var
|
|
33406
|
+
var _this7 = this;
|
|
33286
33407
|
|
|
33287
33408
|
var _offset = _slicedToArray(offset, 2),
|
|
33288
33409
|
clickedX = _offset[0],
|
|
@@ -33316,8 +33437,8 @@ var modules = {
|
|
|
33316
33437
|
case 'line':
|
|
33317
33438
|
{
|
|
33318
33439
|
var orderedSeriesList = this.seriesInfo.charts.line;
|
|
33319
|
-
var isStackChart = Object.values(this.seriesList).some(function (
|
|
33320
|
-
var stackIndex =
|
|
33440
|
+
var isStackChart = Object.values(this.seriesList).some(function (_ref3) {
|
|
33441
|
+
var stackIndex = _ref3.stackIndex;
|
|
33321
33442
|
return stackIndex;
|
|
33322
33443
|
});
|
|
33323
33444
|
|
|
@@ -33336,16 +33457,16 @@ var modules = {
|
|
|
33336
33457
|
position: (_hitItem$items$sId = hitItem.items[sId]) === null || _hitItem$items$sId === void 0 ? void 0 : (_hitItem$items$sId$da = _hitItem$items$sId.data) === null || _hitItem$items$sId$da === void 0 ? void 0 : _hitItem$items$sId$da.yp
|
|
33337
33458
|
};
|
|
33338
33459
|
});
|
|
33339
|
-
hitSeries = (_positionList$find = positionList.find(function (
|
|
33340
|
-
var position =
|
|
33460
|
+
hitSeries = (_positionList$find = positionList.find(function (_ref4) {
|
|
33461
|
+
var position = _ref4.position;
|
|
33341
33462
|
return clickedY > position;
|
|
33342
33463
|
})) === null || _positionList$find === void 0 ? void 0 : _positionList$find.sId;
|
|
33343
33464
|
} else {
|
|
33344
33465
|
var _Object$entries$find;
|
|
33345
33466
|
|
|
33346
|
-
hitSeries = (_Object$entries$find = Object.entries(hitItem.items).find(function (
|
|
33347
|
-
var
|
|
33348
|
-
hit =
|
|
33467
|
+
hitSeries = (_Object$entries$find = Object.entries(hitItem.items).find(function (_ref5) {
|
|
33468
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
33469
|
+
hit = _ref6[1].hit;
|
|
33349
33470
|
|
|
33350
33471
|
return hit;
|
|
33351
33472
|
})) === null || _Object$entries$find === void 0 ? void 0 : _Object$entries$find[0];
|
|
@@ -33355,29 +33476,29 @@ var modules = {
|
|
|
33355
33476
|
|
|
33356
33477
|
// 클릭한 위치에 data 가 존재하지 않는 경우
|
|
33357
33478
|
var visibleSeriesList = orderedSeriesList.filter(function (sId) {
|
|
33358
|
-
return
|
|
33479
|
+
return _this7.seriesList[sId].show;
|
|
33359
33480
|
});
|
|
33360
33481
|
positionList = visibleSeriesList.map(function (sId) {
|
|
33361
|
-
var
|
|
33482
|
+
var _this7$seriesList$sId;
|
|
33362
33483
|
|
|
33363
33484
|
return {
|
|
33364
33485
|
sId: sId,
|
|
33365
|
-
position: (
|
|
33366
|
-
var xp =
|
|
33367
|
-
yp =
|
|
33486
|
+
position: (_this7$seriesList$sId = _this7.seriesList[sId].data) === null || _this7$seriesList$sId === void 0 ? void 0 : _this7$seriesList$sId.map(function (_ref7) {
|
|
33487
|
+
var xp = _ref7.xp,
|
|
33488
|
+
yp = _ref7.yp;
|
|
33368
33489
|
return [xp, yp];
|
|
33369
33490
|
})
|
|
33370
33491
|
};
|
|
33371
33492
|
});
|
|
33372
|
-
var dataIndex = (_positionList$0$posit = positionList[0].position) === null || _positionList$0$posit === void 0 ? void 0 : _positionList$0$posit.findIndex(function (
|
|
33373
|
-
var
|
|
33374
|
-
xp =
|
|
33493
|
+
var dataIndex = (_positionList$0$posit = positionList[0].position) === null || _positionList$0$posit === void 0 ? void 0 : _positionList$0$posit.findIndex(function (_ref8) {
|
|
33494
|
+
var _ref9 = _slicedToArray(_ref8, 1),
|
|
33495
|
+
xp = _ref9[0];
|
|
33375
33496
|
|
|
33376
33497
|
return xp >= clickedX;
|
|
33377
33498
|
});
|
|
33378
|
-
var vectorList = positionList.map(function (
|
|
33379
|
-
var sId =
|
|
33380
|
-
position =
|
|
33499
|
+
var vectorList = positionList.map(function (_ref10) {
|
|
33500
|
+
var sId = _ref10.sId,
|
|
33501
|
+
position = _ref10.position;
|
|
33381
33502
|
return {
|
|
33382
33503
|
sId: sId,
|
|
33383
33504
|
vector: {
|
|
@@ -33395,8 +33516,8 @@ var modules = {
|
|
|
33395
33516
|
if (isStackChart) {
|
|
33396
33517
|
var _vectorList$find;
|
|
33397
33518
|
|
|
33398
|
-
hitSeries = (_vectorList$find = vectorList.find(function (
|
|
33399
|
-
var vector =
|
|
33519
|
+
hitSeries = (_vectorList$find = vectorList.find(function (_ref11) {
|
|
33520
|
+
var vector = _ref11.vector;
|
|
33400
33521
|
|
|
33401
33522
|
if (isEmptyVector(vector === null || vector === void 0 ? void 0 : vector.start) && isEmptyVector(vector === null || vector === void 0 ? void 0 : vector.end)) {
|
|
33402
33523
|
return false;
|
|
@@ -33422,8 +33543,8 @@ var modules = {
|
|
|
33422
33543
|
} else {
|
|
33423
33544
|
var _vectorList$find2;
|
|
33424
33545
|
|
|
33425
|
-
hitSeries = (_vectorList$find2 = vectorList.find(function (
|
|
33426
|
-
var vector =
|
|
33546
|
+
hitSeries = (_vectorList$find2 = vectorList.find(function (_ref12) {
|
|
33547
|
+
var vector = _ref12.vector;
|
|
33427
33548
|
|
|
33428
33549
|
if (isEmptyVector(vector === null || vector === void 0 ? void 0 : vector.start) && isEmptyVector(vector === null || vector === void 0 ? void 0 : vector.end)) {
|
|
33429
33550
|
return false;
|
|
@@ -33506,7 +33627,7 @@ var modules = {
|
|
|
33506
33627
|
* @returns {object} min/max info for all of data
|
|
33507
33628
|
*/
|
|
33508
33629
|
getStoreMinMax: function getStoreMinMax() {
|
|
33509
|
-
var
|
|
33630
|
+
var _this8 = this;
|
|
33510
33631
|
|
|
33511
33632
|
var keys = Object.keys(this.seriesList);
|
|
33512
33633
|
var isHorizontal = this.options.horizontal;
|
|
@@ -33524,7 +33645,7 @@ var modules = {
|
|
|
33524
33645
|
if (keys.length) {
|
|
33525
33646
|
return keys.reduce(function (acc, key) {
|
|
33526
33647
|
var minmax = acc;
|
|
33527
|
-
var series =
|
|
33648
|
+
var series = _this8.seriesList[key];
|
|
33528
33649
|
var smm = series.minMax;
|
|
33529
33650
|
var axisX = series.xAxisIndex;
|
|
33530
33651
|
var axisY = series.yAxisIndex;
|
|
@@ -35014,7 +35135,8 @@ var element_line_Line = /*#__PURE__*/function () {
|
|
|
35014
35135
|
axesSteps = param.axesSteps,
|
|
35015
35136
|
selectLabel = param.selectLabel,
|
|
35016
35137
|
selectSeries = param.selectSeries,
|
|
35017
|
-
legendHitInfo = param.legendHitInfo
|
|
35138
|
+
legendHitInfo = param.legendHitInfo,
|
|
35139
|
+
isBrush = param.isBrush; // about selectLabel
|
|
35018
35140
|
|
|
35019
35141
|
var selectLabelOption = selectLabel === null || selectLabel === void 0 ? void 0 : selectLabel.option;
|
|
35020
35142
|
var useSelectLabel = (selectLabelOption === null || selectLabelOption === void 0 ? void 0 : selectLabelOption.use) && (selectLabelOption === null || selectLabelOption === void 0 ? void 0 : selectLabelOption.useSeriesOpacity);
|
|
@@ -35150,7 +35272,7 @@ var element_line_Line = /*#__PURE__*/function () {
|
|
|
35150
35272
|
} // Draw points
|
|
35151
35273
|
|
|
35152
35274
|
|
|
35153
|
-
if (this.point || useSelectLabel) {
|
|
35275
|
+
if (!isBrush && (this.point || useSelectLabel)) {
|
|
35154
35276
|
ctx.strokeStyle = helpers_util.colorStringToRgba(mainColor, mainColorOpacity);
|
|
35155
35277
|
var focusStyle = helpers_util.colorStringToRgba(pointFillColor, 1);
|
|
35156
35278
|
var blurStyle = helpers_util.colorStringToRgba(pointFillColor, pointFillColorOpacity);
|
|
@@ -35386,6 +35508,8 @@ var merge = _createAssigner(function(object, source, srcIndex) {
|
|
|
35386
35508
|
|
|
35387
35509
|
|
|
35388
35510
|
|
|
35511
|
+
|
|
35512
|
+
|
|
35389
35513
|
var element_scatter_Scatter = /*#__PURE__*/function () {
|
|
35390
35514
|
function Scatter(sId, opt, sIdx) {
|
|
35391
35515
|
var _this = this;
|
|
@@ -35431,6 +35555,7 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
|
|
|
35431
35555
|
var chartRect = param.chartRect;
|
|
35432
35556
|
var labelOffset = param.labelOffset;
|
|
35433
35557
|
var axesSteps = param.axesSteps;
|
|
35558
|
+
var displayOverflow = param.displayOverflow;
|
|
35434
35559
|
var x;
|
|
35435
35560
|
var y;
|
|
35436
35561
|
var aliasPixel;
|
|
@@ -35440,6 +35565,15 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
|
|
|
35440
35565
|
var yArea = chartRect.chartHeight - (labelOffset.top + labelOffset.bottom);
|
|
35441
35566
|
var xsp = chartRect.x1 + labelOffset.left;
|
|
35442
35567
|
var ysp = chartRect.y2 - labelOffset.bottom;
|
|
35568
|
+
|
|
35569
|
+
if (displayOverflow) {
|
|
35570
|
+
this.data = this.data.map(function (val) {
|
|
35571
|
+
return _objectSpread2(_objectSpread2({}, val), {}, {
|
|
35572
|
+
y: val.y > minmaxY.graphMax ? minmaxY.graphMax : val.y
|
|
35573
|
+
});
|
|
35574
|
+
});
|
|
35575
|
+
}
|
|
35576
|
+
|
|
35443
35577
|
this.data.forEach(function (item) {
|
|
35444
35578
|
x = helpers_canvas.calculateX(item.x, minmaxX.graphMin, minmaxX.graphMax, xArea, xsp);
|
|
35445
35579
|
y = helpers_canvas.calculateY(item.y, minmaxY.graphMin, minmaxY.graphMax, yArea, ysp);
|
|
@@ -37763,10 +37897,13 @@ var scale_Scale = /*#__PURE__*/function () {
|
|
|
37763
37897
|
var labelPoint = void 0;
|
|
37764
37898
|
|
|
37765
37899
|
if (this.type === 'x') {
|
|
37766
|
-
var _options$selectItem, _this$options3;
|
|
37900
|
+
var _options$brush, _options$selectItem, _this$options3;
|
|
37767
37901
|
|
|
37768
37902
|
labelPoint = this.position === 'top' ? offsetPoint - 10 : offsetPoint + 10;
|
|
37769
|
-
|
|
37903
|
+
|
|
37904
|
+
if (options !== null && options !== void 0 && (_options$brush = options.brush) !== null && _options$brush !== void 0 && _options$brush.showLabel || !options.brush) {
|
|
37905
|
+
ctx.fillText(labelText, labelCenter, labelPoint);
|
|
37906
|
+
}
|
|
37770
37907
|
|
|
37771
37908
|
if (!isBlurredLabel && options !== null && options !== void 0 && (_options$selectItem = options.selectItem) !== null && _options$selectItem !== void 0 && _options$selectItem.showLabelTip && hitInfo !== null && hitInfo !== void 0 && hitInfo.label && !((_this$options3 = this.options) !== null && _this$options3 !== void 0 && _this$options3.horizontal)) {
|
|
37772
37909
|
var selectedLabel = this.getLabelFormat(Math.min(axisMax, hitInfo.label + 0 * stepValue));
|
|
@@ -37795,11 +37932,16 @@ var scale_Scale = /*#__PURE__*/function () {
|
|
|
37795
37932
|
ctx.lineTo(linePosition, offsetCounterPoint);
|
|
37796
37933
|
}
|
|
37797
37934
|
} else {
|
|
37935
|
+
var _options$brush2;
|
|
37936
|
+
|
|
37798
37937
|
labelPoint = this.position === 'left' ? offsetPoint - 10 : offsetPoint + 10;
|
|
37799
|
-
|
|
37938
|
+
|
|
37939
|
+
if (options !== null && options !== void 0 && (_options$brush2 = options.brush) !== null && _options$brush2 !== void 0 && _options$brush2.showLabel || !options.brush) {
|
|
37940
|
+
ctx.fillText(labelText, labelPoint, labelCenter);
|
|
37941
|
+
}
|
|
37800
37942
|
|
|
37801
37943
|
if (ix === steps) {
|
|
37802
|
-
linePosition
|
|
37944
|
+
linePosition -= 1;
|
|
37803
37945
|
}
|
|
37804
37946
|
|
|
37805
37947
|
if (ix !== 0 && this.showGrid) {
|
|
@@ -39322,19 +39464,11 @@ var plugins_title_modules = {
|
|
|
39322
39464
|
* @returns {undefined}
|
|
39323
39465
|
*/
|
|
39324
39466
|
initTitle: function initTitle() {
|
|
39325
|
-
var _this = this;
|
|
39326
|
-
|
|
39327
39467
|
if (!this.isInitTitle) {
|
|
39328
39468
|
this.createTitle();
|
|
39329
39469
|
}
|
|
39330
39470
|
|
|
39331
|
-
|
|
39332
|
-
Object.keys(opt.style).forEach(function (key) {
|
|
39333
|
-
_this.titleDOM.style[key] = opt.style[key];
|
|
39334
|
-
});
|
|
39335
|
-
this.titleDOM.textContent = opt.text;
|
|
39336
|
-
this.titleDOM.style.height = "".concat(opt.height, "px");
|
|
39337
|
-
this.titleDOM.style.lineHeight = "".concat(opt.height, "px");
|
|
39471
|
+
this.updateTitle();
|
|
39338
39472
|
this.isInitTitle = true;
|
|
39339
39473
|
},
|
|
39340
39474
|
|
|
@@ -39356,6 +39490,17 @@ var plugins_title_modules = {
|
|
|
39356
39490
|
hideTitle: function hideTitle() {
|
|
39357
39491
|
this.titleDOM.style.display = 'none';
|
|
39358
39492
|
this.wrapperDOM.style.paddingTop = '0px';
|
|
39493
|
+
},
|
|
39494
|
+
updateTitle: function updateTitle() {
|
|
39495
|
+
var _this = this;
|
|
39496
|
+
|
|
39497
|
+
var opt = this.options.title;
|
|
39498
|
+
Object.keys(opt.style).forEach(function (key) {
|
|
39499
|
+
_this.titleDOM.style[key] = opt.style[key];
|
|
39500
|
+
});
|
|
39501
|
+
this.titleDOM.textContent = opt.text;
|
|
39502
|
+
this.titleDOM.style.height = "".concat(opt.height, "px");
|
|
39503
|
+
this.titleDOM.style.lineHeight = "".concat(opt.height, "px");
|
|
39359
39504
|
}
|
|
39360
39505
|
};
|
|
39361
39506
|
/* harmony default export */ var plugins_title = (plugins_title_modules);
|
|
@@ -39570,7 +39715,8 @@ var plugins_legend_modules = {
|
|
|
39570
39715
|
_this3.addLegend({
|
|
39571
39716
|
cId: colorItem.id,
|
|
39572
39717
|
color: colorItem.color,
|
|
39573
|
-
name: name
|
|
39718
|
+
name: name,
|
|
39719
|
+
show: true
|
|
39574
39720
|
});
|
|
39575
39721
|
}
|
|
39576
39722
|
}
|
|
@@ -39629,6 +39775,7 @@ var plugins_legend_modules = {
|
|
|
39629
39775
|
|
|
39630
39776
|
this.onLegendBoxClick = function (e) {
|
|
39631
39777
|
var opt = _this4.options.legend;
|
|
39778
|
+
var chartIdx = _this4.data.chartIdx;
|
|
39632
39779
|
|
|
39633
39780
|
var targetDOM = _this4.getContainerDOM(e);
|
|
39634
39781
|
|
|
@@ -39689,6 +39836,14 @@ var plugins_legend_modules = {
|
|
|
39689
39836
|
series.show = !series.show;
|
|
39690
39837
|
targetDOM.classList.toggle('inactive');
|
|
39691
39838
|
|
|
39839
|
+
if (_this4.brushSeries) {
|
|
39840
|
+
var seriesList = _toConsumableArray(_this4.brushSeries.list);
|
|
39841
|
+
|
|
39842
|
+
seriesList[chartIdx] = _this4.seriesList;
|
|
39843
|
+
_this4.brushSeries.list = seriesList;
|
|
39844
|
+
_this4.brushSeries.chartIdx = chartIdx;
|
|
39845
|
+
}
|
|
39846
|
+
|
|
39692
39847
|
_this4.update({
|
|
39693
39848
|
updateSeries: false,
|
|
39694
39849
|
updateSelTip: {
|
|
@@ -41407,6 +41562,11 @@ var plugins_interaction_modules = {
|
|
|
41407
41562
|
|
|
41408
41563
|
|
|
41409
41564
|
this.onClick = function (e) {
|
|
41565
|
+
if (_this.isMouseMove) {
|
|
41566
|
+
_this.isMouseMove = false;
|
|
41567
|
+
return;
|
|
41568
|
+
}
|
|
41569
|
+
|
|
41410
41570
|
var args = {
|
|
41411
41571
|
e: e
|
|
41412
41572
|
};
|
|
@@ -41560,6 +41720,7 @@ var plugins_interaction_modules = {
|
|
|
41560
41720
|
var xep;
|
|
41561
41721
|
var yep;
|
|
41562
41722
|
dragInfo.isMove = true;
|
|
41723
|
+
_this2.isMouseMove = true;
|
|
41563
41724
|
|
|
41564
41725
|
if (aOffsetX < aRange.x1) {
|
|
41565
41726
|
xep = aRange.x1;
|
|
@@ -41618,6 +41779,8 @@ var plugins_interaction_modules = {
|
|
|
41618
41779
|
var dragInfo = _this2.dragInfo;
|
|
41619
41780
|
|
|
41620
41781
|
if (dragInfo !== null && dragInfo !== void 0 && dragInfo.isMove && (dragInfo === null || dragInfo === void 0 ? void 0 : dragInfo.width) > 1 && (dragInfo === null || dragInfo === void 0 ? void 0 : dragInfo.height) > 1) {
|
|
41782
|
+
var _this2$options, _this2$options$zoom;
|
|
41783
|
+
|
|
41621
41784
|
var args = {
|
|
41622
41785
|
e: e,
|
|
41623
41786
|
data: _this2.findSelectedItems(dragInfo),
|
|
@@ -41625,13 +41788,28 @@ var plugins_interaction_modules = {
|
|
|
41625
41788
|
};
|
|
41626
41789
|
_this2.dragInfoBackup = lodash_es_defaultsDeep({}, dragInfo);
|
|
41627
41790
|
|
|
41628
|
-
if (typeof _this2.listeners['drag-select'] === 'function') {
|
|
41791
|
+
if (typeof _this2.listeners['drag-select'] === 'function' && !((_this2$options = _this2.options) !== null && _this2$options !== void 0 && (_this2$options$zoom = _this2$options.zoom) !== null && _this2$options$zoom !== void 0 && _this2$options$zoom.use)) {
|
|
41629
41792
|
_this2.listeners['drag-select'](args);
|
|
41793
|
+
} else {
|
|
41794
|
+
var xsp = dragInfo.xsp,
|
|
41795
|
+
chartRange = dragInfo.range,
|
|
41796
|
+
dragWidth = dragInfo.width;
|
|
41797
|
+
var dragXsp = xsp - chartRange.x1;
|
|
41798
|
+
args.range.dragSelectionInfo = {
|
|
41799
|
+
dragXsp: dragXsp,
|
|
41800
|
+
dragXep: dragXsp + dragWidth,
|
|
41801
|
+
exceptAxesYChartWidth: chartRange.x2 - chartRange.x1,
|
|
41802
|
+
exceptAxesXChartHeight: chartRange.y2 - chartRange.y1,
|
|
41803
|
+
chartRange: chartRange,
|
|
41804
|
+
chartTitle: _this2.options.title.text
|
|
41805
|
+
};
|
|
41806
|
+
|
|
41807
|
+
_this2.options.zoom.getRangeInfo(args);
|
|
41630
41808
|
}
|
|
41631
|
-
}
|
|
41632
41809
|
|
|
41633
|
-
|
|
41634
|
-
|
|
41810
|
+
if (!_this2.options.dragSelection.keepDisplay) {
|
|
41811
|
+
_this2.removeSelectionArea();
|
|
41812
|
+
}
|
|
41635
41813
|
}
|
|
41636
41814
|
|
|
41637
41815
|
_this2.dragInfo = null;
|
|
@@ -43154,6 +43332,8 @@ var element_tip_modules = {
|
|
|
43154
43332
|
* @returns {undefined}
|
|
43155
43333
|
*/
|
|
43156
43334
|
drawTips: function drawTips(tipLocationInfo) {
|
|
43335
|
+
var _this = this;
|
|
43336
|
+
|
|
43157
43337
|
var opt = this.options;
|
|
43158
43338
|
var isHorizontal = !!opt.horizontal;
|
|
43159
43339
|
var maxTipOpt = opt.maxTip;
|
|
@@ -43162,75 +43342,83 @@ var element_tip_modules = {
|
|
|
43162
43342
|
var maxArgs;
|
|
43163
43343
|
var isExistSelectedLabel;
|
|
43164
43344
|
|
|
43165
|
-
|
|
43166
|
-
|
|
43167
|
-
|
|
43345
|
+
var executeDrawTip = function executeDrawTip(tipOpt) {
|
|
43346
|
+
tipLocationInfo.forEach(function (tipInfo) {
|
|
43347
|
+
if (tipInfo && !isExistSelectedLabel) {
|
|
43348
|
+
var seriesInfo = _this.seriesList[tipInfo === null || tipInfo === void 0 ? void 0 : tipInfo.sId];
|
|
43168
43349
|
|
|
43169
|
-
|
|
43170
|
-
|
|
43350
|
+
if (!(seriesInfo !== null && seriesInfo !== void 0 && seriesInfo.show)) {
|
|
43351
|
+
return;
|
|
43352
|
+
}
|
|
43171
43353
|
|
|
43172
|
-
|
|
43173
|
-
return;
|
|
43174
|
-
}
|
|
43354
|
+
var selArgs = _this.calculateTipInfo(seriesInfo, 'sel', tipInfo);
|
|
43175
43355
|
|
|
43176
|
-
|
|
43356
|
+
if (selArgs) {
|
|
43357
|
+
var _maxArgs;
|
|
43177
43358
|
|
|
43178
|
-
|
|
43179
|
-
var _maxArgs;
|
|
43359
|
+
var isSamePos = false;
|
|
43180
43360
|
|
|
43181
|
-
|
|
43361
|
+
if (maxTipOpt.use && ((_maxArgs = maxArgs) === null || _maxArgs === void 0 ? void 0 : _maxArgs.dp) === selArgs.dp) {
|
|
43362
|
+
isSamePos = true;
|
|
43363
|
+
}
|
|
43182
43364
|
|
|
43183
|
-
|
|
43184
|
-
|
|
43185
|
-
|
|
43365
|
+
if (tipOpt.showTextTip || tipOpt.showTip) {
|
|
43366
|
+
if (tipOpt.tipText === 'label') {
|
|
43367
|
+
var axisOpt = isHorizontal ? opt.axesY[0] : opt.axesX[0];
|
|
43368
|
+
var label = selArgs.label;
|
|
43369
|
+
selArgs.text = axisOpt.type === 'time' ? dayjs_min_default()(label).format(axisOpt.timeFormat) : label;
|
|
43370
|
+
} else {
|
|
43371
|
+
selArgs.text = numberWithComma(selArgs.value);
|
|
43372
|
+
}
|
|
43186
43373
|
|
|
43187
|
-
|
|
43188
|
-
|
|
43189
|
-
|
|
43190
|
-
|
|
43191
|
-
|
|
43192
|
-
|
|
43193
|
-
|
|
43194
|
-
}
|
|
43374
|
+
_this.drawTextTip(_objectSpread2({
|
|
43375
|
+
opt: tipOpt,
|
|
43376
|
+
tipType: 'sel',
|
|
43377
|
+
seriesOpt: seriesInfo,
|
|
43378
|
+
isSamePos: isSamePos
|
|
43379
|
+
}, selArgs));
|
|
43380
|
+
}
|
|
43195
43381
|
|
|
43196
|
-
|
|
43197
|
-
|
|
43198
|
-
|
|
43199
|
-
|
|
43200
|
-
|
|
43201
|
-
|
|
43202
|
-
|
|
43382
|
+
if (tipOpt.showIndicator) {
|
|
43383
|
+
_this.drawFixedIndicator(_objectSpread2({
|
|
43384
|
+
opt: tipOpt,
|
|
43385
|
+
seriesOpt: seriesInfo
|
|
43386
|
+
}, selArgs));
|
|
43387
|
+
}
|
|
43388
|
+
}
|
|
43203
43389
|
|
|
43204
|
-
|
|
43205
|
-
|
|
43206
|
-
|
|
43207
|
-
seriesOpt: seriesInfo
|
|
43208
|
-
}, selArgs));
|
|
43390
|
+
if (tipInfo && tipInfo !== null && tipInfo !== void 0 && tipInfo.label && (tipInfo === null || tipInfo === void 0 ? void 0 : tipInfo.label) === 0) {
|
|
43391
|
+
_this.lastHitInfo = tipInfo;
|
|
43392
|
+
}
|
|
43209
43393
|
}
|
|
43210
|
-
}
|
|
43394
|
+
});
|
|
43395
|
+
};
|
|
43211
43396
|
|
|
43212
|
-
|
|
43213
|
-
|
|
43397
|
+
if (tipLocationInfo) {
|
|
43398
|
+
if (selTipOpt.use) {
|
|
43399
|
+
executeDrawTip(selTipOpt);
|
|
43400
|
+
} else if (labelTipOpt.use) {
|
|
43401
|
+
executeDrawTip(labelTipOpt);
|
|
43214
43402
|
}
|
|
43215
43403
|
}
|
|
43216
43404
|
|
|
43217
43405
|
if (maxTipOpt.use && !isExistSelectedLabel) {
|
|
43218
43406
|
var maxSID = this.minMax[isHorizontal ? 'x' : 'y'][0].maxSID;
|
|
43219
|
-
var
|
|
43220
|
-
maxArgs = this.calculateTipInfo(
|
|
43407
|
+
var seriesInfo = this.seriesList[maxSID];
|
|
43408
|
+
maxArgs = this.calculateTipInfo(seriesInfo, 'max', null);
|
|
43221
43409
|
|
|
43222
43410
|
if (maxTipOpt.use && maxArgs) {
|
|
43223
43411
|
maxArgs.text = numberWithComma(maxArgs.value);
|
|
43224
43412
|
this.drawTextTip(_objectSpread2({
|
|
43225
43413
|
opt: maxTipOpt,
|
|
43226
43414
|
tipType: 'max',
|
|
43227
|
-
seriesOpt:
|
|
43415
|
+
seriesOpt: seriesInfo
|
|
43228
43416
|
}, maxArgs));
|
|
43229
43417
|
|
|
43230
43418
|
if (maxTipOpt.showIndicator) {
|
|
43231
43419
|
this.drawFixedIndicator(_objectSpread2({
|
|
43232
43420
|
opt: maxTipOpt,
|
|
43233
|
-
seriesOpt:
|
|
43421
|
+
seriesOpt: seriesInfo
|
|
43234
43422
|
}, maxArgs));
|
|
43235
43423
|
}
|
|
43236
43424
|
}
|
|
@@ -43414,7 +43602,7 @@ var element_tip_modules = {
|
|
|
43414
43602
|
* @returns {boolean} Whether drew at least one tip
|
|
43415
43603
|
*/
|
|
43416
43604
|
drawLabelTip: function drawLabelTip() {
|
|
43417
|
-
var
|
|
43605
|
+
var _this2 = this;
|
|
43418
43606
|
|
|
43419
43607
|
var opt = this.options;
|
|
43420
43608
|
var isHorizontal = !!opt.horizontal;
|
|
@@ -43450,10 +43638,10 @@ var element_tip_modules = {
|
|
|
43450
43638
|
offset *= isHorizontal ? 1 : -1;
|
|
43451
43639
|
var seriesList = Object.keys((_this$seriesList = this.seriesList) !== null && _this$seriesList !== void 0 ? _this$seriesList : {});
|
|
43452
43640
|
var visibleSeries = seriesList.filter(function (sId) {
|
|
43453
|
-
return
|
|
43641
|
+
return _this2.seriesList[sId].show;
|
|
43454
43642
|
});
|
|
43455
43643
|
var isExistGrp = seriesList.some(function (sId) {
|
|
43456
|
-
return
|
|
43644
|
+
return _this2.seriesList[sId].isExistGrp;
|
|
43457
43645
|
});
|
|
43458
43646
|
var groups = (_this$data$groups$ = (_this$data$groups = this.data.groups) === null || _this$data$groups === void 0 ? void 0 : _this$data$groups[0]) !== null && _this$data$groups$ !== void 0 ? _this$data$groups$ : [];
|
|
43459
43647
|
var gp;
|
|
@@ -43473,9 +43661,9 @@ var element_tip_modules = {
|
|
|
43473
43661
|
} else {
|
|
43474
43662
|
graphX = this.axesSteps.x[0];
|
|
43475
43663
|
lineSeries = seriesList.find(function (sId) {
|
|
43476
|
-
var
|
|
43664
|
+
var _this2$seriesList$sId;
|
|
43477
43665
|
|
|
43478
|
-
return ((
|
|
43666
|
+
return ((_this2$seriesList$sId = _this2.seriesList[sId]) === null || _this2$seriesList$sId === void 0 ? void 0 : _this2$seriesList$sId.type) === 'line';
|
|
43479
43667
|
});
|
|
43480
43668
|
sizeObj = this.seriesList[lineSeries].size;
|
|
43481
43669
|
}
|
|
@@ -43518,8 +43706,8 @@ var element_tip_modules = {
|
|
|
43518
43706
|
gp = valuePositionCalcFunction(value, valueAxesRange.min, valueAxesRange.max, valueSpace, valueStartPoint);
|
|
43519
43707
|
gp += offset;
|
|
43520
43708
|
|
|
43521
|
-
|
|
43522
|
-
context:
|
|
43709
|
+
_this2.showTip({
|
|
43710
|
+
context: _this2.bufferCtx,
|
|
43523
43711
|
x: isHorizontal ? gp : dp,
|
|
43524
43712
|
y: isHorizontal ? dp : gp,
|
|
43525
43713
|
opt: labelTipOpt,
|
|
@@ -43771,7 +43959,7 @@ var element_tip_modules = {
|
|
|
43771
43959
|
|
|
43772
43960
|
|
|
43773
43961
|
var chart_core_EvChart = /*#__PURE__*/function () {
|
|
43774
|
-
function EvChart(target, data, options, listeners, defaultSelectItemInfo, defaultSelectInfo) {
|
|
43962
|
+
function EvChart(target, data, options, listeners, defaultSelectItemInfo, defaultSelectInfo, brushSeries) {
|
|
43775
43963
|
var _this = this;
|
|
43776
43964
|
|
|
43777
43965
|
_classCallCheck(this, EvChart);
|
|
@@ -43779,25 +43967,29 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43779
43967
|
Object.keys(model).forEach(function (key) {
|
|
43780
43968
|
return Object.assign(_this, model[key]);
|
|
43781
43969
|
});
|
|
43782
|
-
|
|
43783
|
-
|
|
43784
|
-
|
|
43785
|
-
|
|
43786
|
-
|
|
43787
|
-
|
|
43970
|
+
|
|
43971
|
+
if (!options.brush) {
|
|
43972
|
+
Object.assign(this, plugins_tooltip);
|
|
43973
|
+
Object.assign(this, plugins_interaction);
|
|
43974
|
+
Object.assign(this, element_tip);
|
|
43975
|
+
Object.assign(this, plugins_legend);
|
|
43976
|
+
Object.assign(this, plugins_pie);
|
|
43977
|
+
Object.assign(this, plugins_title);
|
|
43978
|
+
}
|
|
43788
43979
|
|
|
43789
43980
|
if (options.type === 'heatMap' && options.legend.type === 'gradient') {
|
|
43790
43981
|
Object.assign(this, plugins_legend_gradient);
|
|
43791
43982
|
}
|
|
43792
43983
|
|
|
43984
|
+
this.brushSeries = brushSeries;
|
|
43793
43985
|
this.target = target;
|
|
43794
43986
|
this.data = data;
|
|
43795
43987
|
this.options = options;
|
|
43796
43988
|
this.listeners = listeners;
|
|
43797
43989
|
this.wrapperDOM = document.createElement('div');
|
|
43798
|
-
this.wrapperDOM.className = 'ev-chart-wrapper';
|
|
43990
|
+
this.wrapperDOM.className = options.brush ? 'ev-chart-brush-wrapper' : 'ev-chart-wrapper';
|
|
43799
43991
|
this.chartDOM = document.createElement('div');
|
|
43800
|
-
this.chartDOM.className = 'ev-chart-container';
|
|
43992
|
+
this.chartDOM.className = options.brush ? 'ev-chart-brush-container' : 'ev-chart-container';
|
|
43801
43993
|
this.wrapperDOM.appendChild(this.chartDOM);
|
|
43802
43994
|
this.target.appendChild(this.wrapperDOM);
|
|
43803
43995
|
this.displayCanvas = document.createElement('canvas');
|
|
@@ -43806,16 +43998,21 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43806
43998
|
this.bufferCanvas = document.createElement('canvas');
|
|
43807
43999
|
this.bufferCanvas.setAttribute('style', 'display: block;');
|
|
43808
44000
|
this.bufferCtx = this.bufferCanvas.getContext('2d');
|
|
43809
|
-
this.overlayCanvas = document.createElement('canvas');
|
|
43810
|
-
this.overlayCanvas.setAttribute('style', 'display: block;');
|
|
43811
|
-
this.overlayCtx = this.overlayCanvas.getContext('2d');
|
|
43812
44001
|
this.pixelRatio = window.devicePixelRatio || 1;
|
|
43813
44002
|
this.oldPixelRatio = this.pixelRatio;
|
|
43814
44003
|
this.chartDOM.appendChild(this.displayCanvas);
|
|
43815
|
-
|
|
43816
|
-
|
|
43817
|
-
|
|
43818
|
-
|
|
44004
|
+
|
|
44005
|
+
if (!options.brush) {
|
|
44006
|
+
this.overlayCanvas = document.createElement('canvas');
|
|
44007
|
+
this.overlayCanvas.setAttribute('style', 'display: block; z-index: 2;');
|
|
44008
|
+
this.overlayCanvas.setAttribute('class', 'overlay-canvas');
|
|
44009
|
+
this.overlayCtx = this.overlayCanvas.getContext('2d');
|
|
44010
|
+
this.chartDOM.appendChild(this.overlayCanvas);
|
|
44011
|
+
this.overlayCanvas.style.position = 'absolute';
|
|
44012
|
+
this.overlayCanvas.style.top = '0px';
|
|
44013
|
+
this.overlayCanvas.style.left = '0px';
|
|
44014
|
+
}
|
|
44015
|
+
|
|
43819
44016
|
this.isInitLegend = false;
|
|
43820
44017
|
this.isInitTitle = false;
|
|
43821
44018
|
this.isInit = false;
|
|
@@ -43847,6 +44044,8 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43847
44044
|
_createClass(EvChart, [{
|
|
43848
44045
|
key: "init",
|
|
43849
44046
|
value: function init() {
|
|
44047
|
+
var _this$initSelectedInf, _this$createEventFunc;
|
|
44048
|
+
|
|
43850
44049
|
var _this$data = this.data,
|
|
43851
44050
|
series = _this$data.series,
|
|
43852
44051
|
data = _this$data.data,
|
|
@@ -43871,7 +44070,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43871
44070
|
this.axesY = this.createAxes('y', axesY);
|
|
43872
44071
|
this.axesRange = this.getAxesRange();
|
|
43873
44072
|
this.labelOffset = this.getLabelOffset();
|
|
43874
|
-
this.initSelectedInfo();
|
|
44073
|
+
(_this$initSelectedInf = this.initSelectedInfo) === null || _this$initSelectedInf === void 0 ? void 0 : _this$initSelectedInf.call(this);
|
|
43875
44074
|
this.drawChart();
|
|
43876
44075
|
|
|
43877
44076
|
if (tooltip.use) {
|
|
@@ -43882,7 +44081,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43882
44081
|
}
|
|
43883
44082
|
}
|
|
43884
44083
|
|
|
43885
|
-
this.createEventFunctions();
|
|
44084
|
+
(_this$createEventFunc = this.createEventFunctions) === null || _this$createEventFunc === void 0 ? void 0 : _this$createEventFunc.call(this);
|
|
43886
44085
|
this.isInit = true;
|
|
43887
44086
|
}
|
|
43888
44087
|
/**
|
|
@@ -43951,7 +44150,9 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43951
44150
|
maxTip = _this$options2.maxTip,
|
|
43952
44151
|
selectLabel = _this$options2.selectLabel,
|
|
43953
44152
|
selectItem = _this$options2.selectItem,
|
|
43954
|
-
selectSeries = _this$options2.selectSeries
|
|
44153
|
+
selectSeries = _this$options2.selectSeries,
|
|
44154
|
+
brush = _this$options2.brush,
|
|
44155
|
+
displayOverflow = _this$options2.displayOverflow;
|
|
43955
44156
|
var opt = {
|
|
43956
44157
|
ctx: this.bufferCtx,
|
|
43957
44158
|
chartRect: this.chartRect,
|
|
@@ -43969,7 +44170,9 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43969
44170
|
option: selectSeries,
|
|
43970
44171
|
selected: this.defaultSelectInfo
|
|
43971
44172
|
},
|
|
43972
|
-
overlayCtx: this.overlayCtx
|
|
44173
|
+
overlayCtx: this.overlayCtx,
|
|
44174
|
+
isBrush: !!brush,
|
|
44175
|
+
displayOverflow: displayOverflow
|
|
43973
44176
|
};
|
|
43974
44177
|
var showIndex = 0;
|
|
43975
44178
|
var showSeriesCount = 0;
|
|
@@ -44095,17 +44298,21 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44095
44298
|
}, {
|
|
44096
44299
|
key: "drawTip",
|
|
44097
44300
|
value: function drawTip() {
|
|
44301
|
+
var _this$drawTips;
|
|
44302
|
+
|
|
44098
44303
|
var tipLocationInfo;
|
|
44099
44304
|
|
|
44100
44305
|
if (this.lastHitInfo) {
|
|
44101
44306
|
tipLocationInfo = this.lastHitInfo;
|
|
44102
44307
|
} else if (this.defaultSelectItemInfo) {
|
|
44103
44308
|
tipLocationInfo = this.getItem(this.defaultSelectItemInfo, false);
|
|
44309
|
+
} else if (this.defaultSelectInfo && this.options.selectLabel.use) {
|
|
44310
|
+
tipLocationInfo = this.getItem(this.defaultSelectInfo, false);
|
|
44104
44311
|
} else {
|
|
44105
44312
|
tipLocationInfo = null;
|
|
44106
44313
|
}
|
|
44107
44314
|
|
|
44108
|
-
this.drawTips(tipLocationInfo);
|
|
44315
|
+
(_this$drawTips = this.drawTips) === null || _this$drawTips === void 0 ? void 0 : _this$drawTips.call(this, tipLocationInfo);
|
|
44109
44316
|
}
|
|
44110
44317
|
/**
|
|
44111
44318
|
* Create axes
|
|
@@ -44264,7 +44471,10 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44264
44471
|
}
|
|
44265
44472
|
|
|
44266
44473
|
this.bufferCtx.scale(this.pixelRatio, this.pixelRatio);
|
|
44267
|
-
|
|
44474
|
+
|
|
44475
|
+
if (this.overlayCtx) {
|
|
44476
|
+
this.overlayCtx.scale(this.pixelRatio, this.pixelRatio);
|
|
44477
|
+
}
|
|
44268
44478
|
}
|
|
44269
44479
|
/**
|
|
44270
44480
|
* Get chart DOM size and set canvas size
|
|
@@ -44358,8 +44568,11 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44358
44568
|
this.displayCanvas.style.width = "".concat(width, "px");
|
|
44359
44569
|
this.bufferCanvas.width = width * this.pixelRatio;
|
|
44360
44570
|
this.bufferCanvas.style.width = "".concat(width, "px");
|
|
44361
|
-
|
|
44362
|
-
this.overlayCanvas
|
|
44571
|
+
|
|
44572
|
+
if (this.overlayCanvas) {
|
|
44573
|
+
this.overlayCanvas.width = width * this.pixelRatio;
|
|
44574
|
+
this.overlayCanvas.style.width = "".concat(width, "px");
|
|
44575
|
+
}
|
|
44363
44576
|
}
|
|
44364
44577
|
/**
|
|
44365
44578
|
* Set canvas height
|
|
@@ -44379,8 +44592,11 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44379
44592
|
this.displayCanvas.style.height = "".concat(height, "px");
|
|
44380
44593
|
this.bufferCanvas.height = height * this.pixelRatio;
|
|
44381
44594
|
this.bufferCanvas.style.height = "".concat(height, "px");
|
|
44382
|
-
|
|
44383
|
-
this.overlayCanvas
|
|
44595
|
+
|
|
44596
|
+
if (this.overlayCanvas) {
|
|
44597
|
+
this.overlayCanvas.height = height * this.pixelRatio;
|
|
44598
|
+
this.overlayCanvas.style.height = "".concat(height, "px");
|
|
44599
|
+
}
|
|
44384
44600
|
}
|
|
44385
44601
|
/**
|
|
44386
44602
|
* Calculate labels offset from chart rect (Axis 영역을 벗어나는 label 크기 계산)
|
|
@@ -44468,6 +44684,8 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44468
44684
|
}, {
|
|
44469
44685
|
key: "update",
|
|
44470
44686
|
value: function update(updateInfo) {
|
|
44687
|
+
var _this$initSelectedInf2;
|
|
44688
|
+
|
|
44471
44689
|
var options = this.options;
|
|
44472
44690
|
var data = this.data.data;
|
|
44473
44691
|
var labels = this.data.labels;
|
|
@@ -44528,6 +44746,8 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44528
44746
|
if (options.title.show) {
|
|
44529
44747
|
if (!this.isInitTitle) {
|
|
44530
44748
|
this.initTitle();
|
|
44749
|
+
} else {
|
|
44750
|
+
this.updateTitle();
|
|
44531
44751
|
}
|
|
44532
44752
|
|
|
44533
44753
|
this.showTitle();
|
|
@@ -44563,7 +44783,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44563
44783
|
this.axesY = this.createAxes('y', options.axesY);
|
|
44564
44784
|
this.axesRange = this.getAxesRange();
|
|
44565
44785
|
this.labelOffset = this.getLabelOffset();
|
|
44566
|
-
this.initSelectedInfo();
|
|
44786
|
+
(_this$initSelectedInf2 = this.initSelectedInfo) === null || _this$initSelectedInf2 === void 0 ? void 0 : _this$initSelectedInf2.call(this);
|
|
44567
44787
|
this.render(updateInfo === null || updateInfo === void 0 ? void 0 : updateInfo.hitInfo);
|
|
44568
44788
|
var isDragMove = this.dragInfo && this.drawSelectionArea;
|
|
44569
44789
|
|
|
@@ -44629,13 +44849,15 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44629
44849
|
}
|
|
44630
44850
|
/**
|
|
44631
44851
|
* Resize chart
|
|
44852
|
+
* @param {Function} promiseRes After evChart resize completes,
|
|
44853
|
+
* callback completion status with promiseRes to draw a Brush over it.
|
|
44632
44854
|
*
|
|
44633
44855
|
* @returns {undefined}
|
|
44634
44856
|
*/
|
|
44635
44857
|
|
|
44636
44858
|
}, {
|
|
44637
44859
|
key: "resize",
|
|
44638
|
-
value: function resize() {
|
|
44860
|
+
value: function resize(promiseRes) {
|
|
44639
44861
|
this.clear();
|
|
44640
44862
|
this.bufferCtx.restore();
|
|
44641
44863
|
this.bufferCtx.save();
|
|
@@ -44643,6 +44865,10 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44643
44865
|
this.initScale();
|
|
44644
44866
|
this.chartRect = this.getChartRect();
|
|
44645
44867
|
this.drawChart();
|
|
44868
|
+
|
|
44869
|
+
if (promiseRes) {
|
|
44870
|
+
promiseRes(true);
|
|
44871
|
+
}
|
|
44646
44872
|
}
|
|
44647
44873
|
/**
|
|
44648
44874
|
* Render chart
|
|
@@ -44739,12 +44965,541 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44739
44965
|
}();
|
|
44740
44966
|
|
|
44741
44967
|
/* harmony default export */ var chart_core = (chart_core_EvChart);
|
|
44968
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/chart/ChartToolbar.vue?vue&type=template&id=691b9473&scoped=true
|
|
44969
|
+
|
|
44970
|
+
|
|
44971
|
+
|
|
44972
|
+
var ChartToolbarvue_type_template_id_691b9473_scoped_true_withId = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withScopeId"])("data-v-691b9473");
|
|
44973
|
+
|
|
44974
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-691b9473");
|
|
44975
|
+
|
|
44976
|
+
var ChartToolbarvue_type_template_id_691b9473_scoped_true_hoisted_1 = {
|
|
44977
|
+
class: "ev-chart__toolbar__wrapper"
|
|
44978
|
+
};
|
|
44979
|
+
var ChartToolbarvue_type_template_id_691b9473_scoped_true_hoisted_2 = {
|
|
44980
|
+
class: "ev-chart__toolbar__wrapper__icon"
|
|
44981
|
+
};
|
|
44982
|
+
|
|
44983
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])();
|
|
44984
|
+
|
|
44985
|
+
var ChartToolbarvue_type_template_id_691b9473_scoped_true_render = /*#__PURE__*/ChartToolbarvue_type_template_id_691b9473_scoped_true_withId(function (_ctx, _cache, $props, $setup, $data, $options) {
|
|
44986
|
+
var _component_ev_icon = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ev-icon");
|
|
44987
|
+
|
|
44988
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", ChartToolbarvue_type_template_id_691b9473_scoped_true_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", ChartToolbarvue_type_template_id_691b9473_scoped_true_hoisted_2, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.$props.toolbar.items, function (option, iconType) {
|
|
44989
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_ev_icon, {
|
|
44990
|
+
key: "".concat(iconType, "-").concat(option.icon),
|
|
44991
|
+
class: iconType,
|
|
44992
|
+
icon: option.icon,
|
|
44993
|
+
size: option.size,
|
|
44994
|
+
title: option.title,
|
|
44995
|
+
onClick: function onClick($event) {
|
|
44996
|
+
return _ctx.$emit('onClickToolbar', $event, iconType);
|
|
44997
|
+
}
|
|
44998
|
+
}, null, 8, ["class", "icon", "size", "title", "onClick"]);
|
|
44999
|
+
}), 128))])]);
|
|
45000
|
+
});
|
|
45001
|
+
// CONCATENATED MODULE: ./src/components/chart/ChartToolbar.vue?vue&type=template&id=691b9473&scoped=true
|
|
45002
|
+
|
|
45003
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/chart/ChartToolbar.vue?vue&type=script&lang=js
|
|
45004
|
+
/* harmony default export */ var ChartToolbarvue_type_script_lang_js = ({
|
|
45005
|
+
name: 'EvChartToolbar',
|
|
45006
|
+
props: {
|
|
45007
|
+
toolbar: {
|
|
45008
|
+
type: Object,
|
|
45009
|
+
default: function _default() {
|
|
45010
|
+
return {};
|
|
45011
|
+
}
|
|
45012
|
+
}
|
|
45013
|
+
},
|
|
45014
|
+
emits: ['onClickToolbar']
|
|
45015
|
+
});
|
|
45016
|
+
// CONCATENATED MODULE: ./src/components/chart/ChartToolbar.vue?vue&type=script&lang=js
|
|
45017
|
+
|
|
45018
|
+
// EXTERNAL MODULE: ./src/components/chart/ChartToolbar.vue?vue&type=style&index=0&id=691b9473&lang=scss&scoped=true
|
|
45019
|
+
var ChartToolbarvue_type_style_index_0_id_691b9473_lang_scss_scoped_true = __webpack_require__("6938");
|
|
45020
|
+
|
|
45021
|
+
// CONCATENATED MODULE: ./src/components/chart/ChartToolbar.vue
|
|
45022
|
+
|
|
45023
|
+
|
|
45024
|
+
|
|
45025
|
+
|
|
45026
|
+
|
|
45027
|
+
|
|
45028
|
+
|
|
45029
|
+
const ChartToolbar_exports_ = /*#__PURE__*/exportHelper_default()(ChartToolbarvue_type_script_lang_js, [['render',ChartToolbarvue_type_template_id_691b9473_scoped_true_render],['__scopeId',"data-v-691b9473"]])
|
|
45030
|
+
|
|
45031
|
+
/* harmony default export */ var ChartToolbar = (ChartToolbar_exports_);
|
|
45032
|
+
// CONCATENATED MODULE: ./src/components/chart/chartZoom.core.js
|
|
45033
|
+
|
|
45034
|
+
|
|
45035
|
+
|
|
45036
|
+
|
|
45037
|
+
|
|
45038
|
+
|
|
45039
|
+
|
|
45040
|
+
|
|
45041
|
+
|
|
45042
|
+
|
|
45043
|
+
|
|
45044
|
+
|
|
45045
|
+
|
|
45046
|
+
|
|
45047
|
+
|
|
45048
|
+
var chartZoom_core_EvChartZoom = /*#__PURE__*/function () {
|
|
45049
|
+
function EvChartZoom(evChartInfo, evChartClone, evChartZoomOptions, evChartToolbarRef, isExecuteZoom, brushIdx, emitFunc) {
|
|
45050
|
+
_classCallCheck(this, EvChartZoom);
|
|
45051
|
+
|
|
45052
|
+
this.isExecuteZoom = isExecuteZoom;
|
|
45053
|
+
this.evChartProps = evChartInfo.props;
|
|
45054
|
+
this.evChartCloneData = evChartClone.data;
|
|
45055
|
+
this.brushIdx = brushIdx;
|
|
45056
|
+
this.setEvChartZoomOptions(evChartZoomOptions);
|
|
45057
|
+
this.setIcon(evChartToolbarRef);
|
|
45058
|
+
var cloneLabelsLastIdx = evChartClone.data[0].labels.length - 1;
|
|
45059
|
+
this.cloneLabelsLastIdx = cloneLabelsLastIdx;
|
|
45060
|
+
this.isAnimationFinish = true;
|
|
45061
|
+
this.zoomAreaMemory = {
|
|
45062
|
+
previous: [],
|
|
45063
|
+
current: [[0, cloneLabelsLastIdx]],
|
|
45064
|
+
latest: []
|
|
45065
|
+
};
|
|
45066
|
+
|
|
45067
|
+
if (emitFunc) {
|
|
45068
|
+
this.emitFunc = emitFunc;
|
|
45069
|
+
emitFunc.updateZoomStartIdx(0);
|
|
45070
|
+
emitFunc.updateZoomEndIdx(cloneLabelsLastIdx);
|
|
45071
|
+
}
|
|
45072
|
+
|
|
45073
|
+
this.wrapWheelMoveZoomArea = this.wheelMoveZoomArea.bind(this);
|
|
45074
|
+
this.evChartDomContainers = this.drawAnimationCanvas(evChartInfo.dom);
|
|
45075
|
+
}
|
|
45076
|
+
|
|
45077
|
+
_createClass(EvChartZoom, [{
|
|
45078
|
+
key: "setEvChartZoomOptions",
|
|
45079
|
+
value: function setEvChartZoomOptions(options) {
|
|
45080
|
+
this.evChartZoomOptions = options;
|
|
45081
|
+
}
|
|
45082
|
+
}, {
|
|
45083
|
+
key: "setIcon",
|
|
45084
|
+
value: function setIcon(evChartToolbarRef) {
|
|
45085
|
+
if (!evChartToolbarRef) {
|
|
45086
|
+
return;
|
|
45087
|
+
}
|
|
45088
|
+
|
|
45089
|
+
var dragZoomIcon = evChartToolbarRef.querySelector('.dragZoom');
|
|
45090
|
+
this.resetIcon = evChartToolbarRef.querySelector('.reset');
|
|
45091
|
+
this.previousIcon = evChartToolbarRef.querySelector('.previous');
|
|
45092
|
+
this.latestIcon = evChartToolbarRef.querySelector('.latest');
|
|
45093
|
+
this.dragZoomIcon = dragZoomIcon;
|
|
45094
|
+
this.iconStyle(dragZoomIcon, 'enable');
|
|
45095
|
+
}
|
|
45096
|
+
}, {
|
|
45097
|
+
key: "drawAnimationCanvas",
|
|
45098
|
+
value: function drawAnimationCanvas(evChartDom) {
|
|
45099
|
+
evChartDom.forEach(function (dom) {
|
|
45100
|
+
var animationCanvas = document.createElement('canvas');
|
|
45101
|
+
animationCanvas.setAttribute('style', 'display: block;');
|
|
45102
|
+
animationCanvas.setAttribute('class', 'animation-canvas');
|
|
45103
|
+
animationCanvas.style.position = 'absolute';
|
|
45104
|
+
dom.appendChild(animationCanvas);
|
|
45105
|
+
});
|
|
45106
|
+
return evChartDom;
|
|
45107
|
+
}
|
|
45108
|
+
}, {
|
|
45109
|
+
key: "setEventListener",
|
|
45110
|
+
value: function setEventListener(isUseZoomMode) {
|
|
45111
|
+
var _this = this;
|
|
45112
|
+
|
|
45113
|
+
var toggleEventListener = isUseZoomMode ? 'addEventListener' : 'removeEventListener';
|
|
45114
|
+
this.isUseZoomMode = isUseZoomMode;
|
|
45115
|
+
this.evChartDomContainers.forEach(function (dom) {
|
|
45116
|
+
dom[toggleEventListener]('wheel', _this.wrapWheelMoveZoomArea);
|
|
45117
|
+
});
|
|
45118
|
+
}
|
|
45119
|
+
}, {
|
|
45120
|
+
key: "wheelMoveZoomArea",
|
|
45121
|
+
value: function wheelMoveZoomArea(e) {
|
|
45122
|
+
e.preventDefault();
|
|
45123
|
+
|
|
45124
|
+
var _this$zoomAreaMemory$ = _slicedToArray(this.zoomAreaMemory.current[0], 2),
|
|
45125
|
+
zoomStartIdx = _this$zoomAreaMemory$[0],
|
|
45126
|
+
zoomEndIdx = _this$zoomAreaMemory$[1];
|
|
45127
|
+
|
|
45128
|
+
if (zoomStartIdx === zoomEndIdx) {
|
|
45129
|
+
return;
|
|
45130
|
+
}
|
|
45131
|
+
|
|
45132
|
+
var zoomMoveStartIdx;
|
|
45133
|
+
var zoomMoveEndIdx;
|
|
45134
|
+
|
|
45135
|
+
if (e.deltaY > 0) {
|
|
45136
|
+
if (!zoomStartIdx) {
|
|
45137
|
+
return;
|
|
45138
|
+
}
|
|
45139
|
+
|
|
45140
|
+
zoomMoveStartIdx = zoomStartIdx - 1;
|
|
45141
|
+
zoomMoveEndIdx = zoomEndIdx - 1;
|
|
45142
|
+
} else {
|
|
45143
|
+
if (zoomEndIdx === this.cloneLabelsLastIdx) {
|
|
45144
|
+
return;
|
|
45145
|
+
}
|
|
45146
|
+
|
|
45147
|
+
zoomMoveStartIdx = zoomStartIdx + 1;
|
|
45148
|
+
zoomMoveEndIdx = zoomEndIdx + 1;
|
|
45149
|
+
}
|
|
45150
|
+
|
|
45151
|
+
this.isUseToolbar = true;
|
|
45152
|
+
this.executeZoom(zoomMoveStartIdx, zoomMoveEndIdx);
|
|
45153
|
+
this.zoomAreaMemory.current[0] = [zoomMoveStartIdx, zoomMoveEndIdx];
|
|
45154
|
+
}
|
|
45155
|
+
}, {
|
|
45156
|
+
key: "clickMoveZoomArea",
|
|
45157
|
+
value: function clickMoveZoomArea(direction) {
|
|
45158
|
+
if (!this.zoomAreaMemory[direction].length) {
|
|
45159
|
+
return;
|
|
45160
|
+
}
|
|
45161
|
+
|
|
45162
|
+
var _this$zoomAreaMemory$2 = this.zoomAreaMemory[direction].pop(),
|
|
45163
|
+
_this$zoomAreaMemory$3 = _slicedToArray(_this$zoomAreaMemory$2, 2),
|
|
45164
|
+
zoomStartIdx = _this$zoomAreaMemory$3[0],
|
|
45165
|
+
zoomEndIdx = _this$zoomAreaMemory$3[1];
|
|
45166
|
+
|
|
45167
|
+
this.isUseToolbar = true;
|
|
45168
|
+
this.executeZoom(zoomStartIdx, zoomEndIdx);
|
|
45169
|
+
this.setZoomAreaMemory(zoomStartIdx, zoomEndIdx, direction === 'previous' ? 'latest' : 'previous');
|
|
45170
|
+
}
|
|
45171
|
+
}, {
|
|
45172
|
+
key: "dragZoom",
|
|
45173
|
+
value: function dragZoom(_ref) {
|
|
45174
|
+
var zoomInfoData = _ref.data,
|
|
45175
|
+
dragSelectionInfo = _ref.range.dragSelectionInfo;
|
|
45176
|
+
var dragXsp = dragSelectionInfo.dragXsp,
|
|
45177
|
+
dragXep = dragSelectionInfo.dragXep,
|
|
45178
|
+
exceptAxesYChartWidth = dragSelectionInfo.exceptAxesYChartWidth,
|
|
45179
|
+
chartTitle = dragSelectionInfo.chartTitle;
|
|
45180
|
+
var _this$evChartProps = this.evChartProps,
|
|
45181
|
+
evChartOptions = _this$evChartProps.options,
|
|
45182
|
+
evChartData = _this$evChartProps.data;
|
|
45183
|
+
var dragChartIdx = evChartOptions.length > 1 ? evChartOptions.findIndex(function (option) {
|
|
45184
|
+
var _option$title$text, _option$title;
|
|
45185
|
+
|
|
45186
|
+
return ((_option$title$text = option === null || option === void 0 ? void 0 : (_option$title = option.title) === null || _option$title === void 0 ? void 0 : _option$title.text) !== null && _option$title$text !== void 0 ? _option$title$text : '') === chartTitle;
|
|
45187
|
+
}) : 0;
|
|
45188
|
+
|
|
45189
|
+
if (evChartOptions[dragChartIdx].axesX[0].type === 'time') {
|
|
45190
|
+
var zoomSeries = zoomInfoData[0].items;
|
|
45191
|
+
var zoomStartDate = zoomSeries[0].x;
|
|
45192
|
+
var zoomEndDate = zoomSeries[zoomSeries.length - 1].x;
|
|
45193
|
+
var currentChartDataLabels = evChartData[dragChartIdx].labels;
|
|
45194
|
+
var cloneChartDataLabels = this.evChartCloneData[dragChartIdx].labels;
|
|
45195
|
+
|
|
45196
|
+
var _this$zoomAreaMemory$4 = _slicedToArray(this.zoomAreaMemory.current[0], 2),
|
|
45197
|
+
currentZoomStartIdx = _this$zoomAreaMemory$4[0],
|
|
45198
|
+
currentZoomEndIdx = _this$zoomAreaMemory$4[1];
|
|
45199
|
+
|
|
45200
|
+
var newZoomStartIdx = cloneChartDataLabels.findIndex(function (label) {
|
|
45201
|
+
return +label.$d === +zoomStartDate.$d;
|
|
45202
|
+
});
|
|
45203
|
+
var newZoomEndIdx = cloneChartDataLabels.findLastIndex(function (label) {
|
|
45204
|
+
return +label.$d === +zoomEndDate.$d;
|
|
45205
|
+
});
|
|
45206
|
+
|
|
45207
|
+
var calculateAxesXPosition = function calculateAxesXPosition(zoomIdx) {
|
|
45208
|
+
var axesXInterval = exceptAxesYChartWidth / (currentChartDataLabels.length - 1);
|
|
45209
|
+
return axesXInterval * (zoomIdx - currentZoomStartIdx);
|
|
45210
|
+
};
|
|
45211
|
+
|
|
45212
|
+
var newDragStartAxesX = calculateAxesXPosition(newZoomStartIdx);
|
|
45213
|
+
|
|
45214
|
+
if (newZoomStartIdx === newZoomEndIdx) {
|
|
45215
|
+
// drag 영역에 한 포인트만 있을 경우
|
|
45216
|
+
if (newDragStartAxesX - dragXsp >= dragXep - newDragStartAxesX) {
|
|
45217
|
+
newZoomStartIdx -= 1;
|
|
45218
|
+
} else {
|
|
45219
|
+
newZoomEndIdx += 1;
|
|
45220
|
+
}
|
|
45221
|
+
}
|
|
45222
|
+
|
|
45223
|
+
if (newZoomStartIdx === currentZoomStartIdx && newZoomEndIdx === currentZoomEndIdx) {
|
|
45224
|
+
return;
|
|
45225
|
+
}
|
|
45226
|
+
|
|
45227
|
+
if (newZoomStartIdx - newZoomEndIdx === -1) {
|
|
45228
|
+
newDragStartAxesX = calculateAxesXPosition(newZoomStartIdx);
|
|
45229
|
+
}
|
|
45230
|
+
|
|
45231
|
+
var newDragEndAxesX = calculateAxesXPosition(newZoomEndIdx);
|
|
45232
|
+
this.dragZoomAnimation(dragSelectionInfo, newZoomStartIdx, newZoomEndIdx, newDragStartAxesX, newDragEndAxesX);
|
|
45233
|
+
}
|
|
45234
|
+
}
|
|
45235
|
+
}, {
|
|
45236
|
+
key: "dragZoomAnimation",
|
|
45237
|
+
value: function dragZoomAnimation(dragSelectionInfo, newZoomStartIdx, newZoomEndIdx, newDragStartAxesX, newDragEndAxesX) {
|
|
45238
|
+
var _this2 = this;
|
|
45239
|
+
|
|
45240
|
+
var chartRange = dragSelectionInfo.chartRange,
|
|
45241
|
+
exceptAxesYChartWidth = dragSelectionInfo.exceptAxesYChartWidth,
|
|
45242
|
+
exceptAxesXChartHeight = dragSelectionInfo.exceptAxesXChartHeight;
|
|
45243
|
+
var pixelRatio = window.devicePixelRatio || 1;
|
|
45244
|
+
var displayAnimaionCanvas = Array.from(this.evChartDomContainers).map(function (container) {
|
|
45245
|
+
var animationCanvas = container.querySelector('.animation-canvas');
|
|
45246
|
+
var displayCanvas = container.children[0];
|
|
45247
|
+
return [displayCanvas, animationCanvas];
|
|
45248
|
+
});
|
|
45249
|
+
|
|
45250
|
+
var _loop = function _loop(idx) {
|
|
45251
|
+
var _displayAnimaionCanva = _slicedToArray(displayAnimaionCanvas[idx], 2),
|
|
45252
|
+
displayCanvas = _displayAnimaionCanva[0],
|
|
45253
|
+
animationCanvas = _displayAnimaionCanva[1];
|
|
45254
|
+
|
|
45255
|
+
var animationCtx = animationCanvas.getContext('2d');
|
|
45256
|
+
animationCanvas.style.top = "".concat(chartRange.y1, "px");
|
|
45257
|
+
animationCanvas.style.left = "".concat(chartRange.x1, "px");
|
|
45258
|
+
animationCanvas.width = exceptAxesYChartWidth * pixelRatio;
|
|
45259
|
+
animationCanvas.style.width = "".concat(exceptAxesYChartWidth, "px");
|
|
45260
|
+
animationCanvas.height = exceptAxesXChartHeight * pixelRatio;
|
|
45261
|
+
animationCanvas.style.height = "".concat(exceptAxesXChartHeight, "px");
|
|
45262
|
+
|
|
45263
|
+
if (animationCanvas.style.display === 'none') {
|
|
45264
|
+
animationCanvas.style.display = 'block';
|
|
45265
|
+
}
|
|
45266
|
+
|
|
45267
|
+
_this2.isAnimationFinish = false;
|
|
45268
|
+
_this2.isUseToolbar = true;
|
|
45269
|
+
|
|
45270
|
+
_this2.executeDragZoomAnimation(displayCanvas, animationCtx, dragSelectionInfo, newDragStartAxesX, newDragEndAxesX).then(function (isAnimationFinish) {
|
|
45271
|
+
animationCanvas.style.display = 'none';
|
|
45272
|
+
|
|
45273
|
+
if (isAnimationFinish && idx === displayAnimaionCanvas.length - 1) {
|
|
45274
|
+
_this2.isAnimationFinish = isAnimationFinish;
|
|
45275
|
+
|
|
45276
|
+
_this2.executeZoom(newZoomStartIdx, newZoomEndIdx);
|
|
45277
|
+
|
|
45278
|
+
_this2.setZoomAreaMemory(newZoomStartIdx, newZoomEndIdx);
|
|
45279
|
+
}
|
|
45280
|
+
});
|
|
45281
|
+
};
|
|
45282
|
+
|
|
45283
|
+
for (var idx = 0; idx < displayAnimaionCanvas.length; idx++) {
|
|
45284
|
+
_loop(idx);
|
|
45285
|
+
}
|
|
45286
|
+
}
|
|
45287
|
+
}, {
|
|
45288
|
+
key: "executeZoom",
|
|
45289
|
+
value: function executeZoom(zoomStartIdx, zoomEndIdx) {
|
|
45290
|
+
if (this.isExecuteZoom) {
|
|
45291
|
+
this.isExecuteZoom.value = true;
|
|
45292
|
+
}
|
|
45293
|
+
|
|
45294
|
+
for (var idx = 0; idx < this.evChartCloneData.length; idx++) {
|
|
45295
|
+
var _this$evChartCloneDat = this.evChartCloneData[idx],
|
|
45296
|
+
cloneData = _this$evChartCloneDat.data,
|
|
45297
|
+
cloneLabels = _this$evChartCloneDat.labels,
|
|
45298
|
+
cloneSeries = _this$evChartCloneDat.series;
|
|
45299
|
+
var evChartData = this.evChartProps.data[idx];
|
|
45300
|
+
var cloneSeriesNames = Object.keys(cloneSeries);
|
|
45301
|
+
|
|
45302
|
+
for (var jdx = 0; jdx < cloneSeriesNames.length; jdx++) {
|
|
45303
|
+
var cloneSeriesName = cloneSeriesNames[jdx];
|
|
45304
|
+
evChartData.data[cloneSeriesName] = cloneData[cloneSeriesName].filter(function (d, dataIdx) {
|
|
45305
|
+
return zoomStartIdx <= dataIdx && zoomEndIdx >= dataIdx;
|
|
45306
|
+
});
|
|
45307
|
+
}
|
|
45308
|
+
|
|
45309
|
+
evChartData.labels = cloneLabels.filter(function (l, labelIdx) {
|
|
45310
|
+
return zoomStartIdx <= labelIdx && zoomEndIdx >= labelIdx;
|
|
45311
|
+
});
|
|
45312
|
+
}
|
|
45313
|
+
|
|
45314
|
+
if (!this.brushIdx.isUseButton && !this.brushIdx.isUseScroll) {
|
|
45315
|
+
this.brushIdx.start = zoomStartIdx;
|
|
45316
|
+
this.brushIdx.end = zoomEndIdx;
|
|
45317
|
+
}
|
|
45318
|
+
|
|
45319
|
+
if (this.emitFunc) {
|
|
45320
|
+
this.emitFunc.updateZoomStartIdx(zoomStartIdx);
|
|
45321
|
+
this.emitFunc.updateZoomEndIdx(zoomEndIdx);
|
|
45322
|
+
}
|
|
45323
|
+
}
|
|
45324
|
+
}, {
|
|
45325
|
+
key: "updateEvChartCloneData",
|
|
45326
|
+
value: function updateEvChartCloneData(evChartClone, isUseZoomMode) {
|
|
45327
|
+
var cloneLabelsLastIdx = evChartClone.data[0].labels.length - 1;
|
|
45328
|
+
this.cloneLabelsLastIdx = cloneLabelsLastIdx;
|
|
45329
|
+
this.evChartCloneData = evChartClone.data;
|
|
45330
|
+
|
|
45331
|
+
if (this.dragZoomIcon) {
|
|
45332
|
+
this.dragZoomIcon.classList.remove('active');
|
|
45333
|
+
}
|
|
45334
|
+
|
|
45335
|
+
this.zoomAreaMemory = {
|
|
45336
|
+
previous: [],
|
|
45337
|
+
current: [[0, cloneLabelsLastIdx]],
|
|
45338
|
+
latest: []
|
|
45339
|
+
};
|
|
45340
|
+
|
|
45341
|
+
if (this.emitFunc) {
|
|
45342
|
+
this.emitFunc.updateZoomStartIdx(0);
|
|
45343
|
+
this.emitFunc.updateZoomEndIdx(cloneLabelsLastIdx);
|
|
45344
|
+
}
|
|
45345
|
+
|
|
45346
|
+
this.setIconStyle(isUseZoomMode);
|
|
45347
|
+
}
|
|
45348
|
+
}, {
|
|
45349
|
+
key: "setZoomAreaMemory",
|
|
45350
|
+
value: function setZoomAreaMemory(zoomStartIdx, zoomEndIdx, direction) {
|
|
45351
|
+
var _this$zoomAreaMemory = this.zoomAreaMemory,
|
|
45352
|
+
previous = _this$zoomAreaMemory.previous,
|
|
45353
|
+
current = _this$zoomAreaMemory.current,
|
|
45354
|
+
latest = _this$zoomAreaMemory.latest;
|
|
45355
|
+
var currentZoomArea = current.pop();
|
|
45356
|
+
var bufferMemoryCnt = this.evChartZoomOptions.zoom.bufferMemoryCnt;
|
|
45357
|
+
|
|
45358
|
+
if (direction) {
|
|
45359
|
+
if (previous.length >= bufferMemoryCnt) {
|
|
45360
|
+
previous.splice(0, previous.length - bufferMemoryCnt + 1);
|
|
45361
|
+
}
|
|
45362
|
+
|
|
45363
|
+
this.zoomAreaMemory[direction].push(currentZoomArea);
|
|
45364
|
+
} else {
|
|
45365
|
+
previous.push(currentZoomArea);
|
|
45366
|
+
latest.length = 0;
|
|
45367
|
+
}
|
|
45368
|
+
|
|
45369
|
+
current.push([zoomStartIdx, zoomEndIdx]);
|
|
45370
|
+
this.setIconStyle(this.isUseZoomMode);
|
|
45371
|
+
}
|
|
45372
|
+
}, {
|
|
45373
|
+
key: "executeDragZoomAnimation",
|
|
45374
|
+
value: function executeDragZoomAnimation(displayCanvas, animationCtx, dragSelectionInfo, newDragStartAxesX, newDragEndAxesX) {
|
|
45375
|
+
var chartRange = dragSelectionInfo.chartRange,
|
|
45376
|
+
exceptAxesYChartWidth = dragSelectionInfo.exceptAxesYChartWidth,
|
|
45377
|
+
exceptAxesXChartHeight = dragSelectionInfo.exceptAxesXChartHeight;
|
|
45378
|
+
var leftDx = 0;
|
|
45379
|
+
var centerDx = newDragStartAxesX;
|
|
45380
|
+
var centerDWidth = newDragEndAxesX - newDragStartAxesX;
|
|
45381
|
+
var rightDx = newDragEndAxesX;
|
|
45382
|
+
var globalAlpha = 1;
|
|
45383
|
+
var globalAlphaSensitivity = 0.0015;
|
|
45384
|
+
var evChartOpacity = 0.5;
|
|
45385
|
+
var evChartMinOpacity = 0.1;
|
|
45386
|
+
var evChartOpacitySensitivity = 0.05;
|
|
45387
|
+
var zoomSpeed = 50;
|
|
45388
|
+
var leftSpeed = Math.ceil(zoomSpeed * (newDragStartAxesX / exceptAxesYChartWidth));
|
|
45389
|
+
var rightSpeed = Math.ceil(zoomSpeed * ((exceptAxesYChartWidth - newDragEndAxesX) / exceptAxesYChartWidth));
|
|
45390
|
+
|
|
45391
|
+
var animate = function animate(responseFinishStatus) {
|
|
45392
|
+
animationCtx.clearRect(0, 0, exceptAxesYChartWidth, exceptAxesXChartHeight);
|
|
45393
|
+
|
|
45394
|
+
if (centerDx <= 0 && centerDWidth >= exceptAxesYChartWidth) {
|
|
45395
|
+
displayCanvas.style.opacity = 'initial';
|
|
45396
|
+
return responseFinishStatus(true);
|
|
45397
|
+
}
|
|
45398
|
+
|
|
45399
|
+
if (evChartOpacity >= evChartMinOpacity) {
|
|
45400
|
+
displayCanvas.style.opacity = evChartOpacity;
|
|
45401
|
+
evChartOpacity -= evChartOpacitySensitivity;
|
|
45402
|
+
}
|
|
45403
|
+
|
|
45404
|
+
animationCtx.globalAlpha = globalAlpha; // 줌 영역 왼쪽
|
|
45405
|
+
|
|
45406
|
+
animationCtx.drawImage(displayCanvas, chartRange.x1, chartRange.y1, newDragStartAxesX, exceptAxesXChartHeight, leftDx, 0, newDragStartAxesX, exceptAxesXChartHeight); // 줌 영역
|
|
45407
|
+
|
|
45408
|
+
animationCtx.drawImage(displayCanvas, chartRange.x1 + newDragStartAxesX, chartRange.y1, newDragEndAxesX - newDragStartAxesX, exceptAxesXChartHeight, centerDx, 0, centerDWidth, exceptAxesXChartHeight); // 줌 영역 오른쪽
|
|
45409
|
+
|
|
45410
|
+
animationCtx.drawImage(displayCanvas, chartRange.x1 + newDragEndAxesX, chartRange.y1, exceptAxesYChartWidth, exceptAxesXChartHeight, rightDx, 0, exceptAxesYChartWidth, exceptAxesXChartHeight);
|
|
45411
|
+
globalAlpha -= globalAlphaSensitivity;
|
|
45412
|
+
leftDx -= leftSpeed;
|
|
45413
|
+
centerDx -= leftSpeed;
|
|
45414
|
+
centerDWidth += leftSpeed + rightSpeed;
|
|
45415
|
+
rightDx += rightSpeed;
|
|
45416
|
+
return requestAnimationFrame(function () {
|
|
45417
|
+
return animate(responseFinishStatus);
|
|
45418
|
+
});
|
|
45419
|
+
};
|
|
45420
|
+
|
|
45421
|
+
return new Promise(function (response) {
|
|
45422
|
+
return animate(response);
|
|
45423
|
+
});
|
|
45424
|
+
}
|
|
45425
|
+
}, {
|
|
45426
|
+
key: "setIconStyle",
|
|
45427
|
+
value: function setIconStyle(isUseZoomMode) {
|
|
45428
|
+
var _this3 = this;
|
|
45429
|
+
|
|
45430
|
+
var toggleIconStyle = function toggleIconStyle(icon, condition) {
|
|
45431
|
+
if (condition) {
|
|
45432
|
+
_this3.iconStyle(icon, 'enable');
|
|
45433
|
+
} else {
|
|
45434
|
+
_this3.iconStyle(icon, 'disable');
|
|
45435
|
+
}
|
|
45436
|
+
};
|
|
45437
|
+
|
|
45438
|
+
if (isUseZoomMode && this.dragZoomIcon.classList.contains('active')) {
|
|
45439
|
+
var _this$zoomAreaMemory2 = this.zoomAreaMemory,
|
|
45440
|
+
previous = _this$zoomAreaMemory2.previous,
|
|
45441
|
+
latest = _this$zoomAreaMemory2.latest;
|
|
45442
|
+
toggleIconStyle(this.previousIcon, previous.length);
|
|
45443
|
+
toggleIconStyle(this.latestIcon, latest.length);
|
|
45444
|
+
this.iconStyle(this.resetIcon, 'enable');
|
|
45445
|
+
} else {
|
|
45446
|
+
toggleIconStyle(this.resetIcon);
|
|
45447
|
+
toggleIconStyle(this.previousIcon);
|
|
45448
|
+
toggleIconStyle(this.latestIcon);
|
|
45449
|
+
}
|
|
45450
|
+
}
|
|
45451
|
+
}, {
|
|
45452
|
+
key: "iconStyle",
|
|
45453
|
+
value: function iconStyle(icon, mode) {
|
|
45454
|
+
if (!icon) {
|
|
45455
|
+
return;
|
|
45456
|
+
}
|
|
45457
|
+
|
|
45458
|
+
var _ref2 = mode === 'enable' ? [1, 'initial'] : [0.5, 'none'],
|
|
45459
|
+
_ref3 = _slicedToArray(_ref2, 2),
|
|
45460
|
+
opacity = _ref3[0],
|
|
45461
|
+
pointerEvents = _ref3[1];
|
|
45462
|
+
|
|
45463
|
+
icon.style.opacity = opacity;
|
|
45464
|
+
icon.style.pointerEvents = pointerEvents;
|
|
45465
|
+
}
|
|
45466
|
+
}, {
|
|
45467
|
+
key: "initZoom",
|
|
45468
|
+
value: function initZoom() {
|
|
45469
|
+
if (!this.isAnimationFinish) {
|
|
45470
|
+
return;
|
|
45471
|
+
}
|
|
45472
|
+
|
|
45473
|
+
var _this$zoomAreaMemory$5 = _slicedToArray(this.zoomAreaMemory.current[0], 2),
|
|
45474
|
+
currentZoomStartIdx = _this$zoomAreaMemory$5[0],
|
|
45475
|
+
currentZoomEndIdx = _this$zoomAreaMemory$5[1];
|
|
45476
|
+
|
|
45477
|
+
var cloneLabelsLastIdx = this.cloneLabelsLastIdx;
|
|
45478
|
+
|
|
45479
|
+
if (currentZoomStartIdx !== 0 || currentZoomEndIdx !== cloneLabelsLastIdx) {
|
|
45480
|
+
this.isUseToolbar = true;
|
|
45481
|
+
this.executeZoom(0, cloneLabelsLastIdx);
|
|
45482
|
+
this.setZoomAreaMemory(0, cloneLabelsLastIdx);
|
|
45483
|
+
}
|
|
45484
|
+
}
|
|
45485
|
+
}]);
|
|
45486
|
+
|
|
45487
|
+
return EvChartZoom;
|
|
45488
|
+
}();
|
|
45489
|
+
|
|
45490
|
+
|
|
44742
45491
|
// CONCATENATED MODULE: ./src/components/chart/uses.js
|
|
44743
45492
|
|
|
44744
45493
|
|
|
44745
45494
|
|
|
44746
45495
|
|
|
44747
45496
|
|
|
45497
|
+
|
|
45498
|
+
|
|
45499
|
+
|
|
45500
|
+
|
|
45501
|
+
|
|
45502
|
+
|
|
44748
45503
|
var DEFAULT_OPTIONS = {
|
|
44749
45504
|
padding: {
|
|
44750
45505
|
top: 20,
|
|
@@ -44873,6 +45628,7 @@ var DEFAULT_OPTIONS = {
|
|
|
44873
45628
|
selectLabel: {
|
|
44874
45629
|
use: false,
|
|
44875
45630
|
useClick: true,
|
|
45631
|
+
tipText: 'value',
|
|
44876
45632
|
limit: 1,
|
|
44877
45633
|
useDeselectOverflow: false,
|
|
44878
45634
|
showTip: false,
|
|
@@ -44880,7 +45636,18 @@ var DEFAULT_OPTIONS = {
|
|
|
44880
45636
|
useLabelOpacity: true,
|
|
44881
45637
|
fixedPosTop: false,
|
|
44882
45638
|
useApproximateValue: false,
|
|
44883
|
-
tipBackground: '#000000'
|
|
45639
|
+
tipBackground: '#000000',
|
|
45640
|
+
indicatorColor: '#000000',
|
|
45641
|
+
tipStyle: {
|
|
45642
|
+
height: 20,
|
|
45643
|
+
background: '#000000',
|
|
45644
|
+
textColor: '#FFFFFF',
|
|
45645
|
+
fontSize: 14,
|
|
45646
|
+
fontFamily: 'Roboto',
|
|
45647
|
+
fontWeight: 400
|
|
45648
|
+
},
|
|
45649
|
+
showTextTip: false,
|
|
45650
|
+
showIndicator: false
|
|
44884
45651
|
},
|
|
44885
45652
|
selectSeries: {
|
|
44886
45653
|
use: false,
|
|
@@ -44894,6 +45661,34 @@ var DEFAULT_OPTIONS = {
|
|
|
44894
45661
|
fillColor: '#38ACEC',
|
|
44895
45662
|
opacity: 0.65
|
|
44896
45663
|
},
|
|
45664
|
+
zoom: {
|
|
45665
|
+
bufferMemoryCnt: 100,
|
|
45666
|
+
toolbar: {
|
|
45667
|
+
show: false,
|
|
45668
|
+
items: {
|
|
45669
|
+
previous: {
|
|
45670
|
+
icon: 'ev-icon-allow2-left',
|
|
45671
|
+
size: 'medium',
|
|
45672
|
+
title: 'Previous'
|
|
45673
|
+
},
|
|
45674
|
+
latest: {
|
|
45675
|
+
icon: 'ev-icon-allow2-right',
|
|
45676
|
+
size: 'medium',
|
|
45677
|
+
title: 'Latest'
|
|
45678
|
+
},
|
|
45679
|
+
reset: {
|
|
45680
|
+
icon: 'ev-icon-redo',
|
|
45681
|
+
size: 'medium',
|
|
45682
|
+
title: 'Reset'
|
|
45683
|
+
},
|
|
45684
|
+
dragZoom: {
|
|
45685
|
+
icon: 'ev-icon-zoomin',
|
|
45686
|
+
size: 'medium',
|
|
45687
|
+
title: 'Drag Zoom'
|
|
45688
|
+
}
|
|
45689
|
+
}
|
|
45690
|
+
}
|
|
45691
|
+
},
|
|
44897
45692
|
heatMapColor: {
|
|
44898
45693
|
min: '#FFFFFF',
|
|
44899
45694
|
max: '#0052FF',
|
|
@@ -44915,7 +45710,9 @@ var DEFAULT_DATA = {
|
|
|
44915
45710
|
labels: [],
|
|
44916
45711
|
data: {}
|
|
44917
45712
|
};
|
|
44918
|
-
var chart_uses_useModel = function useModel() {
|
|
45713
|
+
var chart_uses_useModel = function useModel(selectedLabel) {
|
|
45714
|
+
var _props$selectedLabel;
|
|
45715
|
+
|
|
44919
45716
|
var _getCurrentInstance = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["getCurrentInstance"])(),
|
|
44920
45717
|
props = _getCurrentInstance.props,
|
|
44921
45718
|
emit = _getCurrentInstance.emit;
|
|
@@ -44944,7 +45741,7 @@ var chart_uses_useModel = function useModel() {
|
|
|
44944
45741
|
};
|
|
44945
45742
|
|
|
44946
45743
|
var selectItemInfo = lodash_es_cloneDeep(props.selectedItem);
|
|
44947
|
-
var selectLabelInfo = lodash_es_cloneDeep(props.selectedLabel);
|
|
45744
|
+
var selectLabelInfo = lodash_es_cloneDeep((_props$selectedLabel = props.selectedLabel) !== null && _props$selectedLabel !== void 0 ? _props$selectedLabel : selectedLabel === null || selectedLabel === void 0 ? void 0 : selectedLabel.value);
|
|
44948
45745
|
var selectSeriesInfo = lodash_es_cloneDeep(props.selectedSeries);
|
|
44949
45746
|
var eventListeners = {
|
|
44950
45747
|
click: function () {
|
|
@@ -44967,9 +45764,13 @@ var chart_uses_useModel = function useModel() {
|
|
|
44967
45764
|
}
|
|
44968
45765
|
|
|
44969
45766
|
if ((_e$selected = e.selected) !== null && _e$selected !== void 0 && _e$selected.dataIndex) {
|
|
44970
|
-
|
|
44971
|
-
dataIndex
|
|
44972
|
-
}
|
|
45767
|
+
if (selectedLabel !== null && selectedLabel !== void 0 && selectedLabel.value) {
|
|
45768
|
+
selectedLabel.value.dataIndex = e.selected.dataIndex;
|
|
45769
|
+
} else {
|
|
45770
|
+
emit('update:selectedLabel', {
|
|
45771
|
+
dataIndex: e.selected.dataIndex
|
|
45772
|
+
});
|
|
45773
|
+
}
|
|
44973
45774
|
}
|
|
44974
45775
|
|
|
44975
45776
|
if ((_e$selected2 = e.selected) !== null && _e$selected2 !== void 0 && _e$selected2.seriesId) {
|
|
@@ -45081,6 +45882,284 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45081
45882
|
wrapperStyle: wrapperStyle
|
|
45082
45883
|
};
|
|
45083
45884
|
};
|
|
45885
|
+
var uses_useZoomModel = function useZoomModel(evChartNormalizedOptions, _ref, selectedLabelOrItem) {
|
|
45886
|
+
var evChartWrapper = _ref.wrapper,
|
|
45887
|
+
evChartGroupRef = _ref.evChartGroupRef;
|
|
45888
|
+
|
|
45889
|
+
var _getCurrentInstance2 = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["getCurrentInstance"])(),
|
|
45890
|
+
props = _getCurrentInstance2.props,
|
|
45891
|
+
slots = _getCurrentInstance2.slots,
|
|
45892
|
+
emit = _getCurrentInstance2.emit;
|
|
45893
|
+
|
|
45894
|
+
var isExecuteZoom = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
|
|
45895
|
+
var isUseZoomMode = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
|
|
45896
|
+
var evChartToolbarRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
45897
|
+
var evChartZoomOptions = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
45898
|
+
zoom: evChartNormalizedOptions.zoom
|
|
45899
|
+
});
|
|
45900
|
+
var brushIdx = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
45901
|
+
start: 0,
|
|
45902
|
+
end: -1,
|
|
45903
|
+
isUseButton: false,
|
|
45904
|
+
isUseScroll: false
|
|
45905
|
+
});
|
|
45906
|
+
var evChartZoom = null;
|
|
45907
|
+
var evChartInfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
45908
|
+
dom: [],
|
|
45909
|
+
props: {
|
|
45910
|
+
data: [],
|
|
45911
|
+
options: []
|
|
45912
|
+
}
|
|
45913
|
+
});
|
|
45914
|
+
var evChartClone = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
45915
|
+
data: null,
|
|
45916
|
+
options: null
|
|
45917
|
+
});
|
|
45918
|
+
var brushChartIdx = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])([]);
|
|
45919
|
+
|
|
45920
|
+
var getRangeInfo = function getRangeInfo(zoomInfo) {
|
|
45921
|
+
if (zoomInfo.data.length && zoomInfo.range && isUseZoomMode.value) {
|
|
45922
|
+
evChartZoom.dragZoom(zoomInfo);
|
|
45923
|
+
}
|
|
45924
|
+
};
|
|
45925
|
+
|
|
45926
|
+
var setEvChartOptions = function setEvChartOptions() {
|
|
45927
|
+
evChartInfo.props.options.forEach(function (option, idx) {
|
|
45928
|
+
option.zoom = _objectSpread2(_objectSpread2({}, option.zoom), {}, {
|
|
45929
|
+
use: isUseZoomMode.value,
|
|
45930
|
+
getRangeInfo: getRangeInfo
|
|
45931
|
+
});
|
|
45932
|
+
|
|
45933
|
+
if (isUseZoomMode.value) {
|
|
45934
|
+
option.dragSelection = _objectSpread2(_objectSpread2({}, option.dragSelection), {}, {
|
|
45935
|
+
use: true,
|
|
45936
|
+
keepDisplay: false
|
|
45937
|
+
});
|
|
45938
|
+
} else {
|
|
45939
|
+
var _evChartClone$options;
|
|
45940
|
+
|
|
45941
|
+
var _ref2 = (_evChartClone$options = evChartClone.options[idx].dragSelection) !== null && _evChartClone$options !== void 0 ? _evChartClone$options : {},
|
|
45942
|
+
originUseOption = _ref2.use,
|
|
45943
|
+
originKeepDisplayOption = _ref2.keepDisplay;
|
|
45944
|
+
|
|
45945
|
+
option.dragSelection = {
|
|
45946
|
+
use: !!originUseOption,
|
|
45947
|
+
keepDisplay: !!originKeepDisplayOption
|
|
45948
|
+
};
|
|
45949
|
+
}
|
|
45950
|
+
});
|
|
45951
|
+
};
|
|
45952
|
+
|
|
45953
|
+
var createEvChartZoom = function createEvChartZoom() {
|
|
45954
|
+
if (evChartGroupRef) {
|
|
45955
|
+
evChartInfo.dom = evChartGroupRef.value.querySelectorAll('.ev-chart-container');
|
|
45956
|
+
var chartIdx = 0;
|
|
45957
|
+
|
|
45958
|
+
if (evChartInfo.dom.length) {
|
|
45959
|
+
slots.default(evChartInfo.dom).forEach(function (_ref3) {
|
|
45960
|
+
var type = _ref3.type,
|
|
45961
|
+
evChartProps = _ref3.props;
|
|
45962
|
+
|
|
45963
|
+
if ((type === null || type === void 0 ? void 0 : type.name) === 'EvChart') {
|
|
45964
|
+
var options = evChartProps.options,
|
|
45965
|
+
data = evChartProps.data;
|
|
45966
|
+
data.chartIdx = chartIdx;
|
|
45967
|
+
chartIdx++;
|
|
45968
|
+
evChartInfo.props.data.push(data);
|
|
45969
|
+
evChartInfo.props.options.push(options);
|
|
45970
|
+
} else if ((type === null || type === void 0 ? void 0 : type.name) === 'EvChartBrush') {
|
|
45971
|
+
var _evChartProps$options, _evChartProps$options2;
|
|
45972
|
+
|
|
45973
|
+
brushChartIdx.value.push((_evChartProps$options = evChartProps === null || evChartProps === void 0 ? void 0 : (_evChartProps$options2 = evChartProps.options) === null || _evChartProps$options2 === void 0 ? void 0 : _evChartProps$options2.chartIdx) !== null && _evChartProps$options !== void 0 ? _evChartProps$options : 0);
|
|
45974
|
+
}
|
|
45975
|
+
});
|
|
45976
|
+
}
|
|
45977
|
+
} else {
|
|
45978
|
+
evChartInfo.dom = [evChartWrapper.value.querySelector('.ev-chart-container')];
|
|
45979
|
+
evChartInfo.props.data.push(props.data);
|
|
45980
|
+
evChartInfo.props.options.push(props.options);
|
|
45981
|
+
}
|
|
45982
|
+
|
|
45983
|
+
if (evChartInfo.props.data.length) {
|
|
45984
|
+
evChartClone.data = lodash_es_cloneDeep(evChartInfo.props.data);
|
|
45985
|
+
evChartClone.options = lodash_es_cloneDeep(evChartInfo.props.options);
|
|
45986
|
+
var emitFunc = {
|
|
45987
|
+
updateZoomStartIdx: function updateZoomStartIdx(startIdx) {
|
|
45988
|
+
return emit('update:zoomStartIdx', startIdx);
|
|
45989
|
+
},
|
|
45990
|
+
updateZoomEndIdx: function updateZoomEndIdx(endIdx) {
|
|
45991
|
+
return emit('update:zoomEndIdx', endIdx);
|
|
45992
|
+
}
|
|
45993
|
+
};
|
|
45994
|
+
evChartZoom = new chartZoom_core_EvChartZoom(evChartInfo, evChartClone, evChartZoomOptions, evChartToolbarRef.value, isExecuteZoom, brushIdx, emitFunc);
|
|
45995
|
+
}
|
|
45996
|
+
};
|
|
45997
|
+
|
|
45998
|
+
var toggleUseZoom = function toggleUseZoom(target) {
|
|
45999
|
+
if (evChartClone.data[0].labels.length <= 1) {
|
|
46000
|
+
return;
|
|
46001
|
+
}
|
|
46002
|
+
|
|
46003
|
+
isUseZoomMode.value = !isUseZoomMode.value;
|
|
46004
|
+
|
|
46005
|
+
if (target) {
|
|
46006
|
+
target.classList.toggle('active');
|
|
46007
|
+
} else {
|
|
46008
|
+
var dragZoomIcon = evChartToolbarRef.value.querySelector('.dragZoom');
|
|
46009
|
+
dragZoomIcon.classList.toggle('active');
|
|
46010
|
+
}
|
|
46011
|
+
|
|
46012
|
+
setEvChartOptions();
|
|
46013
|
+
evChartZoom.setIconStyle(isUseZoomMode.value);
|
|
46014
|
+
evChartZoom.setEventListener(isUseZoomMode.value);
|
|
46015
|
+
};
|
|
46016
|
+
|
|
46017
|
+
var onClickToolbar = function onClickToolbar(e, iconType) {
|
|
46018
|
+
if (!evChartZoom.isAnimationFinish) {
|
|
46019
|
+
return;
|
|
46020
|
+
}
|
|
46021
|
+
|
|
46022
|
+
switch (iconType) {
|
|
46023
|
+
case 'dragZoom':
|
|
46024
|
+
toggleUseZoom(e.target);
|
|
46025
|
+
break;
|
|
46026
|
+
|
|
46027
|
+
case 'reset':
|
|
46028
|
+
evChartZoom.initZoom();
|
|
46029
|
+
break;
|
|
46030
|
+
|
|
46031
|
+
case 'previous':
|
|
46032
|
+
case 'latest':
|
|
46033
|
+
evChartZoom.clickMoveZoomArea(iconType);
|
|
46034
|
+
break;
|
|
46035
|
+
|
|
46036
|
+
default:
|
|
46037
|
+
break;
|
|
46038
|
+
}
|
|
46039
|
+
};
|
|
46040
|
+
|
|
46041
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUpdated"])(function () {
|
|
46042
|
+
if (evChartToolbarRef.value) {
|
|
46043
|
+
evChartZoom.setIcon(evChartToolbarRef.value);
|
|
46044
|
+
}
|
|
46045
|
+
});
|
|
46046
|
+
|
|
46047
|
+
var setOptionsForUseZoom = function setOptionsForUseZoom(newOpt) {
|
|
46048
|
+
var isUpdateZoomOptions = !lodash_es_isEqual(newOpt.zoom, evChartZoomOptions.zoom);
|
|
46049
|
+
|
|
46050
|
+
if (isUpdateZoomOptions) {
|
|
46051
|
+
evChartZoomOptions.zoom = newOpt.zoom;
|
|
46052
|
+
|
|
46053
|
+
if (evChartZoom) {
|
|
46054
|
+
if (!evChartZoomOptions.zoom.toolbar.show && isUseZoomMode.value) {
|
|
46055
|
+
toggleUseZoom();
|
|
46056
|
+
}
|
|
46057
|
+
|
|
46058
|
+
evChartZoom.setEvChartZoomOptions(evChartZoomOptions);
|
|
46059
|
+
} else if (evChartZoomOptions.zoom.toolbar.show && !evChartGroupRef) {
|
|
46060
|
+
createEvChartZoom();
|
|
46061
|
+
}
|
|
46062
|
+
}
|
|
46063
|
+
};
|
|
46064
|
+
|
|
46065
|
+
var setDataForUseZoom = function setDataForUseZoom(newData) {
|
|
46066
|
+
if (!isExecuteZoom.value) {
|
|
46067
|
+
evChartClone.data = evChartGroupRef ? lodash_es_cloneDeep(newData) : [lodash_es_cloneDeep(newData)];
|
|
46068
|
+
isUseZoomMode.value = false;
|
|
46069
|
+
setEvChartOptions();
|
|
46070
|
+
brushIdx.end = -1;
|
|
46071
|
+
|
|
46072
|
+
for (var i = 0; i < brushChartIdx.value.length; i++) {
|
|
46073
|
+
var data = evChartClone.data[brushChartIdx.value[i]];
|
|
46074
|
+
|
|
46075
|
+
if (data.labels.length) {
|
|
46076
|
+
brushIdx.start = 0;
|
|
46077
|
+
brushIdx.end = data.labels.length - 1;
|
|
46078
|
+
}
|
|
46079
|
+
}
|
|
46080
|
+
|
|
46081
|
+
if (evChartZoom) {
|
|
46082
|
+
evChartZoom.updateEvChartCloneData(evChartClone, isUseZoomMode.value);
|
|
46083
|
+
}
|
|
46084
|
+
}
|
|
46085
|
+
|
|
46086
|
+
isExecuteZoom.value = false;
|
|
46087
|
+
};
|
|
46088
|
+
|
|
46089
|
+
var controlZoomIdx = function controlZoomIdx(zoomStartIdx, zoomEndIdx) {
|
|
46090
|
+
if (evChartZoom.isUseToolbar) {
|
|
46091
|
+
evChartZoom.isUseToolbar = false;
|
|
46092
|
+
return;
|
|
46093
|
+
}
|
|
46094
|
+
|
|
46095
|
+
if (isUseZoomMode.value) {
|
|
46096
|
+
evChartZoom.executeZoom(zoomStartIdx, zoomEndIdx);
|
|
46097
|
+
evChartZoom.setZoomAreaMemory(zoomStartIdx, zoomEndIdx);
|
|
46098
|
+
}
|
|
46099
|
+
};
|
|
46100
|
+
|
|
46101
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46102
|
+
return [brushIdx.start, brushIdx.end];
|
|
46103
|
+
}, function (_ref4, _ref5) {
|
|
46104
|
+
var _ref6 = _slicedToArray(_ref4, 2),
|
|
46105
|
+
curBrushStartIdx = _ref6[0],
|
|
46106
|
+
curBrushEndIdx = _ref6[1];
|
|
46107
|
+
|
|
46108
|
+
var _ref7 = _slicedToArray(_ref5, 1),
|
|
46109
|
+
prevBrushStartIdx = _ref7[0];
|
|
46110
|
+
|
|
46111
|
+
if (selectedLabelOrItem !== null && selectedLabelOrItem !== void 0 && selectedLabelOrItem.value) {
|
|
46112
|
+
if (typeof selectedLabelOrItem.value.dataIndex === 'number') {
|
|
46113
|
+
if (curBrushStartIdx >= (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0)) {
|
|
46114
|
+
selectedLabelOrItem.value.dataIndex -= curBrushStartIdx - (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0);
|
|
46115
|
+
} else {
|
|
46116
|
+
selectedLabelOrItem.value.dataIndex += prevBrushStartIdx - curBrushStartIdx;
|
|
46117
|
+
}
|
|
46118
|
+
} else {
|
|
46119
|
+
for (var idx = 0; idx < selectedLabelOrItem.value.dataIndex.length; idx++) {
|
|
46120
|
+
if (curBrushStartIdx >= (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0)) {
|
|
46121
|
+
selectedLabelOrItem.value.dataIndex[idx] -= curBrushStartIdx - (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0);
|
|
46122
|
+
} else {
|
|
46123
|
+
selectedLabelOrItem.value.dataIndex[idx] += prevBrushStartIdx - curBrushStartIdx;
|
|
46124
|
+
}
|
|
46125
|
+
}
|
|
46126
|
+
}
|
|
46127
|
+
}
|
|
46128
|
+
|
|
46129
|
+
if (brushIdx.isUseButton || brushIdx.isUseScroll) {
|
|
46130
|
+
evChartZoom.executeZoom(curBrushStartIdx, curBrushEndIdx);
|
|
46131
|
+
}
|
|
46132
|
+
});
|
|
46133
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46134
|
+
return [brushIdx.isUseButton, brushIdx.isUseScroll];
|
|
46135
|
+
}, function (_ref8, _ref9) {
|
|
46136
|
+
var _ref10 = _slicedToArray(_ref8, 2),
|
|
46137
|
+
curIsUseButton = _ref10[0],
|
|
46138
|
+
curIsUseScroll = _ref10[1];
|
|
46139
|
+
|
|
46140
|
+
var _ref11 = _slicedToArray(_ref9, 2),
|
|
46141
|
+
prevIsUseButton = _ref11[0],
|
|
46142
|
+
prevIsUseScroll = _ref11[1];
|
|
46143
|
+
|
|
46144
|
+
if (prevIsUseButton && !curIsUseButton) {
|
|
46145
|
+
evChartZoom.setZoomAreaMemory(brushIdx.start, brushIdx.end);
|
|
46146
|
+
} else if (prevIsUseScroll && !curIsUseScroll) {
|
|
46147
|
+
evChartZoom.zoomAreaMemory.current[0] = [brushIdx.start, brushIdx.end];
|
|
46148
|
+
}
|
|
46149
|
+
});
|
|
46150
|
+
return {
|
|
46151
|
+
evChartZoomOptions: evChartZoomOptions,
|
|
46152
|
+
evChartInfo: evChartInfo,
|
|
46153
|
+
evChartToolbarRef: evChartToolbarRef,
|
|
46154
|
+
evChartClone: evChartClone,
|
|
46155
|
+
brushIdx: brushIdx,
|
|
46156
|
+
createEvChartZoom: createEvChartZoom,
|
|
46157
|
+
setOptionsForUseZoom: setOptionsForUseZoom,
|
|
46158
|
+
setDataForUseZoom: setDataForUseZoom,
|
|
46159
|
+
controlZoomIdx: controlZoomIdx,
|
|
46160
|
+
onClickToolbar: onClickToolbar
|
|
46161
|
+
};
|
|
46162
|
+
};
|
|
45084
46163
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/chart/Chart.vue?vue&type=script&lang=js
|
|
45085
46164
|
|
|
45086
46165
|
|
|
@@ -45089,8 +46168,13 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45089
46168
|
|
|
45090
46169
|
|
|
45091
46170
|
|
|
46171
|
+
|
|
46172
|
+
|
|
45092
46173
|
/* harmony default export */ var Chartvue_type_script_lang_js = ({
|
|
45093
46174
|
name: 'EvChart',
|
|
46175
|
+
components: {
|
|
46176
|
+
EvChartToolbar: ChartToolbar
|
|
46177
|
+
},
|
|
45094
46178
|
props: {
|
|
45095
46179
|
selectedItem: {
|
|
45096
46180
|
type: Object,
|
|
@@ -45119,13 +46203,31 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45119
46203
|
resizeTimeout: {
|
|
45120
46204
|
type: Number,
|
|
45121
46205
|
default: 0
|
|
46206
|
+
},
|
|
46207
|
+
zoomStartIdx: {
|
|
46208
|
+
type: Number,
|
|
46209
|
+
default: 0
|
|
46210
|
+
},
|
|
46211
|
+
zoomEndIdx: {
|
|
46212
|
+
type: Number,
|
|
46213
|
+
default: 0
|
|
45122
46214
|
}
|
|
45123
46215
|
},
|
|
45124
|
-
emits: ['click', 'dbl-click', 'drag-select', 'update:selectedItem', 'update:selectedLabel', 'update:selectedSeries'],
|
|
46216
|
+
emits: ['click', 'dbl-click', 'drag-select', 'update:selectedItem', 'update:selectedLabel', 'update:selectedSeries', 'update:zoomStartIdx', 'update:zoomEndIdx'],
|
|
45125
46217
|
setup: function setup(props) {
|
|
45126
46218
|
var evChart = null;
|
|
46219
|
+
var injectIsChartGroup = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('isChartGroup', false);
|
|
46220
|
+
var injectBrushSeries = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('brushSeries', {
|
|
46221
|
+
list: [],
|
|
46222
|
+
chartIdx: null
|
|
46223
|
+
});
|
|
46224
|
+
var injectGroupSelectedLabel = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('groupSelectedLabel', null);
|
|
46225
|
+
var injectBrushIdx = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('brushIdx', {
|
|
46226
|
+
start: 0,
|
|
46227
|
+
end: -1
|
|
46228
|
+
});
|
|
45127
46229
|
|
|
45128
|
-
var _useModel = chart_uses_useModel(),
|
|
46230
|
+
var _useModel = chart_uses_useModel(injectGroupSelectedLabel),
|
|
45129
46231
|
eventListeners = _useModel.eventListeners,
|
|
45130
46232
|
selectItemInfo = _useModel.selectItemInfo,
|
|
45131
46233
|
selectLabelInfo = _useModel.selectLabelInfo,
|
|
@@ -45135,11 +46237,29 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45135
46237
|
|
|
45136
46238
|
var normalizedData = getNormalizedData(props.data);
|
|
45137
46239
|
var normalizedOptions = getNormalizedOptions(props.options);
|
|
46240
|
+
var selectedLabel = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
46241
|
+
return props.selectedLabel;
|
|
46242
|
+
});
|
|
46243
|
+
var selectedItem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
46244
|
+
return props.selectedItem;
|
|
46245
|
+
});
|
|
45138
46246
|
|
|
45139
46247
|
var _useWrapper = uses_useWrapper(normalizedOptions),
|
|
45140
46248
|
wrapper = _useWrapper.wrapper,
|
|
45141
46249
|
wrapperStyle = _useWrapper.wrapperStyle;
|
|
45142
46250
|
|
|
46251
|
+
var _useZoomModel = uses_useZoomModel(normalizedOptions, {
|
|
46252
|
+
wrapper: wrapper,
|
|
46253
|
+
evChartGroupRef: null
|
|
46254
|
+
}, props.selectedLabel ? selectedLabel : selectedItem),
|
|
46255
|
+
evChartZoomOptions = _useZoomModel.evChartZoomOptions,
|
|
46256
|
+
evChartToolbarRef = _useZoomModel.evChartToolbarRef,
|
|
46257
|
+
createEvChartZoom = _useZoomModel.createEvChartZoom,
|
|
46258
|
+
setOptionsForUseZoom = _useZoomModel.setOptionsForUseZoom,
|
|
46259
|
+
setDataForUseZoom = _useZoomModel.setDataForUseZoom,
|
|
46260
|
+
controlZoomIdx = _useZoomModel.controlZoomIdx,
|
|
46261
|
+
onClickToolbar = _useZoomModel.onClickToolbar;
|
|
46262
|
+
|
|
45143
46263
|
var createChart = function createChart() {
|
|
45144
46264
|
var selected;
|
|
45145
46265
|
|
|
@@ -45149,12 +46269,16 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45149
46269
|
selected = selectSeriesInfo;
|
|
45150
46270
|
}
|
|
45151
46271
|
|
|
45152
|
-
evChart = new chart_core(wrapper.value, normalizedData, normalizedOptions, eventListeners, selectItemInfo, selected);
|
|
46272
|
+
evChart = new chart_core(wrapper.value, normalizedData, normalizedOptions, eventListeners, selectItemInfo, selected, injectBrushSeries);
|
|
45153
46273
|
};
|
|
45154
46274
|
|
|
45155
46275
|
var drawChart = function drawChart() {
|
|
45156
46276
|
if (evChart) {
|
|
45157
46277
|
evChart.init();
|
|
46278
|
+
|
|
46279
|
+
if (!injectIsChartGroup && normalizedOptions.zoom.toolbar.show) {
|
|
46280
|
+
createEvChartZoom();
|
|
46281
|
+
}
|
|
45158
46282
|
}
|
|
45159
46283
|
};
|
|
45160
46284
|
|
|
@@ -45172,6 +46296,10 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45172
46296
|
},
|
|
45173
46297
|
updateLegend: isUpdateLegendType
|
|
45174
46298
|
});
|
|
46299
|
+
|
|
46300
|
+
if (!injectIsChartGroup) {
|
|
46301
|
+
setOptionsForUseZoom(newOpt);
|
|
46302
|
+
}
|
|
45175
46303
|
}, {
|
|
45176
46304
|
deep: true,
|
|
45177
46305
|
flush: 'post'
|
|
@@ -45191,12 +46319,39 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45191
46319
|
},
|
|
45192
46320
|
updateData: isUpdateData
|
|
45193
46321
|
});
|
|
46322
|
+
|
|
46323
|
+
if (!injectIsChartGroup && isUpdateData) {
|
|
46324
|
+
setDataForUseZoom(newData);
|
|
46325
|
+
}
|
|
45194
46326
|
}, {
|
|
45195
46327
|
deep: true,
|
|
45196
46328
|
flush: 'post'
|
|
45197
46329
|
});
|
|
46330
|
+
|
|
46331
|
+
if (injectIsChartGroup && !(injectGroupSelectedLabel !== null && injectGroupSelectedLabel !== void 0 && injectGroupSelectedLabel.value)) {
|
|
46332
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46333
|
+
return injectBrushIdx.start;
|
|
46334
|
+
}, function (curBrushStartIdx, prevBrushStartIdx) {
|
|
46335
|
+
if (selectedLabel !== null && selectedLabel !== void 0 && selectedLabel.value) {
|
|
46336
|
+
for (var idx = 0; idx < selectedLabel.value.dataIndex.length; idx++) {
|
|
46337
|
+
if (curBrushStartIdx >= (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0)) {
|
|
46338
|
+
selectedLabel.value.dataIndex[idx] -= curBrushStartIdx - (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0);
|
|
46339
|
+
} else {
|
|
46340
|
+
selectedLabel.value.dataIndex[idx] += prevBrushStartIdx - curBrushStartIdx;
|
|
46341
|
+
}
|
|
46342
|
+
}
|
|
46343
|
+
} else if (selectedItem !== null && selectedItem !== void 0 && selectedItem.value) {
|
|
46344
|
+
if (curBrushStartIdx >= (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0)) {
|
|
46345
|
+
selectedItem.value.dataIndex -= curBrushStartIdx - (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0);
|
|
46346
|
+
} else {
|
|
46347
|
+
selectedItem.value.dataIndex += prevBrushStartIdx - curBrushStartIdx;
|
|
46348
|
+
}
|
|
46349
|
+
}
|
|
46350
|
+
});
|
|
46351
|
+
}
|
|
46352
|
+
|
|
45198
46353
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
45199
|
-
return
|
|
46354
|
+
return selectedItem.value;
|
|
45200
46355
|
}, function (newValue) {
|
|
45201
46356
|
var chartType = props.options.type;
|
|
45202
46357
|
evChart.selectItemByData(newValue, chartType);
|
|
@@ -45205,7 +46360,9 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45205
46360
|
flush: 'post'
|
|
45206
46361
|
});
|
|
45207
46362
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
45208
|
-
|
|
46363
|
+
var _injectGroupSelectedL;
|
|
46364
|
+
|
|
46365
|
+
return (_injectGroupSelectedL = injectGroupSelectedLabel === null || injectGroupSelectedLabel === void 0 ? void 0 : injectGroupSelectedLabel.value) !== null && _injectGroupSelectedL !== void 0 ? _injectGroupSelectedL : selectedLabel.value;
|
|
45209
46366
|
}, function (newValue) {
|
|
45210
46367
|
if (newValue.dataIndex) {
|
|
45211
46368
|
evChart.renderWithSelected(newValue.dataIndex);
|
|
@@ -45224,6 +46381,19 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45224
46381
|
deep: true,
|
|
45225
46382
|
flush: 'post'
|
|
45226
46383
|
});
|
|
46384
|
+
|
|
46385
|
+
if (!injectIsChartGroup) {
|
|
46386
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46387
|
+
return [props.zoomStartIdx, props.zoomEndIdx];
|
|
46388
|
+
}, function (_ref) {
|
|
46389
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
46390
|
+
zoomStartIdx = _ref2[0],
|
|
46391
|
+
zoomEndIdx = _ref2[1];
|
|
46392
|
+
|
|
46393
|
+
controlZoomIdx(zoomStartIdx, zoomEndIdx);
|
|
46394
|
+
});
|
|
46395
|
+
}
|
|
46396
|
+
|
|
45227
46397
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
45228
46398
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
45229
46399
|
while (1) {
|
|
@@ -45275,14 +46445,19 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45275
46445
|
wrapper: wrapper,
|
|
45276
46446
|
wrapperStyle: wrapperStyle,
|
|
45277
46447
|
onResize: onResize,
|
|
45278
|
-
redraw: redraw
|
|
46448
|
+
redraw: redraw,
|
|
46449
|
+
evChartToolbarRef: evChartToolbarRef,
|
|
46450
|
+
injectIsChartGroup: injectIsChartGroup,
|
|
46451
|
+
onClickToolbar: onClickToolbar,
|
|
46452
|
+
normalizedOptions: normalizedOptions,
|
|
46453
|
+
zoomOptions: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toRef"])(evChartZoomOptions, 'zoom')
|
|
45279
46454
|
};
|
|
45280
46455
|
}
|
|
45281
46456
|
});
|
|
45282
46457
|
// CONCATENATED MODULE: ./src/components/chart/Chart.vue?vue&type=script&lang=js
|
|
45283
46458
|
|
|
45284
|
-
// EXTERNAL MODULE: ./src/components/chart/Chart.vue?vue&type=style&index=0&id=
|
|
45285
|
-
var
|
|
46459
|
+
// EXTERNAL MODULE: ./src/components/chart/Chart.vue?vue&type=style&index=0&id=0627777b&lang=scss
|
|
46460
|
+
var Chartvue_type_style_index_0_id_0627777b_lang_scss = __webpack_require__("74f8");
|
|
45286
46461
|
|
|
45287
46462
|
// CONCATENATED MODULE: ./src/components/chart/Chart.vue
|
|
45288
46463
|
|
|
@@ -45292,7 +46467,7 @@ var Chartvue_type_style_index_0_id_ca3428ac_lang_scss = __webpack_require__("e83
|
|
|
45292
46467
|
|
|
45293
46468
|
|
|
45294
46469
|
|
|
45295
|
-
const Chart_exports_ = /*#__PURE__*/exportHelper_default()(Chartvue_type_script_lang_js, [['render',
|
|
46470
|
+
const Chart_exports_ = /*#__PURE__*/exportHelper_default()(Chartvue_type_script_lang_js, [['render',Chartvue_type_template_id_0627777b_render]])
|
|
45296
46471
|
|
|
45297
46472
|
/* harmony default export */ var Chart = (Chart_exports_);
|
|
45298
46473
|
// CONCATENATED MODULE: ./src/components/chart/index.js
|
|
@@ -45306,6 +46481,1104 @@ Chart.install = function (app) {
|
|
|
45306
46481
|
};
|
|
45307
46482
|
|
|
45308
46483
|
/* harmony default export */ var chart = (Chart);
|
|
46484
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/chartGroup/ChartGroup.vue?vue&type=template&id=bd8c6660&scoped=true
|
|
46485
|
+
|
|
46486
|
+
|
|
46487
|
+
var ChartGroupvue_type_template_id_bd8c6660_scoped_true_withId = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withScopeId"])("data-v-bd8c6660");
|
|
46488
|
+
|
|
46489
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-bd8c6660");
|
|
46490
|
+
|
|
46491
|
+
var ChartGroupvue_type_template_id_bd8c6660_scoped_true_hoisted_1 = {
|
|
46492
|
+
key: 0,
|
|
46493
|
+
ref: "evChartToolbarRef"
|
|
46494
|
+
};
|
|
46495
|
+
var ChartGroupvue_type_template_id_bd8c6660_scoped_true_hoisted_2 = {
|
|
46496
|
+
ref: "evChartGroupRef",
|
|
46497
|
+
class: "ev-chart-group__wrapper"
|
|
46498
|
+
};
|
|
46499
|
+
|
|
46500
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])();
|
|
46501
|
+
|
|
46502
|
+
var ChartGroupvue_type_template_id_bd8c6660_scoped_true_render = /*#__PURE__*/ChartGroupvue_type_template_id_bd8c6660_scoped_true_withId(function (_ctx, _cache, $props, $setup, $data, $options) {
|
|
46503
|
+
var _component_ev_chart_toolbar = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ev-chart-toolbar");
|
|
46504
|
+
|
|
46505
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [$setup.zoomOptions.toolbar.show ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", ChartGroupvue_type_template_id_bd8c6660_scoped_true_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ev_chart_toolbar, {
|
|
46506
|
+
toolbar: $setup.zoomOptions.toolbar,
|
|
46507
|
+
onOnClickToolbar: $setup.onClickToolbar
|
|
46508
|
+
}, null, 8, ["toolbar", "onOnClickToolbar"])], 512)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", ChartGroupvue_type_template_id_bd8c6660_scoped_true_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 512)], 64);
|
|
46509
|
+
});
|
|
46510
|
+
// CONCATENATED MODULE: ./src/components/chartGroup/ChartGroup.vue?vue&type=template&id=bd8c6660&scoped=true
|
|
46511
|
+
|
|
46512
|
+
// CONCATENATED MODULE: ./src/components/chartGroup/uses.js
|
|
46513
|
+
|
|
46514
|
+
|
|
46515
|
+
var uses_DEFAULT_OPTIONS = {
|
|
46516
|
+
zoom: {
|
|
46517
|
+
bufferMemoryCnt: 100,
|
|
46518
|
+
toolbar: {
|
|
46519
|
+
show: false,
|
|
46520
|
+
items: {
|
|
46521
|
+
previous: {
|
|
46522
|
+
icon: 'ev-icon-allow2-left',
|
|
46523
|
+
size: 'medium',
|
|
46524
|
+
title: 'Previous'
|
|
46525
|
+
},
|
|
46526
|
+
latest: {
|
|
46527
|
+
icon: 'ev-icon-allow2-right',
|
|
46528
|
+
size: 'medium',
|
|
46529
|
+
title: 'Latest'
|
|
46530
|
+
},
|
|
46531
|
+
reset: {
|
|
46532
|
+
icon: 'ev-icon-redo',
|
|
46533
|
+
size: 'medium',
|
|
46534
|
+
title: 'Reset'
|
|
46535
|
+
},
|
|
46536
|
+
dragZoom: {
|
|
46537
|
+
icon: 'ev-icon-zoomin',
|
|
46538
|
+
size: 'medium',
|
|
46539
|
+
title: 'Drag Zoom'
|
|
46540
|
+
}
|
|
46541
|
+
}
|
|
46542
|
+
}
|
|
46543
|
+
}
|
|
46544
|
+
}; // eslint-disable-next-line import/prefer-default-export
|
|
46545
|
+
|
|
46546
|
+
var uses_useGroupModel = function useGroupModel() {
|
|
46547
|
+
var isExecuteZoom = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
|
|
46548
|
+
var evChartGroupRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
46549
|
+
var brushSeries = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
46550
|
+
list: [],
|
|
46551
|
+
chartIdx: null
|
|
46552
|
+
});
|
|
46553
|
+
|
|
46554
|
+
var getNormalizedOptions = function getNormalizedOptions(options) {
|
|
46555
|
+
return lodash_es_defaultsDeep({}, options, uses_DEFAULT_OPTIONS);
|
|
46556
|
+
};
|
|
46557
|
+
|
|
46558
|
+
return {
|
|
46559
|
+
getNormalizedOptions: getNormalizedOptions,
|
|
46560
|
+
isExecuteZoom: isExecuteZoom,
|
|
46561
|
+
brushSeries: brushSeries,
|
|
46562
|
+
evChartGroupRef: evChartGroupRef
|
|
46563
|
+
};
|
|
46564
|
+
};
|
|
46565
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/chartGroup/ChartGroup.vue?vue&type=script&lang=js
|
|
46566
|
+
|
|
46567
|
+
|
|
46568
|
+
|
|
46569
|
+
|
|
46570
|
+
|
|
46571
|
+
|
|
46572
|
+
/* harmony default export */ var ChartGroupvue_type_script_lang_js = ({
|
|
46573
|
+
name: 'EvChartGroup',
|
|
46574
|
+
components: {
|
|
46575
|
+
evChartToolbar: ChartToolbar
|
|
46576
|
+
},
|
|
46577
|
+
props: {
|
|
46578
|
+
options: {
|
|
46579
|
+
type: Object,
|
|
46580
|
+
default: function _default() {
|
|
46581
|
+
return {};
|
|
46582
|
+
}
|
|
46583
|
+
},
|
|
46584
|
+
zoomStartIdx: {
|
|
46585
|
+
type: Number,
|
|
46586
|
+
default: 0
|
|
46587
|
+
},
|
|
46588
|
+
zoomEndIdx: {
|
|
46589
|
+
type: Number,
|
|
46590
|
+
default: 0
|
|
46591
|
+
},
|
|
46592
|
+
groupSelectedLabel: {
|
|
46593
|
+
type: Object,
|
|
46594
|
+
default: null
|
|
46595
|
+
}
|
|
46596
|
+
},
|
|
46597
|
+
emits: ['update:zoomStartIdx', 'update:zoomEndIdx'],
|
|
46598
|
+
setup: function setup(props) {
|
|
46599
|
+
var _useGroupModel = uses_useGroupModel(),
|
|
46600
|
+
getNormalizedOptions = _useGroupModel.getNormalizedOptions,
|
|
46601
|
+
isExecuteZoom = _useGroupModel.isExecuteZoom,
|
|
46602
|
+
brushSeries = _useGroupModel.brushSeries,
|
|
46603
|
+
evChartGroupRef = _useGroupModel.evChartGroupRef;
|
|
46604
|
+
|
|
46605
|
+
var normalizedOptions = getNormalizedOptions(props.options);
|
|
46606
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('isExecuteZoom', isExecuteZoom);
|
|
46607
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('isChartGroup', true);
|
|
46608
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('brushSeries', brushSeries);
|
|
46609
|
+
var groupSelectedLabel = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
46610
|
+
return props.groupSelectedLabel;
|
|
46611
|
+
});
|
|
46612
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('groupSelectedLabel', groupSelectedLabel);
|
|
46613
|
+
|
|
46614
|
+
var _useZoomModel = uses_useZoomModel(normalizedOptions, {
|
|
46615
|
+
wrapper: null,
|
|
46616
|
+
evChartGroupRef: evChartGroupRef
|
|
46617
|
+
}, groupSelectedLabel),
|
|
46618
|
+
evChartZoomOptions = _useZoomModel.evChartZoomOptions,
|
|
46619
|
+
evChartInfo = _useZoomModel.evChartInfo,
|
|
46620
|
+
evChartToolbarRef = _useZoomModel.evChartToolbarRef,
|
|
46621
|
+
evChartClone = _useZoomModel.evChartClone,
|
|
46622
|
+
brushIdx = _useZoomModel.brushIdx,
|
|
46623
|
+
createEvChartZoom = _useZoomModel.createEvChartZoom,
|
|
46624
|
+
setOptionsForUseZoom = _useZoomModel.setOptionsForUseZoom,
|
|
46625
|
+
setDataForUseZoom = _useZoomModel.setDataForUseZoom,
|
|
46626
|
+
controlZoomIdx = _useZoomModel.controlZoomIdx,
|
|
46627
|
+
onClickToolbar = _useZoomModel.onClickToolbar;
|
|
46628
|
+
|
|
46629
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('evChartClone', evChartClone);
|
|
46630
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('evChartInfo', evChartInfo);
|
|
46631
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('brushIdx', brushIdx);
|
|
46632
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
46633
|
+
createEvChartZoom();
|
|
46634
|
+
});
|
|
46635
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46636
|
+
return evChartInfo.props.data;
|
|
46637
|
+
}, function (evChartProps) {
|
|
46638
|
+
setDataForUseZoom(evChartProps);
|
|
46639
|
+
}, {
|
|
46640
|
+
deep: true
|
|
46641
|
+
});
|
|
46642
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46643
|
+
return props.options;
|
|
46644
|
+
}, function (zoomOptions) {
|
|
46645
|
+
var newOpt = getNormalizedOptions(zoomOptions);
|
|
46646
|
+
setOptionsForUseZoom(newOpt);
|
|
46647
|
+
}, {
|
|
46648
|
+
deep: true
|
|
46649
|
+
});
|
|
46650
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46651
|
+
return [props.zoomStartIdx, props.zoomEndIdx];
|
|
46652
|
+
}, function (_ref) {
|
|
46653
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
46654
|
+
zoomStartIdx = _ref2[0],
|
|
46655
|
+
zoomEndIdx = _ref2[1];
|
|
46656
|
+
|
|
46657
|
+
if (brushIdx.isUseButton || brushIdx.isUseScroll) {
|
|
46658
|
+
return;
|
|
46659
|
+
}
|
|
46660
|
+
|
|
46661
|
+
controlZoomIdx(zoomStartIdx, zoomEndIdx);
|
|
46662
|
+
});
|
|
46663
|
+
return {
|
|
46664
|
+
evChartGroupRef: evChartGroupRef,
|
|
46665
|
+
evChartToolbarRef: evChartToolbarRef,
|
|
46666
|
+
zoomOptions: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toRef"])(evChartZoomOptions, 'zoom'),
|
|
46667
|
+
onClickToolbar: onClickToolbar
|
|
46668
|
+
};
|
|
46669
|
+
}
|
|
46670
|
+
});
|
|
46671
|
+
// CONCATENATED MODULE: ./src/components/chartGroup/ChartGroup.vue?vue&type=script&lang=js
|
|
46672
|
+
|
|
46673
|
+
// EXTERNAL MODULE: ./src/components/chartGroup/ChartGroup.vue?vue&type=style&index=0&id=bd8c6660&lang=scss&scoped=true
|
|
46674
|
+
var ChartGroupvue_type_style_index_0_id_bd8c6660_lang_scss_scoped_true = __webpack_require__("8352");
|
|
46675
|
+
|
|
46676
|
+
// CONCATENATED MODULE: ./src/components/chartGroup/ChartGroup.vue
|
|
46677
|
+
|
|
46678
|
+
|
|
46679
|
+
|
|
46680
|
+
|
|
46681
|
+
|
|
46682
|
+
|
|
46683
|
+
|
|
46684
|
+
const ChartGroup_exports_ = /*#__PURE__*/exportHelper_default()(ChartGroupvue_type_script_lang_js, [['render',ChartGroupvue_type_template_id_bd8c6660_scoped_true_render],['__scopeId',"data-v-bd8c6660"]])
|
|
46685
|
+
|
|
46686
|
+
/* harmony default export */ var ChartGroup = (ChartGroup_exports_);
|
|
46687
|
+
// CONCATENATED MODULE: ./src/components/chartGroup/index.js
|
|
46688
|
+
|
|
46689
|
+
|
|
46690
|
+
|
|
46691
|
+
|
|
46692
|
+
ChartGroup.install = function (app) {
|
|
46693
|
+
app.component(ChartGroup.name, ChartGroup);
|
|
46694
|
+
app.use(dist_default.a);
|
|
46695
|
+
};
|
|
46696
|
+
|
|
46697
|
+
/* harmony default export */ var chartGroup = (ChartGroup);
|
|
46698
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/chartBrush/ChartBrush.vue?vue&type=template&id=7d0c10ab
|
|
46699
|
+
|
|
46700
|
+
function ChartBrushvue_type_template_id_7d0c10ab_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
46701
|
+
var _directive_resize = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("resize");
|
|
46702
|
+
|
|
46703
|
+
return $setup.evChartBrushOptions.show ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", {
|
|
46704
|
+
key: 0,
|
|
46705
|
+
ref: "evChartBrushRef",
|
|
46706
|
+
style: $setup.evChartBrushStyle,
|
|
46707
|
+
class: "ev-chart-brush"
|
|
46708
|
+
}, null, 4)), [[_directive_resize, $setup.onResize]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true);
|
|
46709
|
+
}
|
|
46710
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/ChartBrush.vue?vue&type=template&id=7d0c10ab
|
|
46711
|
+
|
|
46712
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/chartBrush.core.js
|
|
46713
|
+
|
|
46714
|
+
|
|
46715
|
+
|
|
46716
|
+
|
|
46717
|
+
|
|
46718
|
+
|
|
46719
|
+
var chartBrush_core_EvChartBrush = /*#__PURE__*/function () {
|
|
46720
|
+
function EvChartBrush(evChart, evChartData, evChartBrushOptions, brushIdx, evChartBrushRef) {
|
|
46721
|
+
_classCallCheck(this, EvChartBrush);
|
|
46722
|
+
|
|
46723
|
+
this.evChart = evChart;
|
|
46724
|
+
this.evChartData = evChartData;
|
|
46725
|
+
this.evChartBrushOptions = evChartBrushOptions;
|
|
46726
|
+
this.evChartBrushRef = evChartBrushRef;
|
|
46727
|
+
this.brushIdx = brushIdx;
|
|
46728
|
+
|
|
46729
|
+
if (evChartBrushOptions.value.useDebounce) {
|
|
46730
|
+
this.debounceBrushIdx = {
|
|
46731
|
+
start: brushIdx.start,
|
|
46732
|
+
end: brushIdx.end
|
|
46733
|
+
};
|
|
46734
|
+
}
|
|
46735
|
+
}
|
|
46736
|
+
|
|
46737
|
+
_createClass(EvChartBrush, [{
|
|
46738
|
+
key: "init",
|
|
46739
|
+
value: function init(isResize) {
|
|
46740
|
+
if (this.brushIdx.start > this.brushIdx.end) {
|
|
46741
|
+
this.initEventState();
|
|
46742
|
+
this.removeBrushCanvas();
|
|
46743
|
+
return;
|
|
46744
|
+
}
|
|
46745
|
+
|
|
46746
|
+
var existedBrushCanvas = this.evChartBrushRef.value.querySelector('.brush-canvas');
|
|
46747
|
+
|
|
46748
|
+
if (!existedBrushCanvas) {
|
|
46749
|
+
var brushCanvas = document.createElement('canvas');
|
|
46750
|
+
brushCanvas.setAttribute('class', 'brush-canvas');
|
|
46751
|
+
brushCanvas.setAttribute('style', 'display: block; z-index: 1;');
|
|
46752
|
+
var evChartBrushContainer = this.evChartBrushRef.value.querySelector('.ev-chart-brush-container');
|
|
46753
|
+
|
|
46754
|
+
if (evChartBrushContainer) {
|
|
46755
|
+
this.brushCanvas = brushCanvas;
|
|
46756
|
+
evChartBrushContainer.appendChild(brushCanvas);
|
|
46757
|
+
this.evChartBrushContainer = evChartBrushContainer;
|
|
46758
|
+
this.drawBrushRect({
|
|
46759
|
+
brushCanvas: brushCanvas
|
|
46760
|
+
});
|
|
46761
|
+
this.addEvent(brushCanvas);
|
|
46762
|
+
}
|
|
46763
|
+
} else {
|
|
46764
|
+
this.drawBrushRect({
|
|
46765
|
+
brushCanvas: existedBrushCanvas,
|
|
46766
|
+
isResize: isResize
|
|
46767
|
+
});
|
|
46768
|
+
}
|
|
46769
|
+
}
|
|
46770
|
+
}, {
|
|
46771
|
+
key: "drawBrushRect",
|
|
46772
|
+
value: function drawBrushRect(_ref) {
|
|
46773
|
+
var _this$debounceBrushId;
|
|
46774
|
+
|
|
46775
|
+
var brushCanvas = _ref.brushCanvas,
|
|
46776
|
+
isResize = _ref.isResize,
|
|
46777
|
+
isDebounce = _ref.isDebounce;
|
|
46778
|
+
var _this$evChart = this.evChart,
|
|
46779
|
+
chartRect = _this$evChart.chartRect,
|
|
46780
|
+
labelOffset = _this$evChart.labelOffset;
|
|
46781
|
+
|
|
46782
|
+
if (!chartRect && !labelOffset) {
|
|
46783
|
+
return;
|
|
46784
|
+
}
|
|
46785
|
+
|
|
46786
|
+
var evChartRange = {
|
|
46787
|
+
x1: chartRect.x1 + labelOffset.left,
|
|
46788
|
+
x2: chartRect.x2 - labelOffset.right,
|
|
46789
|
+
y1: chartRect.y1 + labelOffset.top,
|
|
46790
|
+
y2: chartRect.y2 - labelOffset.bottom
|
|
46791
|
+
};
|
|
46792
|
+
var pixelRatio = window.devicePixelRatio || 1;
|
|
46793
|
+
var brushButtonWidth = 6;
|
|
46794
|
+
var brushCanvasWidth = evChartRange.x2 - evChartRange.x1 + brushButtonWidth;
|
|
46795
|
+
var brushCanvasHeight = evChartRange.y2 - evChartRange.y1;
|
|
46796
|
+
var isEqualWidth = brushCanvas.width === Math.floor(brushCanvasWidth * pixelRatio);
|
|
46797
|
+
|
|
46798
|
+
if (isResize && isEqualWidth) {
|
|
46799
|
+
return;
|
|
46800
|
+
}
|
|
46801
|
+
|
|
46802
|
+
if (!isDebounce && this.debounceBrushIdx) {
|
|
46803
|
+
this.debounceBrushIdx.start = this.brushIdx.start;
|
|
46804
|
+
this.debounceBrushIdx.end = this.brushIdx.end;
|
|
46805
|
+
}
|
|
46806
|
+
|
|
46807
|
+
var brushIdx = (_this$debounceBrushId = this.debounceBrushIdx) !== null && _this$debounceBrushId !== void 0 ? _this$debounceBrushId : this.brushIdx;
|
|
46808
|
+
var labelEndIdx = this.evChartData.value.labels.length - 1;
|
|
46809
|
+
|
|
46810
|
+
if (labelEndIdx >= 0) {
|
|
46811
|
+
this.labelEndIdx = labelEndIdx;
|
|
46812
|
+
var axesXInterval = (evChartRange.x2 - evChartRange.x1) / labelEndIdx;
|
|
46813
|
+
var brushRectX = brushIdx.start * axesXInterval * pixelRatio;
|
|
46814
|
+
var brushRectWidth = (brushCanvasWidth - (labelEndIdx - (brushIdx.end - brushIdx.start)) * axesXInterval) * pixelRatio;
|
|
46815
|
+
var brushRectHeight = this.evChartBrushOptions.value.height - evChartRange.y1;
|
|
46816
|
+
var brushButtonLeftXPos = brushRectX;
|
|
46817
|
+
var brushButtonRightXPos = brushRectX + brushRectWidth;
|
|
46818
|
+
|
|
46819
|
+
if (!brushCanvas.style.position) {
|
|
46820
|
+
brushCanvas.style.position = 'absolute';
|
|
46821
|
+
brushCanvas.style.top = "".concat(evChartRange.y1, "px");
|
|
46822
|
+
brushCanvas.style.left = "".concat(evChartRange.x1 - brushButtonWidth / 2, "px");
|
|
46823
|
+
}
|
|
46824
|
+
|
|
46825
|
+
if (!isEqualWidth) {
|
|
46826
|
+
brushCanvas.width = brushCanvasWidth * pixelRatio;
|
|
46827
|
+
brushCanvas.style.width = "".concat(brushCanvasWidth, "px");
|
|
46828
|
+
brushCanvas.height = brushCanvasHeight * pixelRatio;
|
|
46829
|
+
brushCanvas.style.height = "".concat(brushCanvasHeight, "px");
|
|
46830
|
+
}
|
|
46831
|
+
|
|
46832
|
+
var ctx = brushCanvas.getContext('2d');
|
|
46833
|
+
ctx.clearRect(0, 0, brushCanvasWidth * pixelRatio, brushCanvasHeight * pixelRatio);
|
|
46834
|
+
ctx.fillStyle = this.evChartBrushOptions.value.selection.fillColor;
|
|
46835
|
+
ctx.globalAlpha = this.evChartBrushOptions.value.selection.opacity;
|
|
46836
|
+
ctx.fillRect(brushRectX, 0, brushRectWidth, brushRectHeight);
|
|
46837
|
+
ctx.fillRect(brushButtonLeftXPos, 0, brushButtonWidth, brushRectHeight);
|
|
46838
|
+
ctx.fillRect(brushButtonRightXPos - brushButtonWidth, 0, brushButtonWidth, brushRectHeight);
|
|
46839
|
+
this.evChartBrushPos = {
|
|
46840
|
+
leftX: brushButtonLeftXPos / pixelRatio,
|
|
46841
|
+
rightX: brushButtonRightXPos / pixelRatio,
|
|
46842
|
+
buttonWidth: brushButtonWidth,
|
|
46843
|
+
axesXInterval: axesXInterval
|
|
46844
|
+
};
|
|
46845
|
+
}
|
|
46846
|
+
}
|
|
46847
|
+
}, {
|
|
46848
|
+
key: "addEvent",
|
|
46849
|
+
value: function addEvent() {
|
|
46850
|
+
var _this = this;
|
|
46851
|
+
|
|
46852
|
+
var mousePosition;
|
|
46853
|
+
|
|
46854
|
+
this.onMouseDown = function (e) {
|
|
46855
|
+
e.preventDefault();
|
|
46856
|
+
|
|
46857
|
+
if (mousePosition.isInsideButton) {
|
|
46858
|
+
_this.clickBrushInsideX = -1;
|
|
46859
|
+
} else if (mousePosition.isInsideBrush) {
|
|
46860
|
+
_this.clickBrushInsideX = e.offsetX;
|
|
46861
|
+
} else if (mousePosition.isOutsideBrush) {
|
|
46862
|
+
_this.teleportBrush(e);
|
|
46863
|
+
}
|
|
46864
|
+
};
|
|
46865
|
+
|
|
46866
|
+
var onMouseMove = function onMouseMove(e) {
|
|
46867
|
+
if (_this.clickBrushInsideX) {
|
|
46868
|
+
_this.mouseDownAndMove(e);
|
|
46869
|
+
} else {
|
|
46870
|
+
mousePosition = _this.getMousePosition(e);
|
|
46871
|
+
|
|
46872
|
+
_this.changeCursor(mousePosition);
|
|
46873
|
+
}
|
|
46874
|
+
};
|
|
46875
|
+
|
|
46876
|
+
this.onMouseMove = lodash_es_throttle(onMouseMove, 5);
|
|
46877
|
+
|
|
46878
|
+
this.onWheel = function (e) {
|
|
46879
|
+
e.preventDefault();
|
|
46880
|
+
|
|
46881
|
+
_this.updateBrushIdx(e.deltaY > 0 ? 'movedown' : 'moveup');
|
|
46882
|
+
};
|
|
46883
|
+
|
|
46884
|
+
this.onMouseUp = function () {
|
|
46885
|
+
_this.initEventState();
|
|
46886
|
+
};
|
|
46887
|
+
|
|
46888
|
+
this.onMouseLeave = function () {
|
|
46889
|
+
if (_this.clickBrushInsideX) {
|
|
46890
|
+
_this.initEventState();
|
|
46891
|
+
}
|
|
46892
|
+
};
|
|
46893
|
+
|
|
46894
|
+
var onWheelDebounce = function onWheelDebounce() {
|
|
46895
|
+
_this.initEventState();
|
|
46896
|
+
};
|
|
46897
|
+
|
|
46898
|
+
this.onWheelDebounce = lodash_es_debounce(onWheelDebounce, 100);
|
|
46899
|
+
this.setEventListener('addEventListener');
|
|
46900
|
+
}
|
|
46901
|
+
}, {
|
|
46902
|
+
key: "getMousePosition",
|
|
46903
|
+
value: function getMousePosition(e) {
|
|
46904
|
+
var _this2 = this;
|
|
46905
|
+
|
|
46906
|
+
var calDisToCurMouseX = function calDisToCurMouseX(xPos) {
|
|
46907
|
+
return Math.abs(_this2.evChartBrushPos[xPos] - e.offsetX);
|
|
46908
|
+
};
|
|
46909
|
+
|
|
46910
|
+
var buttonType = calDisToCurMouseX('rightX') > calDisToCurMouseX('leftX') ? 'leftX' : 'rightX';
|
|
46911
|
+
this.curBrushButtonType = buttonType;
|
|
46912
|
+
|
|
46913
|
+
var isMoveRight = function isMoveRight(xPos) {
|
|
46914
|
+
return e.offsetX > _this2.evChartBrushPos[xPos];
|
|
46915
|
+
};
|
|
46916
|
+
|
|
46917
|
+
var isMoveLeft = function isMoveLeft(xPos) {
|
|
46918
|
+
return e.offsetX < _this2.evChartBrushPos[xPos];
|
|
46919
|
+
};
|
|
46920
|
+
|
|
46921
|
+
var isOutsideBrush = isMoveLeft('leftX') || isMoveRight('rightX');
|
|
46922
|
+
var isInsideBrush = isMoveRight('leftX') && isMoveLeft('rightX');
|
|
46923
|
+
var isInsideButton = e.offsetX + this.evChartBrushPos.buttonWidth >= this.evChartBrushPos[buttonType] && e.offsetX - this.evChartBrushPos.buttonWidth <= this.evChartBrushPos[buttonType];
|
|
46924
|
+
return {
|
|
46925
|
+
isInsideButton: isInsideButton,
|
|
46926
|
+
isInsideBrush: isInsideBrush,
|
|
46927
|
+
isOutsideBrush: isOutsideBrush
|
|
46928
|
+
};
|
|
46929
|
+
}
|
|
46930
|
+
}, {
|
|
46931
|
+
key: "destroy",
|
|
46932
|
+
value: function destroy() {
|
|
46933
|
+
if (this.brushCanvas) {
|
|
46934
|
+
this.setEventListener('removeEventListener');
|
|
46935
|
+
this.brushCanvas = null;
|
|
46936
|
+
}
|
|
46937
|
+
|
|
46938
|
+
var evChartBrushContainer = this.evChartBrushContainer;
|
|
46939
|
+
|
|
46940
|
+
while (evChartBrushContainer.hasChildNodes()) {
|
|
46941
|
+
evChartBrushContainer.removeChild(evChartBrushContainer.firstChild);
|
|
46942
|
+
}
|
|
46943
|
+
}
|
|
46944
|
+
/**
|
|
46945
|
+
* @param {string} type eventListener setting type.
|
|
46946
|
+
*
|
|
46947
|
+
* @returns {undefined}
|
|
46948
|
+
*/
|
|
46949
|
+
|
|
46950
|
+
}, {
|
|
46951
|
+
key: "setEventListener",
|
|
46952
|
+
value: function setEventListener(type) {
|
|
46953
|
+
this.brushCanvas[type]('mousemove', this.onMouseMove);
|
|
46954
|
+
this.brushCanvas[type]('mousedown', this.onMouseDown);
|
|
46955
|
+
this.brushCanvas[type]('mouseup', this.onMouseUp);
|
|
46956
|
+
this.brushCanvas[type]('mouseleave', this.onMouseLeave);
|
|
46957
|
+
this.brushCanvas[type]('wheel', this.onWheel);
|
|
46958
|
+
this.brushCanvas[type]('wheel', this.onWheelDebounce);
|
|
46959
|
+
}
|
|
46960
|
+
}, {
|
|
46961
|
+
key: "removeBrushWrapper",
|
|
46962
|
+
value: function removeBrushWrapper() {
|
|
46963
|
+
if (this.evChartBrushRef.value) {
|
|
46964
|
+
var evChartBrushWrapper = this.evChartBrushRef.value.querySelector('.ev-chart-brush-wrapper');
|
|
46965
|
+
|
|
46966
|
+
if (evChartBrushWrapper) {
|
|
46967
|
+
this.evChartBrushRef.value.removeChild(evChartBrushWrapper);
|
|
46968
|
+
}
|
|
46969
|
+
}
|
|
46970
|
+
}
|
|
46971
|
+
}, {
|
|
46972
|
+
key: "removeBrushCanvas",
|
|
46973
|
+
value: function removeBrushCanvas() {
|
|
46974
|
+
if (this.evChartBrushContainer) {
|
|
46975
|
+
var brushCanvas = this.evChartBrushContainer.querySelector('.brush-canvas');
|
|
46976
|
+
|
|
46977
|
+
if (brushCanvas) {
|
|
46978
|
+
this.evChartBrushContainer.removeChild(brushCanvas);
|
|
46979
|
+
}
|
|
46980
|
+
}
|
|
46981
|
+
}
|
|
46982
|
+
}, {
|
|
46983
|
+
key: "teleportBrush",
|
|
46984
|
+
value: function teleportBrush(e) {
|
|
46985
|
+
var _this$debounceBrushId2;
|
|
46986
|
+
|
|
46987
|
+
var brushIdx = (_this$debounceBrushId2 = this.debounceBrushIdx) !== null && _this$debounceBrushId2 !== void 0 ? _this$debounceBrushId2 : this.brushIdx;
|
|
46988
|
+
var middle = (brushIdx.end - brushIdx.start) / 2;
|
|
46989
|
+
var left;
|
|
46990
|
+
var right;
|
|
46991
|
+
var clickIdx;
|
|
46992
|
+
|
|
46993
|
+
if (middle > 0.5) {
|
|
46994
|
+
if ((brushIdx.end - brushIdx.start) % 2 === 0) {
|
|
46995
|
+
clickIdx = Math.round(e.offsetX / this.evChartBrushPos.axesXInterval);
|
|
46996
|
+
left = Math.ceil(middle);
|
|
46997
|
+
right = Math.floor(middle);
|
|
46998
|
+
} else {
|
|
46999
|
+
clickIdx = Math.ceil(e.offsetX / this.evChartBrushPos.axesXInterval);
|
|
47000
|
+
left = Math.ceil(middle);
|
|
47001
|
+
right = Math.floor(middle);
|
|
47002
|
+
}
|
|
47003
|
+
} else {
|
|
47004
|
+
clickIdx = Math.floor(e.offsetX / this.evChartBrushPos.axesXInterval);
|
|
47005
|
+
|
|
47006
|
+
if (e.offsetX - clickIdx * this.evChartBrushPos.axesXInterval > this.evChartBrushPos.axesXInterval / 2) {
|
|
47007
|
+
left = Math.floor(middle);
|
|
47008
|
+
right = Math.ceil(middle);
|
|
47009
|
+
} else {
|
|
47010
|
+
left = Math.ceil(middle);
|
|
47011
|
+
right = Math.floor(middle);
|
|
47012
|
+
|
|
47013
|
+
if (middle < 1) {
|
|
47014
|
+
clickIdx += 1;
|
|
47015
|
+
}
|
|
47016
|
+
}
|
|
47017
|
+
}
|
|
47018
|
+
|
|
47019
|
+
if (clickIdx - left <= 0) {
|
|
47020
|
+
brushIdx.start = 0;
|
|
47021
|
+
brushIdx.end = right + left;
|
|
47022
|
+
} else if (clickIdx + right >= this.labelEndIdx) {
|
|
47023
|
+
brushIdx.start = this.labelEndIdx - right - left;
|
|
47024
|
+
brushIdx.end = this.labelEndIdx;
|
|
47025
|
+
} else {
|
|
47026
|
+
brushIdx.start = clickIdx - left;
|
|
47027
|
+
brushIdx.end = clickIdx + right;
|
|
47028
|
+
}
|
|
47029
|
+
|
|
47030
|
+
this.brushIdx.isUseScroll = true;
|
|
47031
|
+
}
|
|
47032
|
+
}, {
|
|
47033
|
+
key: "changeCursor",
|
|
47034
|
+
value: function changeCursor(mousePosition) {
|
|
47035
|
+
if (mousePosition.isOutsideBrush) {
|
|
47036
|
+
this.brushCanvas.style.cursor = 'pointer';
|
|
47037
|
+
} else if (mousePosition.isInsideBrush) {
|
|
47038
|
+
if (mousePosition.isInsideButton) {
|
|
47039
|
+
this.brushCanvas.style.cursor = 'ew-resize';
|
|
47040
|
+
} else {
|
|
47041
|
+
this.brushCanvas.style.cursor = 'grab';
|
|
47042
|
+
}
|
|
47043
|
+
}
|
|
47044
|
+
}
|
|
47045
|
+
}, {
|
|
47046
|
+
key: "mouseDownAndMove",
|
|
47047
|
+
value: function mouseDownAndMove(e) {
|
|
47048
|
+
var moveSensitive = this.evChartBrushPos.axesXInterval / 3;
|
|
47049
|
+
var mode;
|
|
47050
|
+
|
|
47051
|
+
if (e.offsetX > this.beforeMouseXPos) {
|
|
47052
|
+
// 오른쪽 이동
|
|
47053
|
+
if (this.clickBrushInsideX > 0) {
|
|
47054
|
+
if (this.clickBrushInsideX < e.offsetX - moveSensitive) {
|
|
47055
|
+
mode = 'moveup';
|
|
47056
|
+
this.clickBrushInsideX = e.offsetX + moveSensitive;
|
|
47057
|
+
}
|
|
47058
|
+
} else {
|
|
47059
|
+
var isMoveRight = e.offsetX - this.evChartBrushPos[this.curBrushButtonType] > moveSensitive;
|
|
47060
|
+
|
|
47061
|
+
if (isMoveRight) {
|
|
47062
|
+
mode = this.curBrushButtonType === 'leftX' ? 'decrease' : 'increase';
|
|
47063
|
+
}
|
|
47064
|
+
}
|
|
47065
|
+
} else if (e.offsetX < this.beforeMouseXPos) {
|
|
47066
|
+
// 왼쪽 이동
|
|
47067
|
+
if (this.clickBrushInsideX > 0) {
|
|
47068
|
+
if (this.clickBrushInsideX > e.offsetX + moveSensitive) {
|
|
47069
|
+
mode = 'movedown';
|
|
47070
|
+
this.clickBrushInsideX = e.offsetX - moveSensitive;
|
|
47071
|
+
}
|
|
47072
|
+
} else {
|
|
47073
|
+
var isMoveLeft = this.evChartBrushPos[this.curBrushButtonType] - e.offsetX > moveSensitive;
|
|
47074
|
+
|
|
47075
|
+
if (isMoveLeft) {
|
|
47076
|
+
mode = this.curBrushButtonType === 'leftX' ? 'increase' : 'decrease';
|
|
47077
|
+
}
|
|
47078
|
+
}
|
|
47079
|
+
}
|
|
47080
|
+
|
|
47081
|
+
if (mode) {
|
|
47082
|
+
this.updateBrushIdx(mode);
|
|
47083
|
+
}
|
|
47084
|
+
|
|
47085
|
+
this.beforeMouseXPos = e.offsetX;
|
|
47086
|
+
}
|
|
47087
|
+
/**
|
|
47088
|
+
* @param {string} mode determines how to update the brush index value.
|
|
47089
|
+
*
|
|
47090
|
+
* @returns {undefined}
|
|
47091
|
+
*/
|
|
47092
|
+
|
|
47093
|
+
}, {
|
|
47094
|
+
key: "updateBrushIdx",
|
|
47095
|
+
value: function updateBrushIdx(mode) {
|
|
47096
|
+
var _this$debounceBrushId3;
|
|
47097
|
+
|
|
47098
|
+
var brushIdx = (_this$debounceBrushId3 = this.debounceBrushIdx) !== null && _this$debounceBrushId3 !== void 0 ? _this$debounceBrushId3 : this.brushIdx;
|
|
47099
|
+
|
|
47100
|
+
switch (mode) {
|
|
47101
|
+
case 'moveup':
|
|
47102
|
+
if (brushIdx.end === this.labelEndIdx) {
|
|
47103
|
+
return;
|
|
47104
|
+
}
|
|
47105
|
+
|
|
47106
|
+
brushIdx.start += 1;
|
|
47107
|
+
brushIdx.end += 1;
|
|
47108
|
+
this.brushIdx.isUseScroll = true;
|
|
47109
|
+
break;
|
|
47110
|
+
|
|
47111
|
+
case 'movedown':
|
|
47112
|
+
if (!brushIdx.start) {
|
|
47113
|
+
return;
|
|
47114
|
+
}
|
|
47115
|
+
|
|
47116
|
+
brushIdx.start -= 1;
|
|
47117
|
+
brushIdx.end -= 1;
|
|
47118
|
+
this.brushIdx.isUseScroll = true;
|
|
47119
|
+
break;
|
|
47120
|
+
|
|
47121
|
+
case 'increase':
|
|
47122
|
+
if (this.curBrushButtonType === 'leftX') {
|
|
47123
|
+
if (!brushIdx.start) {
|
|
47124
|
+
return;
|
|
47125
|
+
}
|
|
47126
|
+
|
|
47127
|
+
brushIdx.start -= 1;
|
|
47128
|
+
} else {
|
|
47129
|
+
if (brushIdx.end === this.labelEndIdx) {
|
|
47130
|
+
return;
|
|
47131
|
+
}
|
|
47132
|
+
|
|
47133
|
+
brushIdx.end += 1;
|
|
47134
|
+
}
|
|
47135
|
+
|
|
47136
|
+
this.brushIdx.isUseButton = true;
|
|
47137
|
+
break;
|
|
47138
|
+
|
|
47139
|
+
case 'decrease':
|
|
47140
|
+
if (brushIdx.start === brushIdx.end - 1) {
|
|
47141
|
+
return;
|
|
47142
|
+
}
|
|
47143
|
+
|
|
47144
|
+
if (this.curBrushButtonType === 'leftX') {
|
|
47145
|
+
brushIdx.start += 1;
|
|
47146
|
+
} else {
|
|
47147
|
+
brushIdx.end -= 1;
|
|
47148
|
+
}
|
|
47149
|
+
|
|
47150
|
+
this.brushIdx.isUseButton = true;
|
|
47151
|
+
break;
|
|
47152
|
+
|
|
47153
|
+
default:
|
|
47154
|
+
break;
|
|
47155
|
+
}
|
|
47156
|
+
|
|
47157
|
+
if (mode && this.debounceBrushIdx) {
|
|
47158
|
+
this.drawBrushRect({
|
|
47159
|
+
brushCanvas: this.brushCanvas,
|
|
47160
|
+
isResize: false,
|
|
47161
|
+
isDebounce: true
|
|
47162
|
+
});
|
|
47163
|
+
}
|
|
47164
|
+
}
|
|
47165
|
+
/**
|
|
47166
|
+
* @param {boolean} isUpdateBrushIdx to initialize state after update brush index value
|
|
47167
|
+
*
|
|
47168
|
+
* @returns {undefined}
|
|
47169
|
+
*/
|
|
47170
|
+
|
|
47171
|
+
}, {
|
|
47172
|
+
key: "initEventState",
|
|
47173
|
+
value: function initEventState() {
|
|
47174
|
+
var _this3 = this;
|
|
47175
|
+
|
|
47176
|
+
var promise = new Promise(function (resolve) {
|
|
47177
|
+
if (_this3.debounceBrushIdx && (_this3.brushIdx.isUseButton || _this3.brushIdx.isUseScroll)) {
|
|
47178
|
+
_this3.brushIdx.start = _this3.debounceBrushIdx.start;
|
|
47179
|
+
_this3.brushIdx.end = _this3.debounceBrushIdx.end;
|
|
47180
|
+
}
|
|
47181
|
+
|
|
47182
|
+
resolve(true);
|
|
47183
|
+
});
|
|
47184
|
+
promise.then(function (isUpdateBrushIdx) {
|
|
47185
|
+
if (isUpdateBrushIdx) {
|
|
47186
|
+
_this3.clickBrushInsideX = null;
|
|
47187
|
+
_this3.beforeMouseXPos = null;
|
|
47188
|
+
_this3.curBrushButtonType = null;
|
|
47189
|
+
_this3.brushIdx.isUseButton = false;
|
|
47190
|
+
_this3.brushIdx.isUseScroll = false;
|
|
47191
|
+
}
|
|
47192
|
+
});
|
|
47193
|
+
}
|
|
47194
|
+
}]);
|
|
47195
|
+
|
|
47196
|
+
return EvChartBrush;
|
|
47197
|
+
}();
|
|
47198
|
+
|
|
47199
|
+
|
|
47200
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/uses.js
|
|
47201
|
+
|
|
47202
|
+
var chartBrush_uses_DEFAULT_OPTIONS = {
|
|
47203
|
+
show: true,
|
|
47204
|
+
useDebounce: true,
|
|
47205
|
+
chartIdx: 0,
|
|
47206
|
+
height: 100,
|
|
47207
|
+
showLabel: false,
|
|
47208
|
+
selection: {
|
|
47209
|
+
fillColor: '#38ACEC',
|
|
47210
|
+
opacity: 0.65
|
|
47211
|
+
}
|
|
47212
|
+
}; // eslint-disable-next-line import/prefer-default-export
|
|
47213
|
+
|
|
47214
|
+
var uses_useBrushModel = function useBrushModel() {
|
|
47215
|
+
var getNormalizedBrushOptions = function getNormalizedBrushOptions(options) {
|
|
47216
|
+
return lodash_es_defaultsDeep({}, options, chartBrush_uses_DEFAULT_OPTIONS);
|
|
47217
|
+
};
|
|
47218
|
+
|
|
47219
|
+
return {
|
|
47220
|
+
getNormalizedBrushOptions: getNormalizedBrushOptions
|
|
47221
|
+
};
|
|
47222
|
+
};
|
|
47223
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/chartBrush/ChartBrush.vue?vue&type=script&lang=js
|
|
47224
|
+
|
|
47225
|
+
|
|
47226
|
+
|
|
47227
|
+
|
|
47228
|
+
|
|
47229
|
+
|
|
47230
|
+
|
|
47231
|
+
|
|
47232
|
+
|
|
47233
|
+
|
|
47234
|
+
|
|
47235
|
+
|
|
47236
|
+
|
|
47237
|
+
|
|
47238
|
+
/* harmony default export */ var ChartBrushvue_type_script_lang_js = ({
|
|
47239
|
+
name: 'EvChartBrush',
|
|
47240
|
+
props: {
|
|
47241
|
+
options: {
|
|
47242
|
+
type: Object,
|
|
47243
|
+
default: function _default() {
|
|
47244
|
+
return {};
|
|
47245
|
+
}
|
|
47246
|
+
}
|
|
47247
|
+
},
|
|
47248
|
+
setup: function setup(props) {
|
|
47249
|
+
var evChart = null;
|
|
47250
|
+
var evChartBrush = null;
|
|
47251
|
+
var injectEvChartClone = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('evChartClone', {
|
|
47252
|
+
data: []
|
|
47253
|
+
});
|
|
47254
|
+
var injectEvChartInfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('evChartInfo', {
|
|
47255
|
+
props: {
|
|
47256
|
+
options: []
|
|
47257
|
+
}
|
|
47258
|
+
});
|
|
47259
|
+
var injectBrushIdx = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('brushIdx', {
|
|
47260
|
+
start: 0,
|
|
47261
|
+
end: -1,
|
|
47262
|
+
isUseButton: false,
|
|
47263
|
+
isUseScroll: false
|
|
47264
|
+
});
|
|
47265
|
+
var injectBrushSeries = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('brushSeries', {
|
|
47266
|
+
list: [],
|
|
47267
|
+
chartIdx: null
|
|
47268
|
+
});
|
|
47269
|
+
|
|
47270
|
+
var _useBrushModel = uses_useBrushModel(),
|
|
47271
|
+
getNormalizedBrushOptions = _useBrushModel.getNormalizedBrushOptions;
|
|
47272
|
+
|
|
47273
|
+
var evChartBrushOptions = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
47274
|
+
return getNormalizedBrushOptions(props.options);
|
|
47275
|
+
});
|
|
47276
|
+
|
|
47277
|
+
var _useModel = chart_uses_useModel(),
|
|
47278
|
+
eventListeners = _useModel.eventListeners,
|
|
47279
|
+
selectItemInfo = _useModel.selectItemInfo,
|
|
47280
|
+
selectLabelInfo = _useModel.selectLabelInfo,
|
|
47281
|
+
selectSeriesInfo = _useModel.selectSeriesInfo,
|
|
47282
|
+
getNormalizedData = _useModel.getNormalizedData,
|
|
47283
|
+
getNormalizedOptions = _useModel.getNormalizedOptions;
|
|
47284
|
+
|
|
47285
|
+
var evChartData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
47286
|
+
var _injectEvChartClone$d;
|
|
47287
|
+
|
|
47288
|
+
return getNormalizedData(((_injectEvChartClone$d = injectEvChartClone.data) !== null && _injectEvChartClone$d !== void 0 ? _injectEvChartClone$d : [])[evChartBrushOptions.value.chartIdx]);
|
|
47289
|
+
});
|
|
47290
|
+
var evChartOption = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
47291
|
+
var _chartOption$axesX, _chartOption$axesY;
|
|
47292
|
+
|
|
47293
|
+
var chartOption = injectEvChartInfo.props.options[evChartBrushOptions.value.chartIdx];
|
|
47294
|
+
|
|
47295
|
+
var option = _objectSpread2(_objectSpread2({}, chartOption), {}, {
|
|
47296
|
+
brush: _objectSpread2({
|
|
47297
|
+
use: true
|
|
47298
|
+
}, evChartBrushOptions.value),
|
|
47299
|
+
height: evChartBrushOptions.value.height,
|
|
47300
|
+
zoom: {
|
|
47301
|
+
use: false
|
|
47302
|
+
},
|
|
47303
|
+
dragSelection: {
|
|
47304
|
+
use: false
|
|
47305
|
+
},
|
|
47306
|
+
title: {
|
|
47307
|
+
show: false
|
|
47308
|
+
},
|
|
47309
|
+
tooltip: {
|
|
47310
|
+
use: false
|
|
47311
|
+
},
|
|
47312
|
+
legend: {
|
|
47313
|
+
show: false
|
|
47314
|
+
},
|
|
47315
|
+
selectLabel: {
|
|
47316
|
+
use: false
|
|
47317
|
+
},
|
|
47318
|
+
selectSeries: {
|
|
47319
|
+
use: false
|
|
47320
|
+
},
|
|
47321
|
+
axesX: [_objectSpread2(_objectSpread2({}, chartOption === null || chartOption === void 0 ? void 0 : (_chartOption$axesX = chartOption.axesX) === null || _chartOption$axesX === void 0 ? void 0 : _chartOption$axesX[0]), {}, {
|
|
47322
|
+
title: {
|
|
47323
|
+
use: false
|
|
47324
|
+
}
|
|
47325
|
+
})],
|
|
47326
|
+
axesY: [_objectSpread2(_objectSpread2({}, chartOption === null || chartOption === void 0 ? void 0 : (_chartOption$axesY = chartOption.axesY) === null || _chartOption$axesY === void 0 ? void 0 : _chartOption$axesY[0]), {}, {
|
|
47327
|
+
title: {
|
|
47328
|
+
use: false
|
|
47329
|
+
}
|
|
47330
|
+
})]
|
|
47331
|
+
});
|
|
47332
|
+
|
|
47333
|
+
return getNormalizedOptions(option);
|
|
47334
|
+
});
|
|
47335
|
+
|
|
47336
|
+
var _useWrapper = uses_useWrapper(evChartOption.value),
|
|
47337
|
+
evChartBrushRef = _useWrapper.wrapper,
|
|
47338
|
+
evChartBrushStyle = _useWrapper.wrapperStyle;
|
|
47339
|
+
|
|
47340
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
47341
|
+
return injectBrushSeries.list;
|
|
47342
|
+
}, function () {
|
|
47343
|
+
if (evChartBrushRef.value && injectBrushSeries.chartIdx === evChartBrushOptions.value.chartIdx) {
|
|
47344
|
+
evChart.seriesList = injectBrushSeries.list[evChartBrushOptions.value.chartIdx];
|
|
47345
|
+
evChart.update({
|
|
47346
|
+
updateSeries: false,
|
|
47347
|
+
updateSelTip: {
|
|
47348
|
+
update: false,
|
|
47349
|
+
keepDomain: false
|
|
47350
|
+
}
|
|
47351
|
+
});
|
|
47352
|
+
}
|
|
47353
|
+
});
|
|
47354
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(evChartOption, function (newOpt, prevOpt) {
|
|
47355
|
+
var _injectEvChartClone$d2;
|
|
47356
|
+
|
|
47357
|
+
if (newOpt.brush.chartIdx <= ((_injectEvChartClone$d2 = injectEvChartClone.data) === null || _injectEvChartClone$d2 === void 0 ? void 0 : _injectEvChartClone$d2.length) - 1) {
|
|
47358
|
+
if (evChartBrush && !lodash_es_isEqual(prevOpt.brush, newOpt.brush)) {
|
|
47359
|
+
evChartBrush.removeBrushWrapper();
|
|
47360
|
+
} else if (evChart && !lodash_es_isEqual(newOpt, prevOpt)) {
|
|
47361
|
+
evChart.options = lodash_es_cloneDeep(newOpt);
|
|
47362
|
+
evChart.update({
|
|
47363
|
+
updateSeries: false,
|
|
47364
|
+
updateSelTip: {
|
|
47365
|
+
update: false,
|
|
47366
|
+
keepDomain: false
|
|
47367
|
+
}
|
|
47368
|
+
});
|
|
47369
|
+
}
|
|
47370
|
+
} else {
|
|
47371
|
+
evChart.data = lodash_es_cloneDeep(evChartData.value);
|
|
47372
|
+
evChart.update({
|
|
47373
|
+
updateSeries: true,
|
|
47374
|
+
updateSelTip: {
|
|
47375
|
+
update: false,
|
|
47376
|
+
keepDomain: false
|
|
47377
|
+
},
|
|
47378
|
+
updateData: false
|
|
47379
|
+
});
|
|
47380
|
+
evChartBrush.removeBrushCanvas();
|
|
47381
|
+
}
|
|
47382
|
+
});
|
|
47383
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
47384
|
+
return injectEvChartClone.data;
|
|
47385
|
+
}, function (newData) {
|
|
47386
|
+
if (evChart) {
|
|
47387
|
+
var data = newData[evChartBrushOptions.value.chartIdx];
|
|
47388
|
+
|
|
47389
|
+
if (data) {
|
|
47390
|
+
var isUpdateSeries = !lodash_es_isEqual(data.series, evChart.data.series);
|
|
47391
|
+
var seriesList = injectBrushSeries.list[evChartBrushOptions.value.chartIdx];
|
|
47392
|
+
|
|
47393
|
+
if (seriesList) {
|
|
47394
|
+
Object.keys(data.series).forEach(function (series) {
|
|
47395
|
+
data.series[series].show = seriesList[series].show;
|
|
47396
|
+
});
|
|
47397
|
+
}
|
|
47398
|
+
|
|
47399
|
+
evChart.data = lodash_es_cloneDeep(data);
|
|
47400
|
+
evChart.update({
|
|
47401
|
+
updateSeries: isUpdateSeries,
|
|
47402
|
+
updateSelTip: {
|
|
47403
|
+
update: false,
|
|
47404
|
+
keepDomain: false
|
|
47405
|
+
},
|
|
47406
|
+
updateData: false
|
|
47407
|
+
});
|
|
47408
|
+
}
|
|
47409
|
+
}
|
|
47410
|
+
});
|
|
47411
|
+
|
|
47412
|
+
var createChart = function createChart() {
|
|
47413
|
+
var selected;
|
|
47414
|
+
|
|
47415
|
+
if (evChartOption.value.selectLabel.use) {
|
|
47416
|
+
selected = selectLabelInfo;
|
|
47417
|
+
} else if (evChartOption.value.selectSeries.use) {
|
|
47418
|
+
selected = selectSeriesInfo;
|
|
47419
|
+
}
|
|
47420
|
+
|
|
47421
|
+
evChart = new chart_core(evChartBrushRef.value, evChartData.value, evChartOption.value, eventListeners, selectItemInfo, selected);
|
|
47422
|
+
};
|
|
47423
|
+
|
|
47424
|
+
var createChartBrush = function createChartBrush() {
|
|
47425
|
+
evChartBrush = new chartBrush_core_EvChartBrush(evChart, evChartData, evChartBrushOptions, injectBrushIdx, evChartBrushRef);
|
|
47426
|
+
};
|
|
47427
|
+
|
|
47428
|
+
var drawChart = function drawChart() {
|
|
47429
|
+
if (evChart) {
|
|
47430
|
+
evChart.init();
|
|
47431
|
+
}
|
|
47432
|
+
};
|
|
47433
|
+
|
|
47434
|
+
var drawChartBrush = function drawChartBrush(isResize) {
|
|
47435
|
+
if (evChartBrush) {
|
|
47436
|
+
evChartBrush.init(isResize);
|
|
47437
|
+
}
|
|
47438
|
+
};
|
|
47439
|
+
|
|
47440
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
47441
|
+
return [injectBrushIdx.start, injectBrushIdx.end];
|
|
47442
|
+
}, function () {
|
|
47443
|
+
var _injectEvChartClone$d3;
|
|
47444
|
+
|
|
47445
|
+
if (evChartBrushRef.value && evChartBrushOptions.value.chartIdx <= ((_injectEvChartClone$d3 = injectEvChartClone.data) === null || _injectEvChartClone$d3 === void 0 ? void 0 : _injectEvChartClone$d3.length) - 1) {
|
|
47446
|
+
drawChartBrush();
|
|
47447
|
+
}
|
|
47448
|
+
});
|
|
47449
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
47450
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
47451
|
+
while (1) {
|
|
47452
|
+
switch (_context.prev = _context.next) {
|
|
47453
|
+
case 0:
|
|
47454
|
+
if (!evChartBrushOptions.value.show) {
|
|
47455
|
+
_context.next = 7;
|
|
47456
|
+
break;
|
|
47457
|
+
}
|
|
47458
|
+
|
|
47459
|
+
_context.next = 3;
|
|
47460
|
+
return createChart();
|
|
47461
|
+
|
|
47462
|
+
case 3:
|
|
47463
|
+
_context.next = 5;
|
|
47464
|
+
return drawChart();
|
|
47465
|
+
|
|
47466
|
+
case 5:
|
|
47467
|
+
createChartBrush();
|
|
47468
|
+
drawChartBrush();
|
|
47469
|
+
|
|
47470
|
+
case 7:
|
|
47471
|
+
case "end":
|
|
47472
|
+
return _context.stop();
|
|
47473
|
+
}
|
|
47474
|
+
}
|
|
47475
|
+
}, _callee);
|
|
47476
|
+
})));
|
|
47477
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUpdated"])( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
47478
|
+
var _injectEvChartClone$d4, seriesList;
|
|
47479
|
+
|
|
47480
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
47481
|
+
while (1) {
|
|
47482
|
+
switch (_context2.prev = _context2.next) {
|
|
47483
|
+
case 0:
|
|
47484
|
+
if (!evChartBrushOptions.value.show) {
|
|
47485
|
+
_context2.next = 10;
|
|
47486
|
+
break;
|
|
47487
|
+
}
|
|
47488
|
+
|
|
47489
|
+
if (!(evChartBrushOptions.value.chartIdx <= ((_injectEvChartClone$d4 = injectEvChartClone.data) === null || _injectEvChartClone$d4 === void 0 ? void 0 : _injectEvChartClone$d4.length) - 1)) {
|
|
47490
|
+
_context2.next = 10;
|
|
47491
|
+
break;
|
|
47492
|
+
}
|
|
47493
|
+
|
|
47494
|
+
seriesList = injectBrushSeries.list[evChartBrushOptions.value.chartIdx];
|
|
47495
|
+
|
|
47496
|
+
if (seriesList) {
|
|
47497
|
+
Object.keys(evChartData.value.series).forEach(function (series) {
|
|
47498
|
+
evChartData.value.series[series].show = seriesList[series].show;
|
|
47499
|
+
});
|
|
47500
|
+
}
|
|
47501
|
+
|
|
47502
|
+
_context2.next = 6;
|
|
47503
|
+
return createChart();
|
|
47504
|
+
|
|
47505
|
+
case 6:
|
|
47506
|
+
_context2.next = 8;
|
|
47507
|
+
return drawChart();
|
|
47508
|
+
|
|
47509
|
+
case 8:
|
|
47510
|
+
createChartBrush();
|
|
47511
|
+
drawChartBrush();
|
|
47512
|
+
|
|
47513
|
+
case 10:
|
|
47514
|
+
case "end":
|
|
47515
|
+
return _context2.stop();
|
|
47516
|
+
}
|
|
47517
|
+
}
|
|
47518
|
+
}, _callee2);
|
|
47519
|
+
})));
|
|
47520
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeUnmount"])(function () {
|
|
47521
|
+
if (evChart && 'destroy' in evChart) {
|
|
47522
|
+
evChart.destroy();
|
|
47523
|
+
}
|
|
47524
|
+
|
|
47525
|
+
if (evChartBrush) {
|
|
47526
|
+
evChartBrush.destroy();
|
|
47527
|
+
}
|
|
47528
|
+
});
|
|
47529
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onDeactivated"])(function () {
|
|
47530
|
+
if (evChart && 'hideTooltip' in evChart) {
|
|
47531
|
+
evChart.hideTooltip();
|
|
47532
|
+
}
|
|
47533
|
+
});
|
|
47534
|
+
/**
|
|
47535
|
+
* @param {boolean} isResizeDone resizing complete status
|
|
47536
|
+
*
|
|
47537
|
+
* @returns {undefined}
|
|
47538
|
+
*/
|
|
47539
|
+
|
|
47540
|
+
var onResize = lodash_es_debounce(function () {
|
|
47541
|
+
if (evChart && 'resize' in evChart) {
|
|
47542
|
+
var resize = new Promise(function (resolve) {
|
|
47543
|
+
return evChart.resize(resolve);
|
|
47544
|
+
});
|
|
47545
|
+
resize.then(function (isResizeDone) {
|
|
47546
|
+
if (isResizeDone) {
|
|
47547
|
+
drawChartBrush(isResizeDone);
|
|
47548
|
+
}
|
|
47549
|
+
});
|
|
47550
|
+
}
|
|
47551
|
+
}, 0);
|
|
47552
|
+
return {
|
|
47553
|
+
evChartBrushOptions: evChartBrushOptions,
|
|
47554
|
+
evChartBrushRef: evChartBrushRef,
|
|
47555
|
+
evChartBrushStyle: evChartBrushStyle,
|
|
47556
|
+
onResize: onResize
|
|
47557
|
+
};
|
|
47558
|
+
}
|
|
47559
|
+
});
|
|
47560
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/ChartBrush.vue?vue&type=script&lang=js
|
|
47561
|
+
|
|
47562
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/ChartBrush.vue
|
|
47563
|
+
|
|
47564
|
+
|
|
47565
|
+
|
|
47566
|
+
|
|
47567
|
+
|
|
47568
|
+
const ChartBrush_exports_ = /*#__PURE__*/exportHelper_default()(ChartBrushvue_type_script_lang_js, [['render',ChartBrushvue_type_template_id_7d0c10ab_render]])
|
|
47569
|
+
|
|
47570
|
+
/* harmony default export */ var ChartBrush = (ChartBrush_exports_);
|
|
47571
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/index.js
|
|
47572
|
+
|
|
47573
|
+
|
|
47574
|
+
|
|
47575
|
+
|
|
47576
|
+
ChartBrush.install = function (app) {
|
|
47577
|
+
app.component(ChartBrush.name, ChartBrush);
|
|
47578
|
+
app.use(dist_default.a);
|
|
47579
|
+
};
|
|
47580
|
+
|
|
47581
|
+
/* harmony default export */ var chartBrush = (ChartBrush);
|
|
45309
47582
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/treeGrid/TreeGrid.vue?vue&type=template&id=99e6d310&scoped=true
|
|
45310
47583
|
|
|
45311
47584
|
|
|
@@ -47726,22 +49999,27 @@ function Paginationvue_type_template_id_541b906a_render(_ctx, _cache, $props, $s
|
|
|
47726
49999
|
}
|
|
47727
50000
|
// CONCATENATED MODULE: ./src/components/pagination/Pagination.vue?vue&type=template&id=541b906a
|
|
47728
50001
|
|
|
47729
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/pagination/pageButton.vue?vue&type=template&id=
|
|
50002
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/pagination/pageButton.vue?vue&type=template&id=530eda26
|
|
47730
50003
|
|
|
47731
50004
|
|
|
47732
|
-
function
|
|
50005
|
+
function pageButtonvue_type_template_id_530eda26_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
47733
50006
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("span", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({
|
|
47734
50007
|
class: _defineProperty({
|
|
47735
50008
|
'is-current': $props.page.isCurrent,
|
|
47736
50009
|
'is-disabled': $props.disabled || $props.page.disabled
|
|
47737
50010
|
}, $props.page.class, true)
|
|
47738
50011
|
}, _ctx.$attrs, {
|
|
47739
|
-
"aria-current": $props.page.isCurrent
|
|
50012
|
+
"aria-current": $props.page.isCurrent,
|
|
50013
|
+
onClick: _cache[1] || (_cache[1] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(function () {
|
|
50014
|
+
var _$props$page;
|
|
50015
|
+
|
|
50016
|
+
return $props.page.click && (_$props$page = $props.page).click.apply(_$props$page, arguments);
|
|
50017
|
+
}, ["stop"]))
|
|
47740
50018
|
}), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", {}, function () {
|
|
47741
50019
|
return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])($props.page.number), 1)];
|
|
47742
50020
|
})], 16, ["aria-current"]);
|
|
47743
50021
|
}
|
|
47744
|
-
// CONCATENATED MODULE: ./src/components/pagination/pageButton.vue?vue&type=template&id=
|
|
50022
|
+
// CONCATENATED MODULE: ./src/components/pagination/pageButton.vue?vue&type=template&id=530eda26
|
|
47745
50023
|
|
|
47746
50024
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/pagination/pageButton.vue?vue&type=script&lang=js
|
|
47747
50025
|
/* harmony default export */ var pageButtonvue_type_script_lang_js = ({
|
|
@@ -47765,7 +50043,7 @@ function pageButtonvue_type_template_id_dcd27724_render(_ctx, _cache, $props, $s
|
|
|
47765
50043
|
|
|
47766
50044
|
|
|
47767
50045
|
|
|
47768
|
-
const pageButton_exports_ = /*#__PURE__*/exportHelper_default()(pageButtonvue_type_script_lang_js, [['render',
|
|
50046
|
+
const pageButton_exports_ = /*#__PURE__*/exportHelper_default()(pageButtonvue_type_script_lang_js, [['render',pageButtonvue_type_template_id_530eda26_render]])
|
|
47769
50047
|
|
|
47770
50048
|
/* harmony default export */ var pageButton = (pageButton_exports_);
|
|
47771
50049
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/pagination/Pagination.vue?vue&type=script&lang=js
|
|
@@ -48009,7 +50287,9 @@ var package_0 = __webpack_require__("9224");
|
|
|
48009
50287
|
|
|
48010
50288
|
|
|
48011
50289
|
|
|
48012
|
-
|
|
50290
|
+
|
|
50291
|
+
|
|
50292
|
+
var components = [tabs, tabPanel, components_button, buttonGroup, components_checkbox, checkboxGroup, components_radio, radioGroup, components_select, toggle, textField, inputNumber, components_slider, components_icon, calendar, components_datePicker, scheduler, components_contextMenu, components_window, loading, progress, components_menu, tree, timePicker, grid, chart, chartGroup, chartBrush, components_message, components_notification, components_messageBox, treeGrid, pagination];
|
|
48013
50293
|
|
|
48014
50294
|
var install = function install(app) {
|
|
48015
50295
|
if (!app) {
|