evui 3.3.38 → 3.3.40
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 +2447 -198
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +2447 -198
- 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 +69 -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/scale/scale.js +8 -3
- package/src/components/chart/style/chart.scss +14 -0
- package/src/components/chart/uses.js +319 -5
- package/src/components/chartBrush/ChartBrush.vue +298 -0
- package/src/components/chartBrush/chartBrush.core.js +453 -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/grid/uses.js +2 -7
- package/src/components/pagination/pageButton.vue +1 -0
- package/src/components/treeGrid/uses.js +1 -1
- package/src/main.js +4 -0
package/dist/evui.umd.js
CHANGED
|
@@ -284,6 +284,20 @@ $({ target: 'Object', stat: true }, {
|
|
|
284
284
|
});
|
|
285
285
|
|
|
286
286
|
|
|
287
|
+
/***/ }),
|
|
288
|
+
|
|
289
|
+
/***/ "08a2":
|
|
290
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
291
|
+
|
|
292
|
+
// Imports
|
|
293
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
294
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
295
|
+
// Module
|
|
296
|
+
exports.push([module.i, ".ev-chart-group__wrapper[data-v-bd8c6660]{display:flex;height:100%;flex-direction:column}", ""]);
|
|
297
|
+
// Exports
|
|
298
|
+
module.exports = exports;
|
|
299
|
+
|
|
300
|
+
|
|
287
301
|
/***/ }),
|
|
288
302
|
|
|
289
303
|
/***/ "0924":
|
|
@@ -293,6 +307,21 @@ module.exports = __webpack_require__.p + "img/icon_oracle.0572d3ee.svg";
|
|
|
293
307
|
|
|
294
308
|
/***/ }),
|
|
295
309
|
|
|
310
|
+
/***/ "0b6e":
|
|
311
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
312
|
+
|
|
313
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
314
|
+
|
|
315
|
+
// load the styles
|
|
316
|
+
var content = __webpack_require__("cdcc");
|
|
317
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
318
|
+
if(content.locals) module.exports = content.locals;
|
|
319
|
+
// add the styles to the DOM
|
|
320
|
+
var add = __webpack_require__("499e").default
|
|
321
|
+
var update = add("0311a9bf", content, true, {"sourceMap":false,"shadowMode":false});
|
|
322
|
+
|
|
323
|
+
/***/ }),
|
|
324
|
+
|
|
296
325
|
/***/ "0cfb":
|
|
297
326
|
/***/ (function(module, exports, __webpack_require__) {
|
|
298
327
|
|
|
@@ -308,6 +337,17 @@ module.exports = !DESCRIPTORS && !fails(function () {
|
|
|
308
337
|
});
|
|
309
338
|
|
|
310
339
|
|
|
340
|
+
/***/ }),
|
|
341
|
+
|
|
342
|
+
/***/ "0d1d":
|
|
343
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
344
|
+
|
|
345
|
+
"use strict";
|
|
346
|
+
/* 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_018cc1f3_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1180");
|
|
347
|
+
/* 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_018cc1f3_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_018cc1f3_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
|
|
348
|
+
/* unused harmony reexport * */
|
|
349
|
+
|
|
350
|
+
|
|
311
351
|
/***/ }),
|
|
312
352
|
|
|
313
353
|
/***/ "0eff":
|
|
@@ -360,6 +400,21 @@ module.exports = ''.repeat || function repeat(count) {
|
|
|
360
400
|
};
|
|
361
401
|
|
|
362
402
|
|
|
403
|
+
/***/ }),
|
|
404
|
+
|
|
405
|
+
/***/ "1180":
|
|
406
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
407
|
+
|
|
408
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
409
|
+
|
|
410
|
+
// load the styles
|
|
411
|
+
var content = __webpack_require__("850f");
|
|
412
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
413
|
+
if(content.locals) module.exports = content.locals;
|
|
414
|
+
// add the styles to the DOM
|
|
415
|
+
var add = __webpack_require__("499e").default
|
|
416
|
+
var update = add("8bf57f30", content, true, {"sourceMap":false,"shadowMode":false});
|
|
417
|
+
|
|
363
418
|
/***/ }),
|
|
364
419
|
|
|
365
420
|
/***/ "1276":
|
|
@@ -658,21 +713,6 @@ module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callback
|
|
|
658
713
|
} : [].forEach;
|
|
659
714
|
|
|
660
715
|
|
|
661
|
-
/***/ }),
|
|
662
|
-
|
|
663
|
-
/***/ "1839":
|
|
664
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
665
|
-
|
|
666
|
-
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
667
|
-
|
|
668
|
-
// load the styles
|
|
669
|
-
var content = __webpack_require__("1d10");
|
|
670
|
-
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
671
|
-
if(content.locals) module.exports = content.locals;
|
|
672
|
-
// add the styles to the DOM
|
|
673
|
-
var add = __webpack_require__("499e").default
|
|
674
|
-
var update = add("34615be8", content, true, {"sourceMap":false,"shadowMode":false});
|
|
675
|
-
|
|
676
716
|
/***/ }),
|
|
677
717
|
|
|
678
718
|
/***/ "196e":
|
|
@@ -4191,20 +4231,6 @@ var userAgent = __webpack_require__("342f");
|
|
|
4191
4231
|
module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);
|
|
4192
4232
|
|
|
4193
4233
|
|
|
4194
|
-
/***/ }),
|
|
4195
|
-
|
|
4196
|
-
/***/ "1d10":
|
|
4197
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4198
|
-
|
|
4199
|
-
// Imports
|
|
4200
|
-
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
4201
|
-
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
4202
|
-
// Module
|
|
4203
|
-
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}", ""]);
|
|
4204
|
-
// Exports
|
|
4205
|
-
module.exports = exports;
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
4234
|
/***/ }),
|
|
4209
4235
|
|
|
4210
4236
|
/***/ "1d80":
|
|
@@ -6824,6 +6850,17 @@ exports.push([module.i, ".ev-input,.ev-textarea{width:100%;outline:0;background-
|
|
|
6824
6850
|
module.exports = exports;
|
|
6825
6851
|
|
|
6826
6852
|
|
|
6853
|
+
/***/ }),
|
|
6854
|
+
|
|
6855
|
+
/***/ "6938":
|
|
6856
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6857
|
+
|
|
6858
|
+
"use strict";
|
|
6859
|
+
/* 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");
|
|
6860
|
+
/* 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__);
|
|
6861
|
+
/* unused harmony reexport * */
|
|
6862
|
+
|
|
6863
|
+
|
|
6827
6864
|
/***/ }),
|
|
6828
6865
|
|
|
6829
6866
|
/***/ "69f3":
|
|
@@ -7596,6 +7633,17 @@ module.exports = function (it) {
|
|
|
7596
7633
|
};
|
|
7597
7634
|
|
|
7598
7635
|
|
|
7636
|
+
/***/ }),
|
|
7637
|
+
|
|
7638
|
+
/***/ "8352":
|
|
7639
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7640
|
+
|
|
7641
|
+
"use strict";
|
|
7642
|
+
/* 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");
|
|
7643
|
+
/* 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__);
|
|
7644
|
+
/* unused harmony reexport * */
|
|
7645
|
+
|
|
7646
|
+
|
|
7599
7647
|
/***/ }),
|
|
7600
7648
|
|
|
7601
7649
|
/***/ "83ab":
|
|
@@ -7641,6 +7689,20 @@ exports.push([module.i, ".ev-window-scroll-lock{overflow:hidden!important}.ev-wi
|
|
|
7641
7689
|
module.exports = exports;
|
|
7642
7690
|
|
|
7643
7691
|
|
|
7692
|
+
/***/ }),
|
|
7693
|
+
|
|
7694
|
+
/***/ "850f":
|
|
7695
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
7696
|
+
|
|
7697
|
+
// Imports
|
|
7698
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
7699
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
7700
|
+
// Module
|
|
7701
|
+
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}", ""]);
|
|
7702
|
+
// Exports
|
|
7703
|
+
module.exports = exports;
|
|
7704
|
+
|
|
7705
|
+
|
|
7644
7706
|
/***/ }),
|
|
7645
7707
|
|
|
7646
7708
|
/***/ "861d":
|
|
@@ -7918,7 +7980,7 @@ $({ target: 'Number', stat: true }, {
|
|
|
7918
7980
|
/***/ "9224":
|
|
7919
7981
|
/***/ (function(module) {
|
|
7920
7982
|
|
|
7921
|
-
module.exports = JSON.parse("{\"a\":\"3.3.
|
|
7983
|
+
module.exports = JSON.parse("{\"a\":\"3.3.40\"}");
|
|
7922
7984
|
|
|
7923
7985
|
/***/ }),
|
|
7924
7986
|
|
|
@@ -10546,6 +10608,21 @@ module.exports = function (METHOD_NAME) {
|
|
|
10546
10608
|
};
|
|
10547
10609
|
|
|
10548
10610
|
|
|
10611
|
+
/***/ }),
|
|
10612
|
+
|
|
10613
|
+
/***/ "c920":
|
|
10614
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10615
|
+
|
|
10616
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
10617
|
+
|
|
10618
|
+
// load the styles
|
|
10619
|
+
var content = __webpack_require__("08a2");
|
|
10620
|
+
if(typeof content === 'string') content = [[module.i, content, '']];
|
|
10621
|
+
if(content.locals) module.exports = content.locals;
|
|
10622
|
+
// add the styles to the DOM
|
|
10623
|
+
var add = __webpack_require__("499e").default
|
|
10624
|
+
var update = add("7946d016", content, true, {"sourceMap":false,"shadowMode":false});
|
|
10625
|
+
|
|
10549
10626
|
/***/ }),
|
|
10550
10627
|
|
|
10551
10628
|
/***/ "c975":
|
|
@@ -10688,6 +10765,20 @@ $({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
|
|
|
10688
10765
|
/* unused harmony reexport * */
|
|
10689
10766
|
|
|
10690
10767
|
|
|
10768
|
+
/***/ }),
|
|
10769
|
+
|
|
10770
|
+
/***/ "cdcc":
|
|
10771
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
10772
|
+
|
|
10773
|
+
// Imports
|
|
10774
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
|
|
10775
|
+
exports = ___CSS_LOADER_API_IMPORT___(false);
|
|
10776
|
+
// Module
|
|
10777
|
+
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}", ""]);
|
|
10778
|
+
// Exports
|
|
10779
|
+
module.exports = exports;
|
|
10780
|
+
|
|
10781
|
+
|
|
10691
10782
|
/***/ }),
|
|
10692
10783
|
|
|
10693
10784
|
/***/ "cdf9":
|
|
@@ -12238,17 +12329,6 @@ if(content.locals) module.exports = content.locals;
|
|
|
12238
12329
|
var add = __webpack_require__("499e").default
|
|
12239
12330
|
var update = add("235b9c6e", content, true, {"sourceMap":false,"shadowMode":false});
|
|
12240
12331
|
|
|
12241
|
-
/***/ }),
|
|
12242
|
-
|
|
12243
|
-
/***/ "e83f":
|
|
12244
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12245
|
-
|
|
12246
|
-
"use strict";
|
|
12247
|
-
/* 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");
|
|
12248
|
-
/* 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__);
|
|
12249
|
-
/* unused harmony reexport * */
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
12332
|
/***/ }),
|
|
12253
12333
|
|
|
12254
12334
|
/***/ "e843":
|
|
@@ -18988,7 +19068,7 @@ Slider.install = function (app) {
|
|
|
18988
19068
|
|
|
18989
19069
|
/* harmony default export */ var components_slider = (Slider);
|
|
18990
19070
|
// EXTERNAL MODULE: ./src/style/lib/icon.css
|
|
18991
|
-
var
|
|
19071
|
+
var lib_icon = __webpack_require__("2d5d");
|
|
18992
19072
|
|
|
18993
19073
|
// 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
|
|
18994
19074
|
|
|
@@ -29970,15 +30050,7 @@ var uses_contextMenuEvent = function contextMenuEvent(params) {
|
|
|
29970
30050
|
|
|
29971
30051
|
var onContextMenu = function onContextMenu(event) {
|
|
29972
30052
|
var target = event.target;
|
|
29973
|
-
var
|
|
29974
|
-
var rowIndex;
|
|
29975
|
-
|
|
29976
|
-
if (tagName === 'td') {
|
|
29977
|
-
rowIndex = target.parentElement.dataset.index;
|
|
29978
|
-
} else {
|
|
29979
|
-
rowIndex = target.parentElement.parentElement.dataset.index;
|
|
29980
|
-
}
|
|
29981
|
-
|
|
30053
|
+
var rowIndex = target.closest('.row').dataset.index;
|
|
29982
30054
|
var clickedRow;
|
|
29983
30055
|
|
|
29984
30056
|
if (rowIndex) {
|
|
@@ -30830,18 +30902,27 @@ Grid.install = function (app) {
|
|
|
30830
30902
|
};
|
|
30831
30903
|
|
|
30832
30904
|
/* harmony default export */ var grid = (Grid);
|
|
30833
|
-
// 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=
|
|
30905
|
+
// 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=018cc1f3
|
|
30906
|
+
|
|
30907
|
+
var Chartvue_type_template_id_018cc1f3_hoisted_1 = {
|
|
30908
|
+
key: 0,
|
|
30909
|
+
ref: "evChartToolbarRef"
|
|
30910
|
+
};
|
|
30911
|
+
function Chartvue_type_template_id_018cc1f3_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
30912
|
+
var _component_ev_chart_toolbar = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ev-chart-toolbar");
|
|
30834
30913
|
|
|
30835
|
-
function Chartvue_type_template_id_ca3428ac_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
30836
30914
|
var _directive_resize = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("resize");
|
|
30837
30915
|
|
|
30838
|
-
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["
|
|
30916
|
+
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_018cc1f3_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ev_chart_toolbar, {
|
|
30917
|
+
toolbar: $setup.zoomOptions.toolbar,
|
|
30918
|
+
onOnClickToolbar: $setup.onClickToolbar
|
|
30919
|
+
}, 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", {
|
|
30839
30920
|
ref: "wrapper",
|
|
30840
30921
|
style: $setup.wrapperStyle,
|
|
30841
30922
|
class: "ev-chart"
|
|
30842
|
-
}, null, 4)
|
|
30923
|
+
}, null, 4), [[_directive_resize, $setup.onResize]])], 64);
|
|
30843
30924
|
}
|
|
30844
|
-
// CONCATENATED MODULE: ./src/components/chart/Chart.vue?vue&type=template&id=
|
|
30925
|
+
// CONCATENATED MODULE: ./src/components/chart/Chart.vue?vue&type=template&id=018cc1f3
|
|
30845
30926
|
|
|
30846
30927
|
// CONCATENATED MODULE: ./node_modules/lodash-es/_arrayEach.js
|
|
30847
30928
|
/**
|
|
@@ -33183,17 +33264,49 @@ var modules = {
|
|
|
33183
33264
|
|
|
33184
33265
|
return findInfo;
|
|
33185
33266
|
},
|
|
33186
|
-
getItem: function getItem(
|
|
33187
|
-
var
|
|
33188
|
-
|
|
33267
|
+
getItem: function getItem(selectedInfo) {
|
|
33268
|
+
var _this6 = this;
|
|
33269
|
+
|
|
33189
33270
|
var useApproximate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
33190
|
-
var
|
|
33271
|
+
var seriesID = selectedInfo.seriesID,
|
|
33272
|
+
dataIndex = selectedInfo.dataIndex;
|
|
33273
|
+
var itemPosition;
|
|
33191
33274
|
|
|
33192
|
-
if (
|
|
33193
|
-
|
|
33275
|
+
if ('seriesID' in selectedInfo) {
|
|
33276
|
+
var dataInfo = this.getDataByValues(seriesID, dataIndex);
|
|
33277
|
+
|
|
33278
|
+
if (!dataInfo || !(dataInfo !== null && dataInfo !== void 0 && dataInfo.xp) || !(dataInfo !== null && dataInfo !== void 0 && dataInfo.yp)) {
|
|
33279
|
+
return null;
|
|
33280
|
+
}
|
|
33281
|
+
|
|
33282
|
+
itemPosition = [this.getItemByPosition([dataInfo.xp, dataInfo.yp], useApproximate)];
|
|
33283
|
+
} else {
|
|
33284
|
+
var seriesList = Object.entries(this.seriesList);
|
|
33285
|
+
var firShowSeriesID;
|
|
33286
|
+
|
|
33287
|
+
for (var i = 0; i < seriesList.length; i++) {
|
|
33288
|
+
var _seriesList$i = _slicedToArray(seriesList[i], 2),
|
|
33289
|
+
id = _seriesList$i[0],
|
|
33290
|
+
info = _seriesList$i[1];
|
|
33291
|
+
|
|
33292
|
+
if (info.show) {
|
|
33293
|
+
firShowSeriesID = id;
|
|
33294
|
+
break;
|
|
33295
|
+
}
|
|
33296
|
+
}
|
|
33297
|
+
|
|
33298
|
+
itemPosition = dataIndex.map(function (idx) {
|
|
33299
|
+
var dataInfo = _this6.getDataByValues(firShowSeriesID, idx);
|
|
33300
|
+
|
|
33301
|
+
if (!dataInfo || !(dataInfo !== null && dataInfo !== void 0 && dataInfo.xp) || !(dataInfo !== null && dataInfo !== void 0 && dataInfo.yp)) {
|
|
33302
|
+
return null;
|
|
33303
|
+
}
|
|
33304
|
+
|
|
33305
|
+
return _this6.getItemByPosition([dataInfo.xp, dataInfo.yp], useApproximate);
|
|
33306
|
+
});
|
|
33194
33307
|
}
|
|
33195
33308
|
|
|
33196
|
-
return
|
|
33309
|
+
return itemPosition;
|
|
33197
33310
|
},
|
|
33198
33311
|
|
|
33199
33312
|
/**
|
|
@@ -33299,7 +33412,7 @@ var modules = {
|
|
|
33299
33412
|
* @returns {object} clicked series id
|
|
33300
33413
|
*/
|
|
33301
33414
|
getSeriesIdByPosition: function getSeriesIdByPosition(offset) {
|
|
33302
|
-
var
|
|
33415
|
+
var _this7 = this;
|
|
33303
33416
|
|
|
33304
33417
|
var _offset = _slicedToArray(offset, 2),
|
|
33305
33418
|
clickedX = _offset[0],
|
|
@@ -33333,8 +33446,8 @@ var modules = {
|
|
|
33333
33446
|
case 'line':
|
|
33334
33447
|
{
|
|
33335
33448
|
var orderedSeriesList = this.seriesInfo.charts.line;
|
|
33336
|
-
var isStackChart = Object.values(this.seriesList).some(function (
|
|
33337
|
-
var stackIndex =
|
|
33449
|
+
var isStackChart = Object.values(this.seriesList).some(function (_ref3) {
|
|
33450
|
+
var stackIndex = _ref3.stackIndex;
|
|
33338
33451
|
return stackIndex;
|
|
33339
33452
|
});
|
|
33340
33453
|
|
|
@@ -33353,16 +33466,16 @@ var modules = {
|
|
|
33353
33466
|
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
|
|
33354
33467
|
};
|
|
33355
33468
|
});
|
|
33356
|
-
hitSeries = (_positionList$find = positionList.find(function (
|
|
33357
|
-
var position =
|
|
33469
|
+
hitSeries = (_positionList$find = positionList.find(function (_ref4) {
|
|
33470
|
+
var position = _ref4.position;
|
|
33358
33471
|
return clickedY > position;
|
|
33359
33472
|
})) === null || _positionList$find === void 0 ? void 0 : _positionList$find.sId;
|
|
33360
33473
|
} else {
|
|
33361
33474
|
var _Object$entries$find;
|
|
33362
33475
|
|
|
33363
|
-
hitSeries = (_Object$entries$find = Object.entries(hitItem.items).find(function (
|
|
33364
|
-
var
|
|
33365
|
-
hit =
|
|
33476
|
+
hitSeries = (_Object$entries$find = Object.entries(hitItem.items).find(function (_ref5) {
|
|
33477
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
33478
|
+
hit = _ref6[1].hit;
|
|
33366
33479
|
|
|
33367
33480
|
return hit;
|
|
33368
33481
|
})) === null || _Object$entries$find === void 0 ? void 0 : _Object$entries$find[0];
|
|
@@ -33372,29 +33485,29 @@ var modules = {
|
|
|
33372
33485
|
|
|
33373
33486
|
// 클릭한 위치에 data 가 존재하지 않는 경우
|
|
33374
33487
|
var visibleSeriesList = orderedSeriesList.filter(function (sId) {
|
|
33375
|
-
return
|
|
33488
|
+
return _this7.seriesList[sId].show;
|
|
33376
33489
|
});
|
|
33377
33490
|
positionList = visibleSeriesList.map(function (sId) {
|
|
33378
|
-
var
|
|
33491
|
+
var _this7$seriesList$sId;
|
|
33379
33492
|
|
|
33380
33493
|
return {
|
|
33381
33494
|
sId: sId,
|
|
33382
|
-
position: (
|
|
33383
|
-
var xp =
|
|
33384
|
-
yp =
|
|
33495
|
+
position: (_this7$seriesList$sId = _this7.seriesList[sId].data) === null || _this7$seriesList$sId === void 0 ? void 0 : _this7$seriesList$sId.map(function (_ref7) {
|
|
33496
|
+
var xp = _ref7.xp,
|
|
33497
|
+
yp = _ref7.yp;
|
|
33385
33498
|
return [xp, yp];
|
|
33386
33499
|
})
|
|
33387
33500
|
};
|
|
33388
33501
|
});
|
|
33389
|
-
var dataIndex = (_positionList$0$posit = positionList[0].position) === null || _positionList$0$posit === void 0 ? void 0 : _positionList$0$posit.findIndex(function (
|
|
33390
|
-
var
|
|
33391
|
-
xp =
|
|
33502
|
+
var dataIndex = (_positionList$0$posit = positionList[0].position) === null || _positionList$0$posit === void 0 ? void 0 : _positionList$0$posit.findIndex(function (_ref8) {
|
|
33503
|
+
var _ref9 = _slicedToArray(_ref8, 1),
|
|
33504
|
+
xp = _ref9[0];
|
|
33392
33505
|
|
|
33393
33506
|
return xp >= clickedX;
|
|
33394
33507
|
});
|
|
33395
|
-
var vectorList = positionList.map(function (
|
|
33396
|
-
var sId =
|
|
33397
|
-
position =
|
|
33508
|
+
var vectorList = positionList.map(function (_ref10) {
|
|
33509
|
+
var sId = _ref10.sId,
|
|
33510
|
+
position = _ref10.position;
|
|
33398
33511
|
return {
|
|
33399
33512
|
sId: sId,
|
|
33400
33513
|
vector: {
|
|
@@ -33412,8 +33525,8 @@ var modules = {
|
|
|
33412
33525
|
if (isStackChart) {
|
|
33413
33526
|
var _vectorList$find;
|
|
33414
33527
|
|
|
33415
|
-
hitSeries = (_vectorList$find = vectorList.find(function (
|
|
33416
|
-
var vector =
|
|
33528
|
+
hitSeries = (_vectorList$find = vectorList.find(function (_ref11) {
|
|
33529
|
+
var vector = _ref11.vector;
|
|
33417
33530
|
|
|
33418
33531
|
if (isEmptyVector(vector === null || vector === void 0 ? void 0 : vector.start) && isEmptyVector(vector === null || vector === void 0 ? void 0 : vector.end)) {
|
|
33419
33532
|
return false;
|
|
@@ -33439,8 +33552,8 @@ var modules = {
|
|
|
33439
33552
|
} else {
|
|
33440
33553
|
var _vectorList$find2;
|
|
33441
33554
|
|
|
33442
|
-
hitSeries = (_vectorList$find2 = vectorList.find(function (
|
|
33443
|
-
var vector =
|
|
33555
|
+
hitSeries = (_vectorList$find2 = vectorList.find(function (_ref12) {
|
|
33556
|
+
var vector = _ref12.vector;
|
|
33444
33557
|
|
|
33445
33558
|
if (isEmptyVector(vector === null || vector === void 0 ? void 0 : vector.start) && isEmptyVector(vector === null || vector === void 0 ? void 0 : vector.end)) {
|
|
33446
33559
|
return false;
|
|
@@ -33523,7 +33636,7 @@ var modules = {
|
|
|
33523
33636
|
* @returns {object} min/max info for all of data
|
|
33524
33637
|
*/
|
|
33525
33638
|
getStoreMinMax: function getStoreMinMax() {
|
|
33526
|
-
var
|
|
33639
|
+
var _this8 = this;
|
|
33527
33640
|
|
|
33528
33641
|
var keys = Object.keys(this.seriesList);
|
|
33529
33642
|
var isHorizontal = this.options.horizontal;
|
|
@@ -33541,7 +33654,7 @@ var modules = {
|
|
|
33541
33654
|
if (keys.length) {
|
|
33542
33655
|
return keys.reduce(function (acc, key) {
|
|
33543
33656
|
var minmax = acc;
|
|
33544
|
-
var series =
|
|
33657
|
+
var series = _this8.seriesList[key];
|
|
33545
33658
|
var smm = series.minMax;
|
|
33546
33659
|
var axisX = series.xAxisIndex;
|
|
33547
33660
|
var axisY = series.yAxisIndex;
|
|
@@ -35031,7 +35144,8 @@ var element_line_Line = /*#__PURE__*/function () {
|
|
|
35031
35144
|
axesSteps = param.axesSteps,
|
|
35032
35145
|
selectLabel = param.selectLabel,
|
|
35033
35146
|
selectSeries = param.selectSeries,
|
|
35034
|
-
legendHitInfo = param.legendHitInfo
|
|
35147
|
+
legendHitInfo = param.legendHitInfo,
|
|
35148
|
+
isBrush = param.isBrush; // about selectLabel
|
|
35035
35149
|
|
|
35036
35150
|
var selectLabelOption = selectLabel === null || selectLabel === void 0 ? void 0 : selectLabel.option;
|
|
35037
35151
|
var useSelectLabel = (selectLabelOption === null || selectLabelOption === void 0 ? void 0 : selectLabelOption.use) && (selectLabelOption === null || selectLabelOption === void 0 ? void 0 : selectLabelOption.useSeriesOpacity);
|
|
@@ -35167,7 +35281,7 @@ var element_line_Line = /*#__PURE__*/function () {
|
|
|
35167
35281
|
} // Draw points
|
|
35168
35282
|
|
|
35169
35283
|
|
|
35170
|
-
if (this.point || useSelectLabel) {
|
|
35284
|
+
if (!isBrush && (this.point || useSelectLabel)) {
|
|
35171
35285
|
ctx.strokeStyle = helpers_util.colorStringToRgba(mainColor, mainColorOpacity);
|
|
35172
35286
|
var focusStyle = helpers_util.colorStringToRgba(pointFillColor, 1);
|
|
35173
35287
|
var blurStyle = helpers_util.colorStringToRgba(pointFillColor, pointFillColorOpacity);
|
|
@@ -35403,6 +35517,8 @@ var merge = _createAssigner(function(object, source, srcIndex) {
|
|
|
35403
35517
|
|
|
35404
35518
|
|
|
35405
35519
|
|
|
35520
|
+
|
|
35521
|
+
|
|
35406
35522
|
var element_scatter_Scatter = /*#__PURE__*/function () {
|
|
35407
35523
|
function Scatter(sId, opt, sIdx) {
|
|
35408
35524
|
var _this = this;
|
|
@@ -35448,6 +35564,7 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
|
|
|
35448
35564
|
var chartRect = param.chartRect;
|
|
35449
35565
|
var labelOffset = param.labelOffset;
|
|
35450
35566
|
var axesSteps = param.axesSteps;
|
|
35567
|
+
var displayOverflow = param.displayOverflow;
|
|
35451
35568
|
var x;
|
|
35452
35569
|
var y;
|
|
35453
35570
|
var aliasPixel;
|
|
@@ -35457,6 +35574,15 @@ var element_scatter_Scatter = /*#__PURE__*/function () {
|
|
|
35457
35574
|
var yArea = chartRect.chartHeight - (labelOffset.top + labelOffset.bottom);
|
|
35458
35575
|
var xsp = chartRect.x1 + labelOffset.left;
|
|
35459
35576
|
var ysp = chartRect.y2 - labelOffset.bottom;
|
|
35577
|
+
|
|
35578
|
+
if (displayOverflow) {
|
|
35579
|
+
this.data = this.data.map(function (val) {
|
|
35580
|
+
return _objectSpread2(_objectSpread2({}, val), {}, {
|
|
35581
|
+
y: val.y > minmaxY.graphMax ? minmaxY.graphMax : val.y
|
|
35582
|
+
});
|
|
35583
|
+
});
|
|
35584
|
+
}
|
|
35585
|
+
|
|
35460
35586
|
this.data.forEach(function (item) {
|
|
35461
35587
|
x = helpers_canvas.calculateX(item.x, minmaxX.graphMin, minmaxX.graphMax, xArea, xsp);
|
|
35462
35588
|
y = helpers_canvas.calculateY(item.y, minmaxY.graphMin, minmaxY.graphMax, yArea, ysp);
|
|
@@ -37780,10 +37906,13 @@ var scale_Scale = /*#__PURE__*/function () {
|
|
|
37780
37906
|
var labelPoint = void 0;
|
|
37781
37907
|
|
|
37782
37908
|
if (this.type === 'x') {
|
|
37783
|
-
var _options$selectItem, _this$options3;
|
|
37909
|
+
var _options$brush, _options$selectItem, _this$options3;
|
|
37784
37910
|
|
|
37785
37911
|
labelPoint = this.position === 'top' ? offsetPoint - 10 : offsetPoint + 10;
|
|
37786
|
-
|
|
37912
|
+
|
|
37913
|
+
if (options !== null && options !== void 0 && (_options$brush = options.brush) !== null && _options$brush !== void 0 && _options$brush.showLabel || !options.brush) {
|
|
37914
|
+
ctx.fillText(labelText, labelCenter, labelPoint);
|
|
37915
|
+
}
|
|
37787
37916
|
|
|
37788
37917
|
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)) {
|
|
37789
37918
|
var selectedLabel = this.getLabelFormat(Math.min(axisMax, hitInfo.label + 0 * stepValue));
|
|
@@ -37812,11 +37941,16 @@ var scale_Scale = /*#__PURE__*/function () {
|
|
|
37812
37941
|
ctx.lineTo(linePosition, offsetCounterPoint);
|
|
37813
37942
|
}
|
|
37814
37943
|
} else {
|
|
37944
|
+
var _options$brush2;
|
|
37945
|
+
|
|
37815
37946
|
labelPoint = this.position === 'left' ? offsetPoint - 10 : offsetPoint + 10;
|
|
37816
|
-
|
|
37947
|
+
|
|
37948
|
+
if (options !== null && options !== void 0 && (_options$brush2 = options.brush) !== null && _options$brush2 !== void 0 && _options$brush2.showLabel || !options.brush) {
|
|
37949
|
+
ctx.fillText(labelText, labelPoint, labelCenter);
|
|
37950
|
+
}
|
|
37817
37951
|
|
|
37818
37952
|
if (ix === steps) {
|
|
37819
|
-
linePosition
|
|
37953
|
+
linePosition -= 1;
|
|
37820
37954
|
}
|
|
37821
37955
|
|
|
37822
37956
|
if (ix !== 0 && this.showGrid) {
|
|
@@ -39587,7 +39721,8 @@ var plugins_legend_modules = {
|
|
|
39587
39721
|
_this3.addLegend({
|
|
39588
39722
|
cId: colorItem.id,
|
|
39589
39723
|
color: colorItem.color,
|
|
39590
|
-
name: name
|
|
39724
|
+
name: name,
|
|
39725
|
+
show: true
|
|
39591
39726
|
});
|
|
39592
39727
|
}
|
|
39593
39728
|
}
|
|
@@ -39646,6 +39781,7 @@ var plugins_legend_modules = {
|
|
|
39646
39781
|
|
|
39647
39782
|
this.onLegendBoxClick = function (e) {
|
|
39648
39783
|
var opt = _this4.options.legend;
|
|
39784
|
+
var chartIdx = _this4.data.chartIdx;
|
|
39649
39785
|
|
|
39650
39786
|
var targetDOM = _this4.getContainerDOM(e);
|
|
39651
39787
|
|
|
@@ -39706,6 +39842,14 @@ var plugins_legend_modules = {
|
|
|
39706
39842
|
series.show = !series.show;
|
|
39707
39843
|
targetDOM.classList.toggle('inactive');
|
|
39708
39844
|
|
|
39845
|
+
if (_this4.brushSeries) {
|
|
39846
|
+
var seriesList = _toConsumableArray(_this4.brushSeries.list);
|
|
39847
|
+
|
|
39848
|
+
seriesList[chartIdx] = _this4.seriesList;
|
|
39849
|
+
_this4.brushSeries.list = seriesList;
|
|
39850
|
+
_this4.brushSeries.chartIdx = chartIdx;
|
|
39851
|
+
}
|
|
39852
|
+
|
|
39709
39853
|
_this4.update({
|
|
39710
39854
|
updateSeries: false,
|
|
39711
39855
|
updateSelTip: {
|
|
@@ -41424,6 +41568,11 @@ var plugins_interaction_modules = {
|
|
|
41424
41568
|
|
|
41425
41569
|
|
|
41426
41570
|
this.onClick = function (e) {
|
|
41571
|
+
if (_this.isMouseMove) {
|
|
41572
|
+
_this.isMouseMove = false;
|
|
41573
|
+
return;
|
|
41574
|
+
}
|
|
41575
|
+
|
|
41427
41576
|
var args = {
|
|
41428
41577
|
e: e
|
|
41429
41578
|
};
|
|
@@ -41577,6 +41726,7 @@ var plugins_interaction_modules = {
|
|
|
41577
41726
|
var xep;
|
|
41578
41727
|
var yep;
|
|
41579
41728
|
dragInfo.isMove = true;
|
|
41729
|
+
_this2.isMouseMove = true;
|
|
41580
41730
|
|
|
41581
41731
|
if (aOffsetX < aRange.x1) {
|
|
41582
41732
|
xep = aRange.x1;
|
|
@@ -41635,6 +41785,8 @@ var plugins_interaction_modules = {
|
|
|
41635
41785
|
var dragInfo = _this2.dragInfo;
|
|
41636
41786
|
|
|
41637
41787
|
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) {
|
|
41788
|
+
var _this2$options, _this2$options$zoom;
|
|
41789
|
+
|
|
41638
41790
|
var args = {
|
|
41639
41791
|
e: e,
|
|
41640
41792
|
data: _this2.findSelectedItems(dragInfo),
|
|
@@ -41642,13 +41794,28 @@ var plugins_interaction_modules = {
|
|
|
41642
41794
|
};
|
|
41643
41795
|
_this2.dragInfoBackup = lodash_es_defaultsDeep({}, dragInfo);
|
|
41644
41796
|
|
|
41645
|
-
if (typeof _this2.listeners['drag-select'] === 'function') {
|
|
41797
|
+
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)) {
|
|
41646
41798
|
_this2.listeners['drag-select'](args);
|
|
41799
|
+
} else {
|
|
41800
|
+
var xsp = dragInfo.xsp,
|
|
41801
|
+
chartRange = dragInfo.range,
|
|
41802
|
+
dragWidth = dragInfo.width;
|
|
41803
|
+
var dragXsp = xsp - chartRange.x1;
|
|
41804
|
+
args.range.dragSelectionInfo = {
|
|
41805
|
+
dragXsp: dragXsp,
|
|
41806
|
+
dragXep: dragXsp + dragWidth,
|
|
41807
|
+
exceptAxesYChartWidth: chartRange.x2 - chartRange.x1,
|
|
41808
|
+
exceptAxesXChartHeight: chartRange.y2 - chartRange.y1,
|
|
41809
|
+
chartRange: chartRange,
|
|
41810
|
+
chartTitle: _this2.options.title.text
|
|
41811
|
+
};
|
|
41812
|
+
|
|
41813
|
+
_this2.options.zoom.getRangeInfo(args);
|
|
41647
41814
|
}
|
|
41648
|
-
}
|
|
41649
41815
|
|
|
41650
|
-
|
|
41651
|
-
|
|
41816
|
+
if (!_this2.options.dragSelection.keepDisplay) {
|
|
41817
|
+
_this2.removeSelectionArea();
|
|
41818
|
+
}
|
|
41652
41819
|
}
|
|
41653
41820
|
|
|
41654
41821
|
_this2.dragInfo = null;
|
|
@@ -43171,6 +43338,8 @@ var element_tip_modules = {
|
|
|
43171
43338
|
* @returns {undefined}
|
|
43172
43339
|
*/
|
|
43173
43340
|
drawTips: function drawTips(tipLocationInfo) {
|
|
43341
|
+
var _this = this;
|
|
43342
|
+
|
|
43174
43343
|
var opt = this.options;
|
|
43175
43344
|
var isHorizontal = !!opt.horizontal;
|
|
43176
43345
|
var maxTipOpt = opt.maxTip;
|
|
@@ -43179,75 +43348,83 @@ var element_tip_modules = {
|
|
|
43179
43348
|
var maxArgs;
|
|
43180
43349
|
var isExistSelectedLabel;
|
|
43181
43350
|
|
|
43182
|
-
|
|
43183
|
-
|
|
43184
|
-
|
|
43351
|
+
var executeDrawTip = function executeDrawTip(tipOpt) {
|
|
43352
|
+
tipLocationInfo.forEach(function (tipInfo) {
|
|
43353
|
+
if (tipInfo && !isExistSelectedLabel) {
|
|
43354
|
+
var seriesInfo = _this.seriesList[tipInfo === null || tipInfo === void 0 ? void 0 : tipInfo.sId];
|
|
43185
43355
|
|
|
43186
|
-
|
|
43187
|
-
|
|
43356
|
+
if (!(seriesInfo !== null && seriesInfo !== void 0 && seriesInfo.show)) {
|
|
43357
|
+
return;
|
|
43358
|
+
}
|
|
43188
43359
|
|
|
43189
|
-
|
|
43190
|
-
return;
|
|
43191
|
-
}
|
|
43360
|
+
var selArgs = _this.calculateTipInfo(seriesInfo, 'sel', tipInfo);
|
|
43192
43361
|
|
|
43193
|
-
|
|
43362
|
+
if (selArgs) {
|
|
43363
|
+
var _maxArgs;
|
|
43194
43364
|
|
|
43195
|
-
|
|
43196
|
-
var _maxArgs;
|
|
43365
|
+
var isSamePos = false;
|
|
43197
43366
|
|
|
43198
|
-
|
|
43367
|
+
if (maxTipOpt.use && ((_maxArgs = maxArgs) === null || _maxArgs === void 0 ? void 0 : _maxArgs.dp) === selArgs.dp) {
|
|
43368
|
+
isSamePos = true;
|
|
43369
|
+
}
|
|
43199
43370
|
|
|
43200
|
-
|
|
43201
|
-
|
|
43202
|
-
|
|
43371
|
+
if (tipOpt.showTextTip || tipOpt.showTip) {
|
|
43372
|
+
if (tipOpt.tipText === 'label') {
|
|
43373
|
+
var axisOpt = isHorizontal ? opt.axesY[0] : opt.axesX[0];
|
|
43374
|
+
var label = selArgs.label;
|
|
43375
|
+
selArgs.text = axisOpt.type === 'time' ? dayjs_min_default()(label).format(axisOpt.timeFormat) : label;
|
|
43376
|
+
} else {
|
|
43377
|
+
selArgs.text = numberWithComma(selArgs.value);
|
|
43378
|
+
}
|
|
43203
43379
|
|
|
43204
|
-
|
|
43205
|
-
|
|
43206
|
-
|
|
43207
|
-
|
|
43208
|
-
|
|
43209
|
-
|
|
43210
|
-
|
|
43211
|
-
}
|
|
43380
|
+
_this.drawTextTip(_objectSpread2({
|
|
43381
|
+
opt: tipOpt,
|
|
43382
|
+
tipType: 'sel',
|
|
43383
|
+
seriesOpt: seriesInfo,
|
|
43384
|
+
isSamePos: isSamePos
|
|
43385
|
+
}, selArgs));
|
|
43386
|
+
}
|
|
43212
43387
|
|
|
43213
|
-
|
|
43214
|
-
|
|
43215
|
-
|
|
43216
|
-
|
|
43217
|
-
|
|
43218
|
-
|
|
43219
|
-
|
|
43388
|
+
if (tipOpt.showIndicator) {
|
|
43389
|
+
_this.drawFixedIndicator(_objectSpread2({
|
|
43390
|
+
opt: tipOpt,
|
|
43391
|
+
seriesOpt: seriesInfo
|
|
43392
|
+
}, selArgs));
|
|
43393
|
+
}
|
|
43394
|
+
}
|
|
43220
43395
|
|
|
43221
|
-
|
|
43222
|
-
|
|
43223
|
-
|
|
43224
|
-
seriesOpt: seriesInfo
|
|
43225
|
-
}, selArgs));
|
|
43396
|
+
if (tipInfo && tipInfo !== null && tipInfo !== void 0 && tipInfo.label && (tipInfo === null || tipInfo === void 0 ? void 0 : tipInfo.label) === 0) {
|
|
43397
|
+
_this.lastHitInfo = tipInfo;
|
|
43398
|
+
}
|
|
43226
43399
|
}
|
|
43227
|
-
}
|
|
43400
|
+
});
|
|
43401
|
+
};
|
|
43228
43402
|
|
|
43229
|
-
|
|
43230
|
-
|
|
43403
|
+
if (tipLocationInfo) {
|
|
43404
|
+
if (selTipOpt.use) {
|
|
43405
|
+
executeDrawTip(selTipOpt);
|
|
43406
|
+
} else if (labelTipOpt.use) {
|
|
43407
|
+
executeDrawTip(labelTipOpt);
|
|
43231
43408
|
}
|
|
43232
43409
|
}
|
|
43233
43410
|
|
|
43234
43411
|
if (maxTipOpt.use && !isExistSelectedLabel) {
|
|
43235
43412
|
var maxSID = this.minMax[isHorizontal ? 'x' : 'y'][0].maxSID;
|
|
43236
|
-
var
|
|
43237
|
-
maxArgs = this.calculateTipInfo(
|
|
43413
|
+
var seriesInfo = this.seriesList[maxSID];
|
|
43414
|
+
maxArgs = this.calculateTipInfo(seriesInfo, 'max', null);
|
|
43238
43415
|
|
|
43239
43416
|
if (maxTipOpt.use && maxArgs) {
|
|
43240
43417
|
maxArgs.text = numberWithComma(maxArgs.value);
|
|
43241
43418
|
this.drawTextTip(_objectSpread2({
|
|
43242
43419
|
opt: maxTipOpt,
|
|
43243
43420
|
tipType: 'max',
|
|
43244
|
-
seriesOpt:
|
|
43421
|
+
seriesOpt: seriesInfo
|
|
43245
43422
|
}, maxArgs));
|
|
43246
43423
|
|
|
43247
43424
|
if (maxTipOpt.showIndicator) {
|
|
43248
43425
|
this.drawFixedIndicator(_objectSpread2({
|
|
43249
43426
|
opt: maxTipOpt,
|
|
43250
|
-
seriesOpt:
|
|
43427
|
+
seriesOpt: seriesInfo
|
|
43251
43428
|
}, maxArgs));
|
|
43252
43429
|
}
|
|
43253
43430
|
}
|
|
@@ -43431,7 +43608,7 @@ var element_tip_modules = {
|
|
|
43431
43608
|
* @returns {boolean} Whether drew at least one tip
|
|
43432
43609
|
*/
|
|
43433
43610
|
drawLabelTip: function drawLabelTip() {
|
|
43434
|
-
var
|
|
43611
|
+
var _this2 = this;
|
|
43435
43612
|
|
|
43436
43613
|
var opt = this.options;
|
|
43437
43614
|
var isHorizontal = !!opt.horizontal;
|
|
@@ -43467,10 +43644,10 @@ var element_tip_modules = {
|
|
|
43467
43644
|
offset *= isHorizontal ? 1 : -1;
|
|
43468
43645
|
var seriesList = Object.keys((_this$seriesList = this.seriesList) !== null && _this$seriesList !== void 0 ? _this$seriesList : {});
|
|
43469
43646
|
var visibleSeries = seriesList.filter(function (sId) {
|
|
43470
|
-
return
|
|
43647
|
+
return _this2.seriesList[sId].show;
|
|
43471
43648
|
});
|
|
43472
43649
|
var isExistGrp = seriesList.some(function (sId) {
|
|
43473
|
-
return
|
|
43650
|
+
return _this2.seriesList[sId].isExistGrp;
|
|
43474
43651
|
});
|
|
43475
43652
|
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$ : [];
|
|
43476
43653
|
var gp;
|
|
@@ -43490,9 +43667,9 @@ var element_tip_modules = {
|
|
|
43490
43667
|
} else {
|
|
43491
43668
|
graphX = this.axesSteps.x[0];
|
|
43492
43669
|
lineSeries = seriesList.find(function (sId) {
|
|
43493
|
-
var
|
|
43670
|
+
var _this2$seriesList$sId;
|
|
43494
43671
|
|
|
43495
|
-
return ((
|
|
43672
|
+
return ((_this2$seriesList$sId = _this2.seriesList[sId]) === null || _this2$seriesList$sId === void 0 ? void 0 : _this2$seriesList$sId.type) === 'line';
|
|
43496
43673
|
});
|
|
43497
43674
|
sizeObj = this.seriesList[lineSeries].size;
|
|
43498
43675
|
}
|
|
@@ -43535,8 +43712,8 @@ var element_tip_modules = {
|
|
|
43535
43712
|
gp = valuePositionCalcFunction(value, valueAxesRange.min, valueAxesRange.max, valueSpace, valueStartPoint);
|
|
43536
43713
|
gp += offset;
|
|
43537
43714
|
|
|
43538
|
-
|
|
43539
|
-
context:
|
|
43715
|
+
_this2.showTip({
|
|
43716
|
+
context: _this2.bufferCtx,
|
|
43540
43717
|
x: isHorizontal ? gp : dp,
|
|
43541
43718
|
y: isHorizontal ? dp : gp,
|
|
43542
43719
|
opt: labelTipOpt,
|
|
@@ -43788,7 +43965,7 @@ var element_tip_modules = {
|
|
|
43788
43965
|
|
|
43789
43966
|
|
|
43790
43967
|
var chart_core_EvChart = /*#__PURE__*/function () {
|
|
43791
|
-
function EvChart(target, data, options, listeners, defaultSelectItemInfo, defaultSelectInfo) {
|
|
43968
|
+
function EvChart(target, data, options, listeners, defaultSelectItemInfo, defaultSelectInfo, brushSeries) {
|
|
43792
43969
|
var _this = this;
|
|
43793
43970
|
|
|
43794
43971
|
_classCallCheck(this, EvChart);
|
|
@@ -43796,25 +43973,29 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43796
43973
|
Object.keys(model).forEach(function (key) {
|
|
43797
43974
|
return Object.assign(_this, model[key]);
|
|
43798
43975
|
});
|
|
43799
|
-
|
|
43800
|
-
|
|
43801
|
-
|
|
43802
|
-
|
|
43803
|
-
|
|
43804
|
-
|
|
43976
|
+
|
|
43977
|
+
if (!options.brush) {
|
|
43978
|
+
Object.assign(this, plugins_tooltip);
|
|
43979
|
+
Object.assign(this, plugins_interaction);
|
|
43980
|
+
Object.assign(this, element_tip);
|
|
43981
|
+
Object.assign(this, plugins_legend);
|
|
43982
|
+
Object.assign(this, plugins_pie);
|
|
43983
|
+
Object.assign(this, plugins_title);
|
|
43984
|
+
}
|
|
43805
43985
|
|
|
43806
43986
|
if (options.type === 'heatMap' && options.legend.type === 'gradient') {
|
|
43807
43987
|
Object.assign(this, plugins_legend_gradient);
|
|
43808
43988
|
}
|
|
43809
43989
|
|
|
43990
|
+
this.brushSeries = brushSeries;
|
|
43810
43991
|
this.target = target;
|
|
43811
43992
|
this.data = data;
|
|
43812
43993
|
this.options = options;
|
|
43813
43994
|
this.listeners = listeners;
|
|
43814
43995
|
this.wrapperDOM = document.createElement('div');
|
|
43815
|
-
this.wrapperDOM.className = 'ev-chart-wrapper';
|
|
43996
|
+
this.wrapperDOM.className = options.brush ? 'ev-chart-brush-wrapper' : 'ev-chart-wrapper';
|
|
43816
43997
|
this.chartDOM = document.createElement('div');
|
|
43817
|
-
this.chartDOM.className = 'ev-chart-container';
|
|
43998
|
+
this.chartDOM.className = options.brush ? 'ev-chart-brush-container' : 'ev-chart-container';
|
|
43818
43999
|
this.wrapperDOM.appendChild(this.chartDOM);
|
|
43819
44000
|
this.target.appendChild(this.wrapperDOM);
|
|
43820
44001
|
this.displayCanvas = document.createElement('canvas');
|
|
@@ -43823,16 +44004,21 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43823
44004
|
this.bufferCanvas = document.createElement('canvas');
|
|
43824
44005
|
this.bufferCanvas.setAttribute('style', 'display: block;');
|
|
43825
44006
|
this.bufferCtx = this.bufferCanvas.getContext('2d');
|
|
43826
|
-
this.overlayCanvas = document.createElement('canvas');
|
|
43827
|
-
this.overlayCanvas.setAttribute('style', 'display: block;');
|
|
43828
|
-
this.overlayCtx = this.overlayCanvas.getContext('2d');
|
|
43829
44007
|
this.pixelRatio = window.devicePixelRatio || 1;
|
|
43830
44008
|
this.oldPixelRatio = this.pixelRatio;
|
|
43831
44009
|
this.chartDOM.appendChild(this.displayCanvas);
|
|
43832
|
-
|
|
43833
|
-
|
|
43834
|
-
|
|
43835
|
-
|
|
44010
|
+
|
|
44011
|
+
if (!options.brush) {
|
|
44012
|
+
this.overlayCanvas = document.createElement('canvas');
|
|
44013
|
+
this.overlayCanvas.setAttribute('style', 'display: block; z-index: 2;');
|
|
44014
|
+
this.overlayCanvas.setAttribute('class', 'overlay-canvas');
|
|
44015
|
+
this.overlayCtx = this.overlayCanvas.getContext('2d');
|
|
44016
|
+
this.chartDOM.appendChild(this.overlayCanvas);
|
|
44017
|
+
this.overlayCanvas.style.position = 'absolute';
|
|
44018
|
+
this.overlayCanvas.style.top = '0px';
|
|
44019
|
+
this.overlayCanvas.style.left = '0px';
|
|
44020
|
+
}
|
|
44021
|
+
|
|
43836
44022
|
this.isInitLegend = false;
|
|
43837
44023
|
this.isInitTitle = false;
|
|
43838
44024
|
this.isInit = false;
|
|
@@ -43864,6 +44050,8 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43864
44050
|
_createClass(EvChart, [{
|
|
43865
44051
|
key: "init",
|
|
43866
44052
|
value: function init() {
|
|
44053
|
+
var _this$initSelectedInf, _this$createEventFunc;
|
|
44054
|
+
|
|
43867
44055
|
var _this$data = this.data,
|
|
43868
44056
|
series = _this$data.series,
|
|
43869
44057
|
data = _this$data.data,
|
|
@@ -43888,7 +44076,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43888
44076
|
this.axesY = this.createAxes('y', axesY);
|
|
43889
44077
|
this.axesRange = this.getAxesRange();
|
|
43890
44078
|
this.labelOffset = this.getLabelOffset();
|
|
43891
|
-
this.initSelectedInfo();
|
|
44079
|
+
(_this$initSelectedInf = this.initSelectedInfo) === null || _this$initSelectedInf === void 0 ? void 0 : _this$initSelectedInf.call(this);
|
|
43892
44080
|
this.drawChart();
|
|
43893
44081
|
|
|
43894
44082
|
if (tooltip.use) {
|
|
@@ -43899,7 +44087,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43899
44087
|
}
|
|
43900
44088
|
}
|
|
43901
44089
|
|
|
43902
|
-
this.createEventFunctions();
|
|
44090
|
+
(_this$createEventFunc = this.createEventFunctions) === null || _this$createEventFunc === void 0 ? void 0 : _this$createEventFunc.call(this);
|
|
43903
44091
|
this.isInit = true;
|
|
43904
44092
|
}
|
|
43905
44093
|
/**
|
|
@@ -43968,7 +44156,9 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43968
44156
|
maxTip = _this$options2.maxTip,
|
|
43969
44157
|
selectLabel = _this$options2.selectLabel,
|
|
43970
44158
|
selectItem = _this$options2.selectItem,
|
|
43971
|
-
selectSeries = _this$options2.selectSeries
|
|
44159
|
+
selectSeries = _this$options2.selectSeries,
|
|
44160
|
+
brush = _this$options2.brush,
|
|
44161
|
+
displayOverflow = _this$options2.displayOverflow;
|
|
43972
44162
|
var opt = {
|
|
43973
44163
|
ctx: this.bufferCtx,
|
|
43974
44164
|
chartRect: this.chartRect,
|
|
@@ -43986,7 +44176,9 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
43986
44176
|
option: selectSeries,
|
|
43987
44177
|
selected: this.defaultSelectInfo
|
|
43988
44178
|
},
|
|
43989
|
-
overlayCtx: this.overlayCtx
|
|
44179
|
+
overlayCtx: this.overlayCtx,
|
|
44180
|
+
isBrush: !!brush,
|
|
44181
|
+
displayOverflow: displayOverflow
|
|
43990
44182
|
};
|
|
43991
44183
|
var showIndex = 0;
|
|
43992
44184
|
var showSeriesCount = 0;
|
|
@@ -44112,17 +44304,21 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44112
44304
|
}, {
|
|
44113
44305
|
key: "drawTip",
|
|
44114
44306
|
value: function drawTip() {
|
|
44307
|
+
var _this$drawTips;
|
|
44308
|
+
|
|
44115
44309
|
var tipLocationInfo;
|
|
44116
44310
|
|
|
44117
44311
|
if (this.lastHitInfo) {
|
|
44118
44312
|
tipLocationInfo = this.lastHitInfo;
|
|
44119
44313
|
} else if (this.defaultSelectItemInfo) {
|
|
44120
44314
|
tipLocationInfo = this.getItem(this.defaultSelectItemInfo, false);
|
|
44315
|
+
} else if (this.defaultSelectInfo && this.options.selectLabel.use) {
|
|
44316
|
+
tipLocationInfo = this.getItem(this.defaultSelectInfo, false);
|
|
44121
44317
|
} else {
|
|
44122
44318
|
tipLocationInfo = null;
|
|
44123
44319
|
}
|
|
44124
44320
|
|
|
44125
|
-
this.drawTips(tipLocationInfo);
|
|
44321
|
+
(_this$drawTips = this.drawTips) === null || _this$drawTips === void 0 ? void 0 : _this$drawTips.call(this, tipLocationInfo);
|
|
44126
44322
|
}
|
|
44127
44323
|
/**
|
|
44128
44324
|
* Create axes
|
|
@@ -44281,7 +44477,10 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44281
44477
|
}
|
|
44282
44478
|
|
|
44283
44479
|
this.bufferCtx.scale(this.pixelRatio, this.pixelRatio);
|
|
44284
|
-
|
|
44480
|
+
|
|
44481
|
+
if (this.overlayCtx) {
|
|
44482
|
+
this.overlayCtx.scale(this.pixelRatio, this.pixelRatio);
|
|
44483
|
+
}
|
|
44285
44484
|
}
|
|
44286
44485
|
/**
|
|
44287
44486
|
* Get chart DOM size and set canvas size
|
|
@@ -44375,8 +44574,11 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44375
44574
|
this.displayCanvas.style.width = "".concat(width, "px");
|
|
44376
44575
|
this.bufferCanvas.width = width * this.pixelRatio;
|
|
44377
44576
|
this.bufferCanvas.style.width = "".concat(width, "px");
|
|
44378
|
-
|
|
44379
|
-
this.overlayCanvas
|
|
44577
|
+
|
|
44578
|
+
if (this.overlayCanvas) {
|
|
44579
|
+
this.overlayCanvas.width = width * this.pixelRatio;
|
|
44580
|
+
this.overlayCanvas.style.width = "".concat(width, "px");
|
|
44581
|
+
}
|
|
44380
44582
|
}
|
|
44381
44583
|
/**
|
|
44382
44584
|
* Set canvas height
|
|
@@ -44396,8 +44598,11 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44396
44598
|
this.displayCanvas.style.height = "".concat(height, "px");
|
|
44397
44599
|
this.bufferCanvas.height = height * this.pixelRatio;
|
|
44398
44600
|
this.bufferCanvas.style.height = "".concat(height, "px");
|
|
44399
|
-
|
|
44400
|
-
this.overlayCanvas
|
|
44601
|
+
|
|
44602
|
+
if (this.overlayCanvas) {
|
|
44603
|
+
this.overlayCanvas.height = height * this.pixelRatio;
|
|
44604
|
+
this.overlayCanvas.style.height = "".concat(height, "px");
|
|
44605
|
+
}
|
|
44401
44606
|
}
|
|
44402
44607
|
/**
|
|
44403
44608
|
* Calculate labels offset from chart rect (Axis 영역을 벗어나는 label 크기 계산)
|
|
@@ -44485,6 +44690,8 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44485
44690
|
}, {
|
|
44486
44691
|
key: "update",
|
|
44487
44692
|
value: function update(updateInfo) {
|
|
44693
|
+
var _this$initSelectedInf2;
|
|
44694
|
+
|
|
44488
44695
|
var options = this.options;
|
|
44489
44696
|
var data = this.data.data;
|
|
44490
44697
|
var labels = this.data.labels;
|
|
@@ -44580,7 +44787,7 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44580
44787
|
this.axesY = this.createAxes('y', options.axesY);
|
|
44581
44788
|
this.axesRange = this.getAxesRange();
|
|
44582
44789
|
this.labelOffset = this.getLabelOffset();
|
|
44583
|
-
this.initSelectedInfo();
|
|
44790
|
+
(_this$initSelectedInf2 = this.initSelectedInfo) === null || _this$initSelectedInf2 === void 0 ? void 0 : _this$initSelectedInf2.call(this);
|
|
44584
44791
|
this.render(updateInfo === null || updateInfo === void 0 ? void 0 : updateInfo.hitInfo);
|
|
44585
44792
|
var isDragMove = this.dragInfo && this.drawSelectionArea;
|
|
44586
44793
|
|
|
@@ -44646,13 +44853,15 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44646
44853
|
}
|
|
44647
44854
|
/**
|
|
44648
44855
|
* Resize chart
|
|
44856
|
+
* @param {Function} promiseRes After evChart resize completes,
|
|
44857
|
+
* callback completion status with promiseRes to draw a Brush over it.
|
|
44649
44858
|
*
|
|
44650
44859
|
* @returns {undefined}
|
|
44651
44860
|
*/
|
|
44652
44861
|
|
|
44653
44862
|
}, {
|
|
44654
44863
|
key: "resize",
|
|
44655
|
-
value: function resize() {
|
|
44864
|
+
value: function resize(promiseRes) {
|
|
44656
44865
|
this.clear();
|
|
44657
44866
|
this.bufferCtx.restore();
|
|
44658
44867
|
this.bufferCtx.save();
|
|
@@ -44660,6 +44869,10 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44660
44869
|
this.initScale();
|
|
44661
44870
|
this.chartRect = this.getChartRect();
|
|
44662
44871
|
this.drawChart();
|
|
44872
|
+
|
|
44873
|
+
if (promiseRes) {
|
|
44874
|
+
promiseRes(true);
|
|
44875
|
+
}
|
|
44663
44876
|
}
|
|
44664
44877
|
/**
|
|
44665
44878
|
* Render chart
|
|
@@ -44756,12 +44969,541 @@ var chart_core_EvChart = /*#__PURE__*/function () {
|
|
|
44756
44969
|
}();
|
|
44757
44970
|
|
|
44758
44971
|
/* harmony default export */ var chart_core = (chart_core_EvChart);
|
|
44972
|
+
// 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
|
|
44973
|
+
|
|
44974
|
+
|
|
44975
|
+
|
|
44976
|
+
var ChartToolbarvue_type_template_id_691b9473_scoped_true_withId = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withScopeId"])("data-v-691b9473");
|
|
44977
|
+
|
|
44978
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-691b9473");
|
|
44979
|
+
|
|
44980
|
+
var ChartToolbarvue_type_template_id_691b9473_scoped_true_hoisted_1 = {
|
|
44981
|
+
class: "ev-chart__toolbar__wrapper"
|
|
44982
|
+
};
|
|
44983
|
+
var ChartToolbarvue_type_template_id_691b9473_scoped_true_hoisted_2 = {
|
|
44984
|
+
class: "ev-chart__toolbar__wrapper__icon"
|
|
44985
|
+
};
|
|
44986
|
+
|
|
44987
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])();
|
|
44988
|
+
|
|
44989
|
+
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) {
|
|
44990
|
+
var _component_ev_icon = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ev-icon");
|
|
44991
|
+
|
|
44992
|
+
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) {
|
|
44993
|
+
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_ev_icon, {
|
|
44994
|
+
key: "".concat(iconType, "-").concat(option.icon),
|
|
44995
|
+
class: iconType,
|
|
44996
|
+
icon: option.icon,
|
|
44997
|
+
size: option.size,
|
|
44998
|
+
title: option.title,
|
|
44999
|
+
onClick: function onClick($event) {
|
|
45000
|
+
return _ctx.$emit('onClickToolbar', $event, iconType);
|
|
45001
|
+
}
|
|
45002
|
+
}, null, 8, ["class", "icon", "size", "title", "onClick"]);
|
|
45003
|
+
}), 128))])]);
|
|
45004
|
+
});
|
|
45005
|
+
// CONCATENATED MODULE: ./src/components/chart/ChartToolbar.vue?vue&type=template&id=691b9473&scoped=true
|
|
45006
|
+
|
|
45007
|
+
// 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
|
|
45008
|
+
/* harmony default export */ var ChartToolbarvue_type_script_lang_js = ({
|
|
45009
|
+
name: 'EvChartToolbar',
|
|
45010
|
+
props: {
|
|
45011
|
+
toolbar: {
|
|
45012
|
+
type: Object,
|
|
45013
|
+
default: function _default() {
|
|
45014
|
+
return {};
|
|
45015
|
+
}
|
|
45016
|
+
}
|
|
45017
|
+
},
|
|
45018
|
+
emits: ['onClickToolbar']
|
|
45019
|
+
});
|
|
45020
|
+
// CONCATENATED MODULE: ./src/components/chart/ChartToolbar.vue?vue&type=script&lang=js
|
|
45021
|
+
|
|
45022
|
+
// EXTERNAL MODULE: ./src/components/chart/ChartToolbar.vue?vue&type=style&index=0&id=691b9473&lang=scss&scoped=true
|
|
45023
|
+
var ChartToolbarvue_type_style_index_0_id_691b9473_lang_scss_scoped_true = __webpack_require__("6938");
|
|
45024
|
+
|
|
45025
|
+
// CONCATENATED MODULE: ./src/components/chart/ChartToolbar.vue
|
|
45026
|
+
|
|
45027
|
+
|
|
45028
|
+
|
|
45029
|
+
|
|
45030
|
+
|
|
45031
|
+
|
|
45032
|
+
|
|
45033
|
+
const ChartToolbar_exports_ = /*#__PURE__*/exportHelper_default()(ChartToolbarvue_type_script_lang_js, [['render',ChartToolbarvue_type_template_id_691b9473_scoped_true_render],['__scopeId',"data-v-691b9473"]])
|
|
45034
|
+
|
|
45035
|
+
/* harmony default export */ var ChartToolbar = (ChartToolbar_exports_);
|
|
45036
|
+
// CONCATENATED MODULE: ./src/components/chart/chartZoom.core.js
|
|
45037
|
+
|
|
45038
|
+
|
|
45039
|
+
|
|
45040
|
+
|
|
45041
|
+
|
|
45042
|
+
|
|
45043
|
+
|
|
45044
|
+
|
|
45045
|
+
|
|
45046
|
+
|
|
45047
|
+
|
|
45048
|
+
|
|
45049
|
+
|
|
45050
|
+
|
|
45051
|
+
|
|
45052
|
+
var chartZoom_core_EvChartZoom = /*#__PURE__*/function () {
|
|
45053
|
+
function EvChartZoom(evChartInfo, evChartClone, evChartZoomOptions, evChartToolbarRef, isExecuteZoom, brushIdx, emitFunc) {
|
|
45054
|
+
_classCallCheck(this, EvChartZoom);
|
|
45055
|
+
|
|
45056
|
+
this.isExecuteZoom = isExecuteZoom;
|
|
45057
|
+
this.evChartProps = evChartInfo.props;
|
|
45058
|
+
this.evChartCloneData = evChartClone.data;
|
|
45059
|
+
this.brushIdx = brushIdx;
|
|
45060
|
+
this.setEvChartZoomOptions(evChartZoomOptions);
|
|
45061
|
+
this.setIcon(evChartToolbarRef);
|
|
45062
|
+
var cloneLabelsLastIdx = evChartClone.data[0].labels.length - 1;
|
|
45063
|
+
this.cloneLabelsLastIdx = cloneLabelsLastIdx;
|
|
45064
|
+
this.isAnimationFinish = true;
|
|
45065
|
+
this.zoomAreaMemory = {
|
|
45066
|
+
previous: [],
|
|
45067
|
+
current: [[0, cloneLabelsLastIdx]],
|
|
45068
|
+
latest: []
|
|
45069
|
+
};
|
|
45070
|
+
|
|
45071
|
+
if (emitFunc) {
|
|
45072
|
+
this.emitFunc = emitFunc;
|
|
45073
|
+
emitFunc.updateZoomStartIdx(0);
|
|
45074
|
+
emitFunc.updateZoomEndIdx(cloneLabelsLastIdx);
|
|
45075
|
+
}
|
|
45076
|
+
|
|
45077
|
+
this.wrapWheelMoveZoomArea = this.wheelMoveZoomArea.bind(this);
|
|
45078
|
+
this.evChartDomContainers = this.drawAnimationCanvas(evChartInfo.dom);
|
|
45079
|
+
}
|
|
45080
|
+
|
|
45081
|
+
_createClass(EvChartZoom, [{
|
|
45082
|
+
key: "setEvChartZoomOptions",
|
|
45083
|
+
value: function setEvChartZoomOptions(options) {
|
|
45084
|
+
this.evChartZoomOptions = options;
|
|
45085
|
+
}
|
|
45086
|
+
}, {
|
|
45087
|
+
key: "setIcon",
|
|
45088
|
+
value: function setIcon(evChartToolbarRef) {
|
|
45089
|
+
if (!evChartToolbarRef) {
|
|
45090
|
+
return;
|
|
45091
|
+
}
|
|
45092
|
+
|
|
45093
|
+
var dragZoomIcon = evChartToolbarRef.querySelector('.dragZoom');
|
|
45094
|
+
this.resetIcon = evChartToolbarRef.querySelector('.reset');
|
|
45095
|
+
this.previousIcon = evChartToolbarRef.querySelector('.previous');
|
|
45096
|
+
this.latestIcon = evChartToolbarRef.querySelector('.latest');
|
|
45097
|
+
this.dragZoomIcon = dragZoomIcon;
|
|
45098
|
+
this.iconStyle(dragZoomIcon, 'enable');
|
|
45099
|
+
}
|
|
45100
|
+
}, {
|
|
45101
|
+
key: "drawAnimationCanvas",
|
|
45102
|
+
value: function drawAnimationCanvas(evChartDom) {
|
|
45103
|
+
evChartDom.forEach(function (dom) {
|
|
45104
|
+
var animationCanvas = document.createElement('canvas');
|
|
45105
|
+
animationCanvas.setAttribute('style', 'display: block;');
|
|
45106
|
+
animationCanvas.setAttribute('class', 'animation-canvas');
|
|
45107
|
+
animationCanvas.style.position = 'absolute';
|
|
45108
|
+
dom.appendChild(animationCanvas);
|
|
45109
|
+
});
|
|
45110
|
+
return evChartDom;
|
|
45111
|
+
}
|
|
45112
|
+
}, {
|
|
45113
|
+
key: "setEventListener",
|
|
45114
|
+
value: function setEventListener(isUseZoomMode) {
|
|
45115
|
+
var _this = this;
|
|
45116
|
+
|
|
45117
|
+
var toggleEventListener = isUseZoomMode ? 'addEventListener' : 'removeEventListener';
|
|
45118
|
+
this.isUseZoomMode = isUseZoomMode;
|
|
45119
|
+
this.evChartDomContainers.forEach(function (dom) {
|
|
45120
|
+
dom[toggleEventListener]('wheel', _this.wrapWheelMoveZoomArea);
|
|
45121
|
+
});
|
|
45122
|
+
}
|
|
45123
|
+
}, {
|
|
45124
|
+
key: "wheelMoveZoomArea",
|
|
45125
|
+
value: function wheelMoveZoomArea(e) {
|
|
45126
|
+
e.preventDefault();
|
|
45127
|
+
|
|
45128
|
+
var _this$zoomAreaMemory$ = _slicedToArray(this.zoomAreaMemory.current[0], 2),
|
|
45129
|
+
zoomStartIdx = _this$zoomAreaMemory$[0],
|
|
45130
|
+
zoomEndIdx = _this$zoomAreaMemory$[1];
|
|
45131
|
+
|
|
45132
|
+
if (zoomStartIdx === zoomEndIdx) {
|
|
45133
|
+
return;
|
|
45134
|
+
}
|
|
45135
|
+
|
|
45136
|
+
var zoomMoveStartIdx;
|
|
45137
|
+
var zoomMoveEndIdx;
|
|
45138
|
+
|
|
45139
|
+
if (e.deltaY > 0) {
|
|
45140
|
+
if (!zoomStartIdx) {
|
|
45141
|
+
return;
|
|
45142
|
+
}
|
|
45143
|
+
|
|
45144
|
+
zoomMoveStartIdx = zoomStartIdx - 1;
|
|
45145
|
+
zoomMoveEndIdx = zoomEndIdx - 1;
|
|
45146
|
+
} else {
|
|
45147
|
+
if (zoomEndIdx === this.cloneLabelsLastIdx) {
|
|
45148
|
+
return;
|
|
45149
|
+
}
|
|
45150
|
+
|
|
45151
|
+
zoomMoveStartIdx = zoomStartIdx + 1;
|
|
45152
|
+
zoomMoveEndIdx = zoomEndIdx + 1;
|
|
45153
|
+
}
|
|
45154
|
+
|
|
45155
|
+
this.isUseToolbar = true;
|
|
45156
|
+
this.executeZoom(zoomMoveStartIdx, zoomMoveEndIdx);
|
|
45157
|
+
this.zoomAreaMemory.current[0] = [zoomMoveStartIdx, zoomMoveEndIdx];
|
|
45158
|
+
}
|
|
45159
|
+
}, {
|
|
45160
|
+
key: "clickMoveZoomArea",
|
|
45161
|
+
value: function clickMoveZoomArea(direction) {
|
|
45162
|
+
if (!this.zoomAreaMemory[direction].length) {
|
|
45163
|
+
return;
|
|
45164
|
+
}
|
|
45165
|
+
|
|
45166
|
+
var _this$zoomAreaMemory$2 = this.zoomAreaMemory[direction].pop(),
|
|
45167
|
+
_this$zoomAreaMemory$3 = _slicedToArray(_this$zoomAreaMemory$2, 2),
|
|
45168
|
+
zoomStartIdx = _this$zoomAreaMemory$3[0],
|
|
45169
|
+
zoomEndIdx = _this$zoomAreaMemory$3[1];
|
|
45170
|
+
|
|
45171
|
+
this.isUseToolbar = true;
|
|
45172
|
+
this.executeZoom(zoomStartIdx, zoomEndIdx);
|
|
45173
|
+
this.setZoomAreaMemory(zoomStartIdx, zoomEndIdx, direction === 'previous' ? 'latest' : 'previous');
|
|
45174
|
+
}
|
|
45175
|
+
}, {
|
|
45176
|
+
key: "dragZoom",
|
|
45177
|
+
value: function dragZoom(_ref) {
|
|
45178
|
+
var zoomInfoData = _ref.data,
|
|
45179
|
+
dragSelectionInfo = _ref.range.dragSelectionInfo;
|
|
45180
|
+
var dragXsp = dragSelectionInfo.dragXsp,
|
|
45181
|
+
dragXep = dragSelectionInfo.dragXep,
|
|
45182
|
+
exceptAxesYChartWidth = dragSelectionInfo.exceptAxesYChartWidth,
|
|
45183
|
+
chartTitle = dragSelectionInfo.chartTitle;
|
|
45184
|
+
var _this$evChartProps = this.evChartProps,
|
|
45185
|
+
evChartOptions = _this$evChartProps.options,
|
|
45186
|
+
evChartData = _this$evChartProps.data;
|
|
45187
|
+
var dragChartIdx = evChartOptions.length > 1 ? evChartOptions.findIndex(function (option) {
|
|
45188
|
+
var _option$title$text, _option$title;
|
|
45189
|
+
|
|
45190
|
+
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;
|
|
45191
|
+
}) : 0;
|
|
45192
|
+
|
|
45193
|
+
if (evChartOptions[dragChartIdx].axesX[0].type === 'time') {
|
|
45194
|
+
var zoomSeries = zoomInfoData[0].items;
|
|
45195
|
+
var zoomStartDate = zoomSeries[0].x;
|
|
45196
|
+
var zoomEndDate = zoomSeries[zoomSeries.length - 1].x;
|
|
45197
|
+
var currentChartDataLabels = evChartData[dragChartIdx].labels;
|
|
45198
|
+
var cloneChartDataLabels = this.evChartCloneData[dragChartIdx].labels;
|
|
45199
|
+
|
|
45200
|
+
var _this$zoomAreaMemory$4 = _slicedToArray(this.zoomAreaMemory.current[0], 2),
|
|
45201
|
+
currentZoomStartIdx = _this$zoomAreaMemory$4[0],
|
|
45202
|
+
currentZoomEndIdx = _this$zoomAreaMemory$4[1];
|
|
45203
|
+
|
|
45204
|
+
var newZoomStartIdx = cloneChartDataLabels.findIndex(function (label) {
|
|
45205
|
+
return +label.$d === +zoomStartDate.$d;
|
|
45206
|
+
});
|
|
45207
|
+
var newZoomEndIdx = cloneChartDataLabels.findLastIndex(function (label) {
|
|
45208
|
+
return +label.$d === +zoomEndDate.$d;
|
|
45209
|
+
});
|
|
45210
|
+
|
|
45211
|
+
var calculateAxesXPosition = function calculateAxesXPosition(zoomIdx) {
|
|
45212
|
+
var axesXInterval = exceptAxesYChartWidth / (currentChartDataLabels.length - 1);
|
|
45213
|
+
return axesXInterval * (zoomIdx - currentZoomStartIdx);
|
|
45214
|
+
};
|
|
45215
|
+
|
|
45216
|
+
var newDragStartAxesX = calculateAxesXPosition(newZoomStartIdx);
|
|
45217
|
+
|
|
45218
|
+
if (newZoomStartIdx === newZoomEndIdx) {
|
|
45219
|
+
// drag 영역에 한 포인트만 있을 경우
|
|
45220
|
+
if (newDragStartAxesX - dragXsp >= dragXep - newDragStartAxesX) {
|
|
45221
|
+
newZoomStartIdx -= 1;
|
|
45222
|
+
} else {
|
|
45223
|
+
newZoomEndIdx += 1;
|
|
45224
|
+
}
|
|
45225
|
+
}
|
|
45226
|
+
|
|
45227
|
+
if (newZoomStartIdx === currentZoomStartIdx && newZoomEndIdx === currentZoomEndIdx) {
|
|
45228
|
+
return;
|
|
45229
|
+
}
|
|
45230
|
+
|
|
45231
|
+
if (newZoomStartIdx - newZoomEndIdx === -1) {
|
|
45232
|
+
newDragStartAxesX = calculateAxesXPosition(newZoomStartIdx);
|
|
45233
|
+
}
|
|
45234
|
+
|
|
45235
|
+
var newDragEndAxesX = calculateAxesXPosition(newZoomEndIdx);
|
|
45236
|
+
this.dragZoomAnimation(dragSelectionInfo, newZoomStartIdx, newZoomEndIdx, newDragStartAxesX, newDragEndAxesX);
|
|
45237
|
+
}
|
|
45238
|
+
}
|
|
45239
|
+
}, {
|
|
45240
|
+
key: "dragZoomAnimation",
|
|
45241
|
+
value: function dragZoomAnimation(dragSelectionInfo, newZoomStartIdx, newZoomEndIdx, newDragStartAxesX, newDragEndAxesX) {
|
|
45242
|
+
var _this2 = this;
|
|
45243
|
+
|
|
45244
|
+
var chartRange = dragSelectionInfo.chartRange,
|
|
45245
|
+
exceptAxesYChartWidth = dragSelectionInfo.exceptAxesYChartWidth,
|
|
45246
|
+
exceptAxesXChartHeight = dragSelectionInfo.exceptAxesXChartHeight;
|
|
45247
|
+
var pixelRatio = window.devicePixelRatio || 1;
|
|
45248
|
+
var displayAnimaionCanvas = Array.from(this.evChartDomContainers).map(function (container) {
|
|
45249
|
+
var animationCanvas = container.querySelector('.animation-canvas');
|
|
45250
|
+
var displayCanvas = container.children[0];
|
|
45251
|
+
return [displayCanvas, animationCanvas];
|
|
45252
|
+
});
|
|
45253
|
+
|
|
45254
|
+
var _loop = function _loop(idx) {
|
|
45255
|
+
var _displayAnimaionCanva = _slicedToArray(displayAnimaionCanvas[idx], 2),
|
|
45256
|
+
displayCanvas = _displayAnimaionCanva[0],
|
|
45257
|
+
animationCanvas = _displayAnimaionCanva[1];
|
|
45258
|
+
|
|
45259
|
+
var animationCtx = animationCanvas.getContext('2d');
|
|
45260
|
+
animationCanvas.style.top = "".concat(chartRange.y1, "px");
|
|
45261
|
+
animationCanvas.style.left = "".concat(chartRange.x1, "px");
|
|
45262
|
+
animationCanvas.width = exceptAxesYChartWidth * pixelRatio;
|
|
45263
|
+
animationCanvas.style.width = "".concat(exceptAxesYChartWidth, "px");
|
|
45264
|
+
animationCanvas.height = exceptAxesXChartHeight * pixelRatio;
|
|
45265
|
+
animationCanvas.style.height = "".concat(exceptAxesXChartHeight, "px");
|
|
45266
|
+
|
|
45267
|
+
if (animationCanvas.style.display === 'none') {
|
|
45268
|
+
animationCanvas.style.display = 'block';
|
|
45269
|
+
}
|
|
45270
|
+
|
|
45271
|
+
_this2.isAnimationFinish = false;
|
|
45272
|
+
_this2.isUseToolbar = true;
|
|
45273
|
+
|
|
45274
|
+
_this2.executeDragZoomAnimation(displayCanvas, animationCtx, dragSelectionInfo, newDragStartAxesX, newDragEndAxesX).then(function (isAnimationFinish) {
|
|
45275
|
+
animationCanvas.style.display = 'none';
|
|
45276
|
+
|
|
45277
|
+
if (isAnimationFinish && idx === displayAnimaionCanvas.length - 1) {
|
|
45278
|
+
_this2.isAnimationFinish = isAnimationFinish;
|
|
45279
|
+
|
|
45280
|
+
_this2.executeZoom(newZoomStartIdx, newZoomEndIdx);
|
|
45281
|
+
|
|
45282
|
+
_this2.setZoomAreaMemory(newZoomStartIdx, newZoomEndIdx);
|
|
45283
|
+
}
|
|
45284
|
+
});
|
|
45285
|
+
};
|
|
45286
|
+
|
|
45287
|
+
for (var idx = 0; idx < displayAnimaionCanvas.length; idx++) {
|
|
45288
|
+
_loop(idx);
|
|
45289
|
+
}
|
|
45290
|
+
}
|
|
45291
|
+
}, {
|
|
45292
|
+
key: "executeZoom",
|
|
45293
|
+
value: function executeZoom(zoomStartIdx, zoomEndIdx) {
|
|
45294
|
+
if (this.isExecuteZoom) {
|
|
45295
|
+
this.isExecuteZoom.value = true;
|
|
45296
|
+
}
|
|
45297
|
+
|
|
45298
|
+
for (var idx = 0; idx < this.evChartCloneData.length; idx++) {
|
|
45299
|
+
var _this$evChartCloneDat = this.evChartCloneData[idx],
|
|
45300
|
+
cloneData = _this$evChartCloneDat.data,
|
|
45301
|
+
cloneLabels = _this$evChartCloneDat.labels,
|
|
45302
|
+
cloneSeries = _this$evChartCloneDat.series;
|
|
45303
|
+
var evChartData = this.evChartProps.data[idx];
|
|
45304
|
+
var cloneSeriesNames = Object.keys(cloneSeries);
|
|
45305
|
+
|
|
45306
|
+
for (var jdx = 0; jdx < cloneSeriesNames.length; jdx++) {
|
|
45307
|
+
var cloneSeriesName = cloneSeriesNames[jdx];
|
|
45308
|
+
evChartData.data[cloneSeriesName] = cloneData[cloneSeriesName].filter(function (d, dataIdx) {
|
|
45309
|
+
return zoomStartIdx <= dataIdx && zoomEndIdx >= dataIdx;
|
|
45310
|
+
});
|
|
45311
|
+
}
|
|
45312
|
+
|
|
45313
|
+
evChartData.labels = cloneLabels.filter(function (l, labelIdx) {
|
|
45314
|
+
return zoomStartIdx <= labelIdx && zoomEndIdx >= labelIdx;
|
|
45315
|
+
});
|
|
45316
|
+
}
|
|
45317
|
+
|
|
45318
|
+
if (!this.brushIdx.isUseButton && !this.brushIdx.isUseScroll) {
|
|
45319
|
+
this.brushIdx.start = zoomStartIdx;
|
|
45320
|
+
this.brushIdx.end = zoomEndIdx;
|
|
45321
|
+
}
|
|
45322
|
+
|
|
45323
|
+
if (this.emitFunc) {
|
|
45324
|
+
this.emitFunc.updateZoomStartIdx(zoomStartIdx);
|
|
45325
|
+
this.emitFunc.updateZoomEndIdx(zoomEndIdx);
|
|
45326
|
+
}
|
|
45327
|
+
}
|
|
45328
|
+
}, {
|
|
45329
|
+
key: "updateEvChartCloneData",
|
|
45330
|
+
value: function updateEvChartCloneData(evChartClone, isUseZoomMode) {
|
|
45331
|
+
var cloneLabelsLastIdx = evChartClone.data[0].labels.length - 1;
|
|
45332
|
+
this.cloneLabelsLastIdx = cloneLabelsLastIdx;
|
|
45333
|
+
this.evChartCloneData = evChartClone.data;
|
|
45334
|
+
|
|
45335
|
+
if (this.dragZoomIcon) {
|
|
45336
|
+
this.dragZoomIcon.classList.remove('active');
|
|
45337
|
+
}
|
|
45338
|
+
|
|
45339
|
+
this.zoomAreaMemory = {
|
|
45340
|
+
previous: [],
|
|
45341
|
+
current: [[0, cloneLabelsLastIdx]],
|
|
45342
|
+
latest: []
|
|
45343
|
+
};
|
|
45344
|
+
|
|
45345
|
+
if (this.emitFunc) {
|
|
45346
|
+
this.emitFunc.updateZoomStartIdx(0);
|
|
45347
|
+
this.emitFunc.updateZoomEndIdx(cloneLabelsLastIdx);
|
|
45348
|
+
}
|
|
45349
|
+
|
|
45350
|
+
this.setIconStyle(isUseZoomMode);
|
|
45351
|
+
}
|
|
45352
|
+
}, {
|
|
45353
|
+
key: "setZoomAreaMemory",
|
|
45354
|
+
value: function setZoomAreaMemory(zoomStartIdx, zoomEndIdx, direction) {
|
|
45355
|
+
var _this$zoomAreaMemory = this.zoomAreaMemory,
|
|
45356
|
+
previous = _this$zoomAreaMemory.previous,
|
|
45357
|
+
current = _this$zoomAreaMemory.current,
|
|
45358
|
+
latest = _this$zoomAreaMemory.latest;
|
|
45359
|
+
var currentZoomArea = current.pop();
|
|
45360
|
+
var bufferMemoryCnt = this.evChartZoomOptions.zoom.bufferMemoryCnt;
|
|
45361
|
+
|
|
45362
|
+
if (direction) {
|
|
45363
|
+
if (previous.length >= bufferMemoryCnt) {
|
|
45364
|
+
previous.splice(0, previous.length - bufferMemoryCnt + 1);
|
|
45365
|
+
}
|
|
45366
|
+
|
|
45367
|
+
this.zoomAreaMemory[direction].push(currentZoomArea);
|
|
45368
|
+
} else {
|
|
45369
|
+
previous.push(currentZoomArea);
|
|
45370
|
+
latest.length = 0;
|
|
45371
|
+
}
|
|
45372
|
+
|
|
45373
|
+
current.push([zoomStartIdx, zoomEndIdx]);
|
|
45374
|
+
this.setIconStyle(this.isUseZoomMode);
|
|
45375
|
+
}
|
|
45376
|
+
}, {
|
|
45377
|
+
key: "executeDragZoomAnimation",
|
|
45378
|
+
value: function executeDragZoomAnimation(displayCanvas, animationCtx, dragSelectionInfo, newDragStartAxesX, newDragEndAxesX) {
|
|
45379
|
+
var chartRange = dragSelectionInfo.chartRange,
|
|
45380
|
+
exceptAxesYChartWidth = dragSelectionInfo.exceptAxesYChartWidth,
|
|
45381
|
+
exceptAxesXChartHeight = dragSelectionInfo.exceptAxesXChartHeight;
|
|
45382
|
+
var leftDx = 0;
|
|
45383
|
+
var centerDx = newDragStartAxesX;
|
|
45384
|
+
var centerDWidth = newDragEndAxesX - newDragStartAxesX;
|
|
45385
|
+
var rightDx = newDragEndAxesX;
|
|
45386
|
+
var globalAlpha = 1;
|
|
45387
|
+
var globalAlphaSensitivity = 0.0015;
|
|
45388
|
+
var evChartOpacity = 0.5;
|
|
45389
|
+
var evChartMinOpacity = 0.1;
|
|
45390
|
+
var evChartOpacitySensitivity = 0.05;
|
|
45391
|
+
var zoomSpeed = 50;
|
|
45392
|
+
var leftSpeed = Math.ceil(zoomSpeed * (newDragStartAxesX / exceptAxesYChartWidth));
|
|
45393
|
+
var rightSpeed = Math.ceil(zoomSpeed * ((exceptAxesYChartWidth - newDragEndAxesX) / exceptAxesYChartWidth));
|
|
45394
|
+
|
|
45395
|
+
var animate = function animate(responseFinishStatus) {
|
|
45396
|
+
animationCtx.clearRect(0, 0, exceptAxesYChartWidth, exceptAxesXChartHeight);
|
|
45397
|
+
|
|
45398
|
+
if (centerDx <= 0 && centerDWidth >= exceptAxesYChartWidth) {
|
|
45399
|
+
displayCanvas.style.opacity = 'initial';
|
|
45400
|
+
return responseFinishStatus(true);
|
|
45401
|
+
}
|
|
45402
|
+
|
|
45403
|
+
if (evChartOpacity >= evChartMinOpacity) {
|
|
45404
|
+
displayCanvas.style.opacity = evChartOpacity;
|
|
45405
|
+
evChartOpacity -= evChartOpacitySensitivity;
|
|
45406
|
+
}
|
|
45407
|
+
|
|
45408
|
+
animationCtx.globalAlpha = globalAlpha; // 줌 영역 왼쪽
|
|
45409
|
+
|
|
45410
|
+
animationCtx.drawImage(displayCanvas, chartRange.x1, chartRange.y1, newDragStartAxesX, exceptAxesXChartHeight, leftDx, 0, newDragStartAxesX, exceptAxesXChartHeight); // 줌 영역
|
|
45411
|
+
|
|
45412
|
+
animationCtx.drawImage(displayCanvas, chartRange.x1 + newDragStartAxesX, chartRange.y1, newDragEndAxesX - newDragStartAxesX, exceptAxesXChartHeight, centerDx, 0, centerDWidth, exceptAxesXChartHeight); // 줌 영역 오른쪽
|
|
45413
|
+
|
|
45414
|
+
animationCtx.drawImage(displayCanvas, chartRange.x1 + newDragEndAxesX, chartRange.y1, exceptAxesYChartWidth, exceptAxesXChartHeight, rightDx, 0, exceptAxesYChartWidth, exceptAxesXChartHeight);
|
|
45415
|
+
globalAlpha -= globalAlphaSensitivity;
|
|
45416
|
+
leftDx -= leftSpeed;
|
|
45417
|
+
centerDx -= leftSpeed;
|
|
45418
|
+
centerDWidth += leftSpeed + rightSpeed;
|
|
45419
|
+
rightDx += rightSpeed;
|
|
45420
|
+
return requestAnimationFrame(function () {
|
|
45421
|
+
return animate(responseFinishStatus);
|
|
45422
|
+
});
|
|
45423
|
+
};
|
|
45424
|
+
|
|
45425
|
+
return new Promise(function (response) {
|
|
45426
|
+
return animate(response);
|
|
45427
|
+
});
|
|
45428
|
+
}
|
|
45429
|
+
}, {
|
|
45430
|
+
key: "setIconStyle",
|
|
45431
|
+
value: function setIconStyle(isUseZoomMode) {
|
|
45432
|
+
var _this3 = this;
|
|
45433
|
+
|
|
45434
|
+
var toggleIconStyle = function toggleIconStyle(icon, condition) {
|
|
45435
|
+
if (condition) {
|
|
45436
|
+
_this3.iconStyle(icon, 'enable');
|
|
45437
|
+
} else {
|
|
45438
|
+
_this3.iconStyle(icon, 'disable');
|
|
45439
|
+
}
|
|
45440
|
+
};
|
|
45441
|
+
|
|
45442
|
+
if (isUseZoomMode) {
|
|
45443
|
+
var _this$zoomAreaMemory2 = this.zoomAreaMemory,
|
|
45444
|
+
previous = _this$zoomAreaMemory2.previous,
|
|
45445
|
+
latest = _this$zoomAreaMemory2.latest;
|
|
45446
|
+
toggleIconStyle(this.previousIcon, previous.length);
|
|
45447
|
+
toggleIconStyle(this.latestIcon, latest.length);
|
|
45448
|
+
this.iconStyle(this.resetIcon, 'enable');
|
|
45449
|
+
} else {
|
|
45450
|
+
toggleIconStyle(this.resetIcon);
|
|
45451
|
+
toggleIconStyle(this.previousIcon);
|
|
45452
|
+
toggleIconStyle(this.latestIcon);
|
|
45453
|
+
}
|
|
45454
|
+
}
|
|
45455
|
+
}, {
|
|
45456
|
+
key: "iconStyle",
|
|
45457
|
+
value: function iconStyle(icon, mode) {
|
|
45458
|
+
if (!icon) {
|
|
45459
|
+
return;
|
|
45460
|
+
}
|
|
45461
|
+
|
|
45462
|
+
var _ref2 = mode === 'enable' ? [1, 'initial'] : [0.5, 'none'],
|
|
45463
|
+
_ref3 = _slicedToArray(_ref2, 2),
|
|
45464
|
+
opacity = _ref3[0],
|
|
45465
|
+
pointerEvents = _ref3[1];
|
|
45466
|
+
|
|
45467
|
+
icon.style.opacity = opacity;
|
|
45468
|
+
icon.style.pointerEvents = pointerEvents;
|
|
45469
|
+
}
|
|
45470
|
+
}, {
|
|
45471
|
+
key: "initZoom",
|
|
45472
|
+
value: function initZoom() {
|
|
45473
|
+
if (!this.isAnimationFinish) {
|
|
45474
|
+
return;
|
|
45475
|
+
}
|
|
45476
|
+
|
|
45477
|
+
var _this$zoomAreaMemory$5 = _slicedToArray(this.zoomAreaMemory.current[0], 2),
|
|
45478
|
+
currentZoomStartIdx = _this$zoomAreaMemory$5[0],
|
|
45479
|
+
currentZoomEndIdx = _this$zoomAreaMemory$5[1];
|
|
45480
|
+
|
|
45481
|
+
var cloneLabelsLastIdx = this.cloneLabelsLastIdx;
|
|
45482
|
+
|
|
45483
|
+
if (currentZoomStartIdx !== 0 || currentZoomEndIdx !== cloneLabelsLastIdx) {
|
|
45484
|
+
this.isUseToolbar = true;
|
|
45485
|
+
this.executeZoom(0, cloneLabelsLastIdx);
|
|
45486
|
+
this.setZoomAreaMemory(0, cloneLabelsLastIdx);
|
|
45487
|
+
}
|
|
45488
|
+
}
|
|
45489
|
+
}]);
|
|
45490
|
+
|
|
45491
|
+
return EvChartZoom;
|
|
45492
|
+
}();
|
|
45493
|
+
|
|
45494
|
+
|
|
44759
45495
|
// CONCATENATED MODULE: ./src/components/chart/uses.js
|
|
44760
45496
|
|
|
44761
45497
|
|
|
44762
45498
|
|
|
44763
45499
|
|
|
44764
45500
|
|
|
45501
|
+
|
|
45502
|
+
|
|
45503
|
+
|
|
45504
|
+
|
|
45505
|
+
|
|
45506
|
+
|
|
44765
45507
|
var DEFAULT_OPTIONS = {
|
|
44766
45508
|
padding: {
|
|
44767
45509
|
top: 20,
|
|
@@ -44890,6 +45632,7 @@ var DEFAULT_OPTIONS = {
|
|
|
44890
45632
|
selectLabel: {
|
|
44891
45633
|
use: false,
|
|
44892
45634
|
useClick: true,
|
|
45635
|
+
tipText: 'value',
|
|
44893
45636
|
limit: 1,
|
|
44894
45637
|
useDeselectOverflow: false,
|
|
44895
45638
|
showTip: false,
|
|
@@ -44897,7 +45640,18 @@ var DEFAULT_OPTIONS = {
|
|
|
44897
45640
|
useLabelOpacity: true,
|
|
44898
45641
|
fixedPosTop: false,
|
|
44899
45642
|
useApproximateValue: false,
|
|
44900
|
-
tipBackground: '#000000'
|
|
45643
|
+
tipBackground: '#000000',
|
|
45644
|
+
indicatorColor: '#000000',
|
|
45645
|
+
tipStyle: {
|
|
45646
|
+
height: 20,
|
|
45647
|
+
background: '#000000',
|
|
45648
|
+
textColor: '#FFFFFF',
|
|
45649
|
+
fontSize: 14,
|
|
45650
|
+
fontFamily: 'Roboto',
|
|
45651
|
+
fontWeight: 400
|
|
45652
|
+
},
|
|
45653
|
+
showTextTip: false,
|
|
45654
|
+
showIndicator: false
|
|
44901
45655
|
},
|
|
44902
45656
|
selectSeries: {
|
|
44903
45657
|
use: false,
|
|
@@ -44911,6 +45665,34 @@ var DEFAULT_OPTIONS = {
|
|
|
44911
45665
|
fillColor: '#38ACEC',
|
|
44912
45666
|
opacity: 0.65
|
|
44913
45667
|
},
|
|
45668
|
+
zoom: {
|
|
45669
|
+
bufferMemoryCnt: 100,
|
|
45670
|
+
toolbar: {
|
|
45671
|
+
show: false,
|
|
45672
|
+
items: {
|
|
45673
|
+
previous: {
|
|
45674
|
+
icon: 'ev-icon-allow2-left',
|
|
45675
|
+
size: 'medium',
|
|
45676
|
+
title: 'Previous'
|
|
45677
|
+
},
|
|
45678
|
+
latest: {
|
|
45679
|
+
icon: 'ev-icon-allow2-right',
|
|
45680
|
+
size: 'medium',
|
|
45681
|
+
title: 'Latest'
|
|
45682
|
+
},
|
|
45683
|
+
reset: {
|
|
45684
|
+
icon: 'ev-icon-redo',
|
|
45685
|
+
size: 'medium',
|
|
45686
|
+
title: 'Reset'
|
|
45687
|
+
},
|
|
45688
|
+
dragZoom: {
|
|
45689
|
+
icon: 'ev-icon-zoomin',
|
|
45690
|
+
size: 'medium',
|
|
45691
|
+
title: 'Drag Zoom'
|
|
45692
|
+
}
|
|
45693
|
+
}
|
|
45694
|
+
}
|
|
45695
|
+
},
|
|
44914
45696
|
heatMapColor: {
|
|
44915
45697
|
min: '#FFFFFF',
|
|
44916
45698
|
max: '#0052FF',
|
|
@@ -44932,7 +45714,9 @@ var DEFAULT_DATA = {
|
|
|
44932
45714
|
labels: [],
|
|
44933
45715
|
data: {}
|
|
44934
45716
|
};
|
|
44935
|
-
var chart_uses_useModel = function useModel() {
|
|
45717
|
+
var chart_uses_useModel = function useModel(selectedLabel) {
|
|
45718
|
+
var _props$selectedLabel;
|
|
45719
|
+
|
|
44936
45720
|
var _getCurrentInstance = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["getCurrentInstance"])(),
|
|
44937
45721
|
props = _getCurrentInstance.props,
|
|
44938
45722
|
emit = _getCurrentInstance.emit;
|
|
@@ -44961,7 +45745,7 @@ var chart_uses_useModel = function useModel() {
|
|
|
44961
45745
|
};
|
|
44962
45746
|
|
|
44963
45747
|
var selectItemInfo = lodash_es_cloneDeep(props.selectedItem);
|
|
44964
|
-
var selectLabelInfo = lodash_es_cloneDeep(props.selectedLabel);
|
|
45748
|
+
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);
|
|
44965
45749
|
var selectSeriesInfo = lodash_es_cloneDeep(props.selectedSeries);
|
|
44966
45750
|
var eventListeners = {
|
|
44967
45751
|
click: function () {
|
|
@@ -44984,9 +45768,13 @@ var chart_uses_useModel = function useModel() {
|
|
|
44984
45768
|
}
|
|
44985
45769
|
|
|
44986
45770
|
if ((_e$selected = e.selected) !== null && _e$selected !== void 0 && _e$selected.dataIndex) {
|
|
44987
|
-
|
|
44988
|
-
dataIndex
|
|
44989
|
-
}
|
|
45771
|
+
if (selectedLabel !== null && selectedLabel !== void 0 && selectedLabel.value) {
|
|
45772
|
+
selectedLabel.value.dataIndex = e.selected.dataIndex;
|
|
45773
|
+
} else {
|
|
45774
|
+
emit('update:selectedLabel', {
|
|
45775
|
+
dataIndex: e.selected.dataIndex
|
|
45776
|
+
});
|
|
45777
|
+
}
|
|
44990
45778
|
}
|
|
44991
45779
|
|
|
44992
45780
|
if ((_e$selected2 = e.selected) !== null && _e$selected2 !== void 0 && _e$selected2.seriesId) {
|
|
@@ -45098,6 +45886,271 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45098
45886
|
wrapperStyle: wrapperStyle
|
|
45099
45887
|
};
|
|
45100
45888
|
};
|
|
45889
|
+
var uses_useZoomModel = function useZoomModel(evChartNormalizedOptions, _ref, selectedLabelOrItem) {
|
|
45890
|
+
var evChartWrapper = _ref.wrapper,
|
|
45891
|
+
evChartGroupRef = _ref.evChartGroupRef;
|
|
45892
|
+
|
|
45893
|
+
var _getCurrentInstance2 = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["getCurrentInstance"])(),
|
|
45894
|
+
props = _getCurrentInstance2.props,
|
|
45895
|
+
slots = _getCurrentInstance2.slots,
|
|
45896
|
+
emit = _getCurrentInstance2.emit;
|
|
45897
|
+
|
|
45898
|
+
var isExecuteZoom = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
|
|
45899
|
+
var isUseZoomMode = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
|
|
45900
|
+
var evChartToolbarRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
45901
|
+
var evChartZoomOptions = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
45902
|
+
zoom: evChartNormalizedOptions.zoom
|
|
45903
|
+
});
|
|
45904
|
+
var brushIdx = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
45905
|
+
start: 0,
|
|
45906
|
+
end: 0,
|
|
45907
|
+
isUseButton: false,
|
|
45908
|
+
isUseScroll: false
|
|
45909
|
+
});
|
|
45910
|
+
var evChartZoom = null;
|
|
45911
|
+
var evChartInfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
45912
|
+
dom: [],
|
|
45913
|
+
props: {
|
|
45914
|
+
data: [],
|
|
45915
|
+
options: []
|
|
45916
|
+
}
|
|
45917
|
+
});
|
|
45918
|
+
var evChartClone = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
45919
|
+
data: null,
|
|
45920
|
+
options: null
|
|
45921
|
+
});
|
|
45922
|
+
|
|
45923
|
+
var getRangeInfo = function getRangeInfo(zoomInfo) {
|
|
45924
|
+
if (zoomInfo.data.length && zoomInfo.range && isUseZoomMode.value) {
|
|
45925
|
+
evChartZoom.dragZoom(zoomInfo);
|
|
45926
|
+
}
|
|
45927
|
+
};
|
|
45928
|
+
|
|
45929
|
+
var setEvChartOptions = function setEvChartOptions() {
|
|
45930
|
+
evChartInfo.props.options.forEach(function (option, idx) {
|
|
45931
|
+
option.zoom = _objectSpread2(_objectSpread2({}, option.zoom), {}, {
|
|
45932
|
+
use: isUseZoomMode.value,
|
|
45933
|
+
getRangeInfo: getRangeInfo
|
|
45934
|
+
});
|
|
45935
|
+
|
|
45936
|
+
if (isUseZoomMode.value) {
|
|
45937
|
+
option.dragSelection = _objectSpread2(_objectSpread2({}, option.dragSelection), {}, {
|
|
45938
|
+
use: true,
|
|
45939
|
+
keepDisplay: false
|
|
45940
|
+
});
|
|
45941
|
+
} else {
|
|
45942
|
+
var _evChartClone$options;
|
|
45943
|
+
|
|
45944
|
+
var _ref2 = (_evChartClone$options = evChartClone.options[idx].dragSelection) !== null && _evChartClone$options !== void 0 ? _evChartClone$options : {},
|
|
45945
|
+
originUseOption = _ref2.use,
|
|
45946
|
+
originKeepDisplayOption = _ref2.keepDisplay;
|
|
45947
|
+
|
|
45948
|
+
option.dragSelection = {
|
|
45949
|
+
use: !!originUseOption,
|
|
45950
|
+
keepDisplay: !!originKeepDisplayOption
|
|
45951
|
+
};
|
|
45952
|
+
}
|
|
45953
|
+
});
|
|
45954
|
+
};
|
|
45955
|
+
|
|
45956
|
+
var createEvChartZoom = function createEvChartZoom() {
|
|
45957
|
+
if (evChartGroupRef) {
|
|
45958
|
+
evChartInfo.dom = evChartGroupRef.value.querySelectorAll('.ev-chart-container');
|
|
45959
|
+
var chartIdx = 0;
|
|
45960
|
+
|
|
45961
|
+
if (evChartInfo.dom.length) {
|
|
45962
|
+
slots.default(evChartInfo.dom).forEach(function (_ref3) {
|
|
45963
|
+
var type = _ref3.type,
|
|
45964
|
+
evChartProps = _ref3.props;
|
|
45965
|
+
|
|
45966
|
+
if ((type === null || type === void 0 ? void 0 : type.name) === 'EvChart') {
|
|
45967
|
+
var options = evChartProps.options,
|
|
45968
|
+
data = evChartProps.data;
|
|
45969
|
+
data.chartIdx = chartIdx;
|
|
45970
|
+
chartIdx++;
|
|
45971
|
+
evChartInfo.props.data.push(data);
|
|
45972
|
+
evChartInfo.props.options.push(options);
|
|
45973
|
+
}
|
|
45974
|
+
});
|
|
45975
|
+
}
|
|
45976
|
+
} else {
|
|
45977
|
+
evChartInfo.dom = [evChartWrapper.value.querySelector('.ev-chart-container')];
|
|
45978
|
+
evChartInfo.props.data.push(props.data);
|
|
45979
|
+
evChartInfo.props.options.push(props.options);
|
|
45980
|
+
}
|
|
45981
|
+
|
|
45982
|
+
if (evChartInfo.props.data.length) {
|
|
45983
|
+
evChartClone.data = lodash_es_cloneDeep(evChartInfo.props.data);
|
|
45984
|
+
evChartClone.options = lodash_es_cloneDeep(evChartInfo.props.options);
|
|
45985
|
+
var emitFunc = {
|
|
45986
|
+
updateZoomStartIdx: function updateZoomStartIdx(startIdx) {
|
|
45987
|
+
return emit('update:zoomStartIdx', startIdx);
|
|
45988
|
+
},
|
|
45989
|
+
updateZoomEndIdx: function updateZoomEndIdx(endIdx) {
|
|
45990
|
+
return emit('update:zoomEndIdx', endIdx);
|
|
45991
|
+
}
|
|
45992
|
+
};
|
|
45993
|
+
evChartZoom = new chartZoom_core_EvChartZoom(evChartInfo, evChartClone, evChartZoomOptions, evChartToolbarRef.value, isExecuteZoom, brushIdx, emitFunc);
|
|
45994
|
+
}
|
|
45995
|
+
};
|
|
45996
|
+
|
|
45997
|
+
var toggleUseZoom = function toggleUseZoom(target) {
|
|
45998
|
+
if (evChartClone.data[0].labels.length <= 1) {
|
|
45999
|
+
return;
|
|
46000
|
+
}
|
|
46001
|
+
|
|
46002
|
+
isUseZoomMode.value = !isUseZoomMode.value;
|
|
46003
|
+
|
|
46004
|
+
if (target) {
|
|
46005
|
+
target.classList.toggle('active');
|
|
46006
|
+
} else {
|
|
46007
|
+
var dragZoomIcon = evChartToolbarRef.value.querySelector('.dragZoom');
|
|
46008
|
+
dragZoomIcon.classList.toggle('active');
|
|
46009
|
+
}
|
|
46010
|
+
|
|
46011
|
+
setEvChartOptions();
|
|
46012
|
+
evChartZoom.setIconStyle(isUseZoomMode.value);
|
|
46013
|
+
evChartZoom.setEventListener(isUseZoomMode.value);
|
|
46014
|
+
};
|
|
46015
|
+
|
|
46016
|
+
var onClickToolbar = function onClickToolbar(e, iconType) {
|
|
46017
|
+
if (!evChartZoom.isAnimationFinish) {
|
|
46018
|
+
return;
|
|
46019
|
+
}
|
|
46020
|
+
|
|
46021
|
+
switch (iconType) {
|
|
46022
|
+
case 'dragZoom':
|
|
46023
|
+
toggleUseZoom(e.target);
|
|
46024
|
+
break;
|
|
46025
|
+
|
|
46026
|
+
case 'reset':
|
|
46027
|
+
evChartZoom.initZoom();
|
|
46028
|
+
break;
|
|
46029
|
+
|
|
46030
|
+
case 'previous':
|
|
46031
|
+
case 'latest':
|
|
46032
|
+
evChartZoom.clickMoveZoomArea(iconType);
|
|
46033
|
+
break;
|
|
46034
|
+
|
|
46035
|
+
default:
|
|
46036
|
+
break;
|
|
46037
|
+
}
|
|
46038
|
+
};
|
|
46039
|
+
|
|
46040
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUpdated"])(function () {
|
|
46041
|
+
if (evChartToolbarRef.value) {
|
|
46042
|
+
evChartZoom.setIcon(evChartToolbarRef.value);
|
|
46043
|
+
}
|
|
46044
|
+
});
|
|
46045
|
+
|
|
46046
|
+
var setOptionsForUseZoom = function setOptionsForUseZoom(newOpt) {
|
|
46047
|
+
var isUpdateZoomOptions = !lodash_es_isEqual(newOpt.zoom, evChartZoomOptions.zoom);
|
|
46048
|
+
|
|
46049
|
+
if (isUpdateZoomOptions) {
|
|
46050
|
+
evChartZoomOptions.zoom = newOpt.zoom;
|
|
46051
|
+
|
|
46052
|
+
if (evChartZoom) {
|
|
46053
|
+
if (!evChartZoomOptions.zoom.toolbar.show && isUseZoomMode.value) {
|
|
46054
|
+
toggleUseZoom();
|
|
46055
|
+
}
|
|
46056
|
+
|
|
46057
|
+
evChartZoom.setEvChartZoomOptions(evChartZoomOptions);
|
|
46058
|
+
} else if (evChartZoomOptions.zoom.toolbar.show && !evChartGroupRef) {
|
|
46059
|
+
createEvChartZoom();
|
|
46060
|
+
}
|
|
46061
|
+
}
|
|
46062
|
+
};
|
|
46063
|
+
|
|
46064
|
+
var setDataForUseZoom = function setDataForUseZoom(newData) {
|
|
46065
|
+
if (!isExecuteZoom.value) {
|
|
46066
|
+
evChartClone.data = evChartGroupRef ? lodash_es_cloneDeep(newData) : [lodash_es_cloneDeep(newData)];
|
|
46067
|
+
isUseZoomMode.value = false;
|
|
46068
|
+
setEvChartOptions();
|
|
46069
|
+
brushIdx.start = 0;
|
|
46070
|
+
brushIdx.end = evChartClone.data[0].labels.length - 1;
|
|
46071
|
+
|
|
46072
|
+
if (evChartZoom) {
|
|
46073
|
+
evChartZoom.updateEvChartCloneData(evChartClone, isUseZoomMode.value);
|
|
46074
|
+
}
|
|
46075
|
+
}
|
|
46076
|
+
|
|
46077
|
+
isExecuteZoom.value = false;
|
|
46078
|
+
};
|
|
46079
|
+
|
|
46080
|
+
var controlZoomIdx = function controlZoomIdx(zoomStartIdx, zoomEndIdx) {
|
|
46081
|
+
if (evChartZoom.isUseToolbar) {
|
|
46082
|
+
evChartZoom.isUseToolbar = false;
|
|
46083
|
+
return;
|
|
46084
|
+
}
|
|
46085
|
+
|
|
46086
|
+
if (isUseZoomMode.value) {
|
|
46087
|
+
evChartZoom.executeZoom(zoomStartIdx, zoomEndIdx);
|
|
46088
|
+
evChartZoom.setZoomAreaMemory(zoomStartIdx, zoomEndIdx);
|
|
46089
|
+
}
|
|
46090
|
+
};
|
|
46091
|
+
|
|
46092
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46093
|
+
return [brushIdx.start, brushIdx.end];
|
|
46094
|
+
}, function (_ref4, _ref5) {
|
|
46095
|
+
var _ref6 = _slicedToArray(_ref4, 2),
|
|
46096
|
+
curBrushStartIdx = _ref6[0],
|
|
46097
|
+
curBrushEndIdx = _ref6[1];
|
|
46098
|
+
|
|
46099
|
+
var _ref7 = _slicedToArray(_ref5, 1),
|
|
46100
|
+
prevBrushStartIdx = _ref7[0];
|
|
46101
|
+
|
|
46102
|
+
if (selectedLabelOrItem !== null && selectedLabelOrItem !== void 0 && selectedLabelOrItem.value) {
|
|
46103
|
+
if (typeof selectedLabelOrItem.value.dataIndex === 'number') {
|
|
46104
|
+
if (curBrushStartIdx >= (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0)) {
|
|
46105
|
+
selectedLabelOrItem.value.dataIndex -= curBrushStartIdx - (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0);
|
|
46106
|
+
} else {
|
|
46107
|
+
selectedLabelOrItem.value.dataIndex += prevBrushStartIdx - curBrushStartIdx;
|
|
46108
|
+
}
|
|
46109
|
+
} else {
|
|
46110
|
+
for (var idx = 0; idx < selectedLabelOrItem.value.dataIndex.length; idx++) {
|
|
46111
|
+
if (curBrushStartIdx >= (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0)) {
|
|
46112
|
+
selectedLabelOrItem.value.dataIndex[idx] -= curBrushStartIdx - (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0);
|
|
46113
|
+
} else {
|
|
46114
|
+
selectedLabelOrItem.value.dataIndex[idx] += prevBrushStartIdx - curBrushStartIdx;
|
|
46115
|
+
}
|
|
46116
|
+
}
|
|
46117
|
+
}
|
|
46118
|
+
}
|
|
46119
|
+
|
|
46120
|
+
if (brushIdx.isUseButton || brushIdx.isUseScroll) {
|
|
46121
|
+
evChartZoom.executeZoom(curBrushStartIdx, curBrushEndIdx);
|
|
46122
|
+
}
|
|
46123
|
+
});
|
|
46124
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46125
|
+
return [brushIdx.isUseButton, brushIdx.isUseScroll];
|
|
46126
|
+
}, function (_ref8, _ref9) {
|
|
46127
|
+
var _ref10 = _slicedToArray(_ref8, 2),
|
|
46128
|
+
curIsUseButton = _ref10[0],
|
|
46129
|
+
curIsUseScroll = _ref10[1];
|
|
46130
|
+
|
|
46131
|
+
var _ref11 = _slicedToArray(_ref9, 2),
|
|
46132
|
+
prevIsUseButton = _ref11[0],
|
|
46133
|
+
prevIsUseScroll = _ref11[1];
|
|
46134
|
+
|
|
46135
|
+
if (prevIsUseButton && !curIsUseButton) {
|
|
46136
|
+
evChartZoom.setZoomAreaMemory(brushIdx.start, brushIdx.end);
|
|
46137
|
+
} else if (prevIsUseScroll && !curIsUseScroll) {
|
|
46138
|
+
evChartZoom.zoomAreaMemory.current[0] = [brushIdx.start, brushIdx.end];
|
|
46139
|
+
}
|
|
46140
|
+
});
|
|
46141
|
+
return {
|
|
46142
|
+
evChartZoomOptions: evChartZoomOptions,
|
|
46143
|
+
evChartInfo: evChartInfo,
|
|
46144
|
+
evChartToolbarRef: evChartToolbarRef,
|
|
46145
|
+
evChartClone: evChartClone,
|
|
46146
|
+
brushIdx: brushIdx,
|
|
46147
|
+
createEvChartZoom: createEvChartZoom,
|
|
46148
|
+
setOptionsForUseZoom: setOptionsForUseZoom,
|
|
46149
|
+
setDataForUseZoom: setDataForUseZoom,
|
|
46150
|
+
controlZoomIdx: controlZoomIdx,
|
|
46151
|
+
onClickToolbar: onClickToolbar
|
|
46152
|
+
};
|
|
46153
|
+
};
|
|
45101
46154
|
// 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
|
|
45102
46155
|
|
|
45103
46156
|
|
|
@@ -45106,8 +46159,13 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45106
46159
|
|
|
45107
46160
|
|
|
45108
46161
|
|
|
46162
|
+
|
|
46163
|
+
|
|
45109
46164
|
/* harmony default export */ var Chartvue_type_script_lang_js = ({
|
|
45110
46165
|
name: 'EvChart',
|
|
46166
|
+
components: {
|
|
46167
|
+
EvChartToolbar: ChartToolbar
|
|
46168
|
+
},
|
|
45111
46169
|
props: {
|
|
45112
46170
|
selectedItem: {
|
|
45113
46171
|
type: Object,
|
|
@@ -45136,13 +46194,31 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45136
46194
|
resizeTimeout: {
|
|
45137
46195
|
type: Number,
|
|
45138
46196
|
default: 0
|
|
46197
|
+
},
|
|
46198
|
+
zoomStartIdx: {
|
|
46199
|
+
type: Number,
|
|
46200
|
+
default: 0
|
|
46201
|
+
},
|
|
46202
|
+
zoomEndIdx: {
|
|
46203
|
+
type: Number,
|
|
46204
|
+
default: 0
|
|
45139
46205
|
}
|
|
45140
46206
|
},
|
|
45141
|
-
emits: ['click', 'dbl-click', 'drag-select', 'update:selectedItem', 'update:selectedLabel', 'update:selectedSeries'],
|
|
46207
|
+
emits: ['click', 'dbl-click', 'drag-select', 'update:selectedItem', 'update:selectedLabel', 'update:selectedSeries', 'update:zoomStartIdx', 'update:zoomEndIdx'],
|
|
45142
46208
|
setup: function setup(props) {
|
|
45143
46209
|
var evChart = null;
|
|
46210
|
+
var injectIsChartGroup = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('isChartGroup', false);
|
|
46211
|
+
var injectBrushSeries = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('brushSeries', {
|
|
46212
|
+
list: [],
|
|
46213
|
+
chartIdx: null
|
|
46214
|
+
});
|
|
46215
|
+
var injectGroupSelectedLabel = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('groupSelectedLabel', null);
|
|
46216
|
+
var injectBrushIdx = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('brushIdx', {
|
|
46217
|
+
start: 0,
|
|
46218
|
+
end: 0
|
|
46219
|
+
});
|
|
45144
46220
|
|
|
45145
|
-
var _useModel = chart_uses_useModel(),
|
|
46221
|
+
var _useModel = chart_uses_useModel(injectGroupSelectedLabel),
|
|
45146
46222
|
eventListeners = _useModel.eventListeners,
|
|
45147
46223
|
selectItemInfo = _useModel.selectItemInfo,
|
|
45148
46224
|
selectLabelInfo = _useModel.selectLabelInfo,
|
|
@@ -45152,11 +46228,29 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45152
46228
|
|
|
45153
46229
|
var normalizedData = getNormalizedData(props.data);
|
|
45154
46230
|
var normalizedOptions = getNormalizedOptions(props.options);
|
|
46231
|
+
var selectedLabel = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
46232
|
+
return props.selectedLabel;
|
|
46233
|
+
});
|
|
46234
|
+
var selectedItem = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
46235
|
+
return props.selectedItem;
|
|
46236
|
+
});
|
|
45155
46237
|
|
|
45156
46238
|
var _useWrapper = uses_useWrapper(normalizedOptions),
|
|
45157
46239
|
wrapper = _useWrapper.wrapper,
|
|
45158
46240
|
wrapperStyle = _useWrapper.wrapperStyle;
|
|
45159
46241
|
|
|
46242
|
+
var _useZoomModel = uses_useZoomModel(normalizedOptions, {
|
|
46243
|
+
wrapper: wrapper,
|
|
46244
|
+
evChartGroupRef: null
|
|
46245
|
+
}, props.selectedLabel ? selectedLabel : selectedItem),
|
|
46246
|
+
evChartZoomOptions = _useZoomModel.evChartZoomOptions,
|
|
46247
|
+
evChartToolbarRef = _useZoomModel.evChartToolbarRef,
|
|
46248
|
+
createEvChartZoom = _useZoomModel.createEvChartZoom,
|
|
46249
|
+
setOptionsForUseZoom = _useZoomModel.setOptionsForUseZoom,
|
|
46250
|
+
setDataForUseZoom = _useZoomModel.setDataForUseZoom,
|
|
46251
|
+
controlZoomIdx = _useZoomModel.controlZoomIdx,
|
|
46252
|
+
onClickToolbar = _useZoomModel.onClickToolbar;
|
|
46253
|
+
|
|
45160
46254
|
var createChart = function createChart() {
|
|
45161
46255
|
var selected;
|
|
45162
46256
|
|
|
@@ -45166,12 +46260,16 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45166
46260
|
selected = selectSeriesInfo;
|
|
45167
46261
|
}
|
|
45168
46262
|
|
|
45169
|
-
evChart = new chart_core(wrapper.value, normalizedData, normalizedOptions, eventListeners, selectItemInfo, selected);
|
|
46263
|
+
evChart = new chart_core(wrapper.value, normalizedData, normalizedOptions, eventListeners, selectItemInfo, selected, injectBrushSeries);
|
|
45170
46264
|
};
|
|
45171
46265
|
|
|
45172
46266
|
var drawChart = function drawChart() {
|
|
45173
46267
|
if (evChart) {
|
|
45174
46268
|
evChart.init();
|
|
46269
|
+
|
|
46270
|
+
if (!injectIsChartGroup && normalizedOptions.zoom.toolbar.show) {
|
|
46271
|
+
createEvChartZoom();
|
|
46272
|
+
}
|
|
45175
46273
|
}
|
|
45176
46274
|
};
|
|
45177
46275
|
|
|
@@ -45189,6 +46287,10 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45189
46287
|
},
|
|
45190
46288
|
updateLegend: isUpdateLegendType
|
|
45191
46289
|
});
|
|
46290
|
+
|
|
46291
|
+
if (!injectIsChartGroup) {
|
|
46292
|
+
setOptionsForUseZoom(newOpt);
|
|
46293
|
+
}
|
|
45192
46294
|
}, {
|
|
45193
46295
|
deep: true,
|
|
45194
46296
|
flush: 'post'
|
|
@@ -45208,12 +46310,39 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45208
46310
|
},
|
|
45209
46311
|
updateData: isUpdateData
|
|
45210
46312
|
});
|
|
46313
|
+
|
|
46314
|
+
if (!injectIsChartGroup && isUpdateData) {
|
|
46315
|
+
setDataForUseZoom(newData);
|
|
46316
|
+
}
|
|
45211
46317
|
}, {
|
|
45212
46318
|
deep: true,
|
|
45213
46319
|
flush: 'post'
|
|
45214
46320
|
});
|
|
46321
|
+
|
|
46322
|
+
if (injectIsChartGroup && !(injectGroupSelectedLabel !== null && injectGroupSelectedLabel !== void 0 && injectGroupSelectedLabel.value)) {
|
|
46323
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46324
|
+
return injectBrushIdx.start;
|
|
46325
|
+
}, function (curBrushStartIdx, prevBrushStartIdx) {
|
|
46326
|
+
if (selectedLabel !== null && selectedLabel !== void 0 && selectedLabel.value) {
|
|
46327
|
+
for (var idx = 0; idx < selectedLabel.value.dataIndex.length; idx++) {
|
|
46328
|
+
if (curBrushStartIdx >= (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0)) {
|
|
46329
|
+
selectedLabel.value.dataIndex[idx] -= curBrushStartIdx - (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0);
|
|
46330
|
+
} else {
|
|
46331
|
+
selectedLabel.value.dataIndex[idx] += prevBrushStartIdx - curBrushStartIdx;
|
|
46332
|
+
}
|
|
46333
|
+
}
|
|
46334
|
+
} else if (selectedItem !== null && selectedItem !== void 0 && selectedItem.value) {
|
|
46335
|
+
if (curBrushStartIdx >= (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0)) {
|
|
46336
|
+
selectedItem.value.dataIndex -= curBrushStartIdx - (prevBrushStartIdx !== null && prevBrushStartIdx !== void 0 ? prevBrushStartIdx : 0);
|
|
46337
|
+
} else {
|
|
46338
|
+
selectedItem.value.dataIndex += prevBrushStartIdx - curBrushStartIdx;
|
|
46339
|
+
}
|
|
46340
|
+
}
|
|
46341
|
+
});
|
|
46342
|
+
}
|
|
46343
|
+
|
|
45215
46344
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
45216
|
-
return
|
|
46345
|
+
return selectedItem.value;
|
|
45217
46346
|
}, function (newValue) {
|
|
45218
46347
|
var chartType = props.options.type;
|
|
45219
46348
|
evChart.selectItemByData(newValue, chartType);
|
|
@@ -45222,7 +46351,9 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45222
46351
|
flush: 'post'
|
|
45223
46352
|
});
|
|
45224
46353
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
45225
|
-
|
|
46354
|
+
var _injectGroupSelectedL;
|
|
46355
|
+
|
|
46356
|
+
return (_injectGroupSelectedL = injectGroupSelectedLabel === null || injectGroupSelectedLabel === void 0 ? void 0 : injectGroupSelectedLabel.value) !== null && _injectGroupSelectedL !== void 0 ? _injectGroupSelectedL : selectedLabel.value;
|
|
45226
46357
|
}, function (newValue) {
|
|
45227
46358
|
if (newValue.dataIndex) {
|
|
45228
46359
|
evChart.renderWithSelected(newValue.dataIndex);
|
|
@@ -45241,6 +46372,19 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45241
46372
|
deep: true,
|
|
45242
46373
|
flush: 'post'
|
|
45243
46374
|
});
|
|
46375
|
+
|
|
46376
|
+
if (!injectIsChartGroup) {
|
|
46377
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46378
|
+
return [props.zoomStartIdx, props.zoomEndIdx];
|
|
46379
|
+
}, function (_ref) {
|
|
46380
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
46381
|
+
zoomStartIdx = _ref2[0],
|
|
46382
|
+
zoomEndIdx = _ref2[1];
|
|
46383
|
+
|
|
46384
|
+
controlZoomIdx(zoomStartIdx, zoomEndIdx);
|
|
46385
|
+
});
|
|
46386
|
+
}
|
|
46387
|
+
|
|
45244
46388
|
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
45245
46389
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
45246
46390
|
while (1) {
|
|
@@ -45292,14 +46436,19 @@ var uses_useWrapper = function useWrapper(options) {
|
|
|
45292
46436
|
wrapper: wrapper,
|
|
45293
46437
|
wrapperStyle: wrapperStyle,
|
|
45294
46438
|
onResize: onResize,
|
|
45295
|
-
redraw: redraw
|
|
46439
|
+
redraw: redraw,
|
|
46440
|
+
evChartToolbarRef: evChartToolbarRef,
|
|
46441
|
+
injectIsChartGroup: injectIsChartGroup,
|
|
46442
|
+
onClickToolbar: onClickToolbar,
|
|
46443
|
+
normalizedOptions: normalizedOptions,
|
|
46444
|
+
zoomOptions: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toRef"])(evChartZoomOptions, 'zoom')
|
|
45296
46445
|
};
|
|
45297
46446
|
}
|
|
45298
46447
|
});
|
|
45299
46448
|
// CONCATENATED MODULE: ./src/components/chart/Chart.vue?vue&type=script&lang=js
|
|
45300
46449
|
|
|
45301
|
-
// EXTERNAL MODULE: ./src/components/chart/Chart.vue?vue&type=style&index=0&id=
|
|
45302
|
-
var
|
|
46450
|
+
// EXTERNAL MODULE: ./src/components/chart/Chart.vue?vue&type=style&index=0&id=018cc1f3&lang=scss
|
|
46451
|
+
var Chartvue_type_style_index_0_id_018cc1f3_lang_scss = __webpack_require__("0d1d");
|
|
45303
46452
|
|
|
45304
46453
|
// CONCATENATED MODULE: ./src/components/chart/Chart.vue
|
|
45305
46454
|
|
|
@@ -45309,7 +46458,7 @@ var Chartvue_type_style_index_0_id_ca3428ac_lang_scss = __webpack_require__("e83
|
|
|
45309
46458
|
|
|
45310
46459
|
|
|
45311
46460
|
|
|
45312
|
-
const Chart_exports_ = /*#__PURE__*/exportHelper_default()(Chartvue_type_script_lang_js, [['render',
|
|
46461
|
+
const Chart_exports_ = /*#__PURE__*/exportHelper_default()(Chartvue_type_script_lang_js, [['render',Chartvue_type_template_id_018cc1f3_render]])
|
|
45313
46462
|
|
|
45314
46463
|
/* harmony default export */ var Chart = (Chart_exports_);
|
|
45315
46464
|
// CONCATENATED MODULE: ./src/components/chart/index.js
|
|
@@ -45323,6 +46472,1099 @@ Chart.install = function (app) {
|
|
|
45323
46472
|
};
|
|
45324
46473
|
|
|
45325
46474
|
/* harmony default export */ var chart = (Chart);
|
|
46475
|
+
// 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
|
|
46476
|
+
|
|
46477
|
+
|
|
46478
|
+
var ChartGroupvue_type_template_id_bd8c6660_scoped_true_withId = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withScopeId"])("data-v-bd8c6660");
|
|
46479
|
+
|
|
46480
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-bd8c6660");
|
|
46481
|
+
|
|
46482
|
+
var ChartGroupvue_type_template_id_bd8c6660_scoped_true_hoisted_1 = {
|
|
46483
|
+
key: 0,
|
|
46484
|
+
ref: "evChartToolbarRef"
|
|
46485
|
+
};
|
|
46486
|
+
var ChartGroupvue_type_template_id_bd8c6660_scoped_true_hoisted_2 = {
|
|
46487
|
+
ref: "evChartGroupRef",
|
|
46488
|
+
class: "ev-chart-group__wrapper"
|
|
46489
|
+
};
|
|
46490
|
+
|
|
46491
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])();
|
|
46492
|
+
|
|
46493
|
+
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) {
|
|
46494
|
+
var _component_ev_chart_toolbar = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ev-chart-toolbar");
|
|
46495
|
+
|
|
46496
|
+
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, {
|
|
46497
|
+
toolbar: $setup.zoomOptions.toolbar,
|
|
46498
|
+
onOnClickToolbar: $setup.onClickToolbar
|
|
46499
|
+
}, 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);
|
|
46500
|
+
});
|
|
46501
|
+
// CONCATENATED MODULE: ./src/components/chartGroup/ChartGroup.vue?vue&type=template&id=bd8c6660&scoped=true
|
|
46502
|
+
|
|
46503
|
+
// CONCATENATED MODULE: ./src/components/chartGroup/uses.js
|
|
46504
|
+
|
|
46505
|
+
|
|
46506
|
+
var uses_DEFAULT_OPTIONS = {
|
|
46507
|
+
zoom: {
|
|
46508
|
+
bufferMemoryCnt: 100,
|
|
46509
|
+
toolbar: {
|
|
46510
|
+
show: false,
|
|
46511
|
+
items: {
|
|
46512
|
+
previous: {
|
|
46513
|
+
icon: 'ev-icon-allow2-left',
|
|
46514
|
+
size: 'medium',
|
|
46515
|
+
title: 'Previous'
|
|
46516
|
+
},
|
|
46517
|
+
latest: {
|
|
46518
|
+
icon: 'ev-icon-allow2-right',
|
|
46519
|
+
size: 'medium',
|
|
46520
|
+
title: 'Latest'
|
|
46521
|
+
},
|
|
46522
|
+
reset: {
|
|
46523
|
+
icon: 'ev-icon-redo',
|
|
46524
|
+
size: 'medium',
|
|
46525
|
+
title: 'Reset'
|
|
46526
|
+
},
|
|
46527
|
+
dragZoom: {
|
|
46528
|
+
icon: 'ev-icon-zoomin',
|
|
46529
|
+
size: 'medium',
|
|
46530
|
+
title: 'Drag Zoom'
|
|
46531
|
+
}
|
|
46532
|
+
}
|
|
46533
|
+
}
|
|
46534
|
+
}
|
|
46535
|
+
}; // eslint-disable-next-line import/prefer-default-export
|
|
46536
|
+
|
|
46537
|
+
var uses_useGroupModel = function useGroupModel() {
|
|
46538
|
+
var isExecuteZoom = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(false);
|
|
46539
|
+
var evChartGroupRef = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])();
|
|
46540
|
+
var brushSeries = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["reactive"])({
|
|
46541
|
+
list: [],
|
|
46542
|
+
chartIdx: null
|
|
46543
|
+
});
|
|
46544
|
+
|
|
46545
|
+
var getNormalizedOptions = function getNormalizedOptions(options) {
|
|
46546
|
+
return lodash_es_defaultsDeep({}, options, uses_DEFAULT_OPTIONS);
|
|
46547
|
+
};
|
|
46548
|
+
|
|
46549
|
+
return {
|
|
46550
|
+
getNormalizedOptions: getNormalizedOptions,
|
|
46551
|
+
isExecuteZoom: isExecuteZoom,
|
|
46552
|
+
brushSeries: brushSeries,
|
|
46553
|
+
evChartGroupRef: evChartGroupRef
|
|
46554
|
+
};
|
|
46555
|
+
};
|
|
46556
|
+
// 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
|
|
46557
|
+
|
|
46558
|
+
|
|
46559
|
+
|
|
46560
|
+
|
|
46561
|
+
|
|
46562
|
+
|
|
46563
|
+
/* harmony default export */ var ChartGroupvue_type_script_lang_js = ({
|
|
46564
|
+
name: 'EvChartGroup',
|
|
46565
|
+
components: {
|
|
46566
|
+
evChartToolbar: ChartToolbar
|
|
46567
|
+
},
|
|
46568
|
+
props: {
|
|
46569
|
+
options: {
|
|
46570
|
+
type: Object,
|
|
46571
|
+
default: function _default() {
|
|
46572
|
+
return {};
|
|
46573
|
+
}
|
|
46574
|
+
},
|
|
46575
|
+
zoomStartIdx: {
|
|
46576
|
+
type: Number,
|
|
46577
|
+
default: 0
|
|
46578
|
+
},
|
|
46579
|
+
zoomEndIdx: {
|
|
46580
|
+
type: Number,
|
|
46581
|
+
default: 0
|
|
46582
|
+
},
|
|
46583
|
+
groupSelectedLabel: {
|
|
46584
|
+
type: Object,
|
|
46585
|
+
default: null
|
|
46586
|
+
}
|
|
46587
|
+
},
|
|
46588
|
+
emits: ['update:zoomStartIdx', 'update:zoomEndIdx'],
|
|
46589
|
+
setup: function setup(props) {
|
|
46590
|
+
var _useGroupModel = uses_useGroupModel(),
|
|
46591
|
+
getNormalizedOptions = _useGroupModel.getNormalizedOptions,
|
|
46592
|
+
isExecuteZoom = _useGroupModel.isExecuteZoom,
|
|
46593
|
+
brushSeries = _useGroupModel.brushSeries,
|
|
46594
|
+
evChartGroupRef = _useGroupModel.evChartGroupRef;
|
|
46595
|
+
|
|
46596
|
+
var normalizedOptions = getNormalizedOptions(props.options);
|
|
46597
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('isExecuteZoom', isExecuteZoom);
|
|
46598
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('isChartGroup', true);
|
|
46599
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('brushSeries', brushSeries);
|
|
46600
|
+
var groupSelectedLabel = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
46601
|
+
return props.groupSelectedLabel;
|
|
46602
|
+
});
|
|
46603
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('groupSelectedLabel', groupSelectedLabel);
|
|
46604
|
+
|
|
46605
|
+
var _useZoomModel = uses_useZoomModel(normalizedOptions, {
|
|
46606
|
+
wrapper: null,
|
|
46607
|
+
evChartGroupRef: evChartGroupRef
|
|
46608
|
+
}, groupSelectedLabel),
|
|
46609
|
+
evChartZoomOptions = _useZoomModel.evChartZoomOptions,
|
|
46610
|
+
evChartInfo = _useZoomModel.evChartInfo,
|
|
46611
|
+
evChartToolbarRef = _useZoomModel.evChartToolbarRef,
|
|
46612
|
+
evChartClone = _useZoomModel.evChartClone,
|
|
46613
|
+
brushIdx = _useZoomModel.brushIdx,
|
|
46614
|
+
createEvChartZoom = _useZoomModel.createEvChartZoom,
|
|
46615
|
+
setOptionsForUseZoom = _useZoomModel.setOptionsForUseZoom,
|
|
46616
|
+
setDataForUseZoom = _useZoomModel.setDataForUseZoom,
|
|
46617
|
+
controlZoomIdx = _useZoomModel.controlZoomIdx,
|
|
46618
|
+
onClickToolbar = _useZoomModel.onClickToolbar;
|
|
46619
|
+
|
|
46620
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('evChartClone', evChartClone);
|
|
46621
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('evChartInfo', evChartInfo);
|
|
46622
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["provide"])('brushIdx', brushIdx);
|
|
46623
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])(function () {
|
|
46624
|
+
createEvChartZoom();
|
|
46625
|
+
});
|
|
46626
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46627
|
+
return evChartInfo.props.data;
|
|
46628
|
+
}, function (evChartProps) {
|
|
46629
|
+
setDataForUseZoom(evChartProps);
|
|
46630
|
+
}, {
|
|
46631
|
+
deep: true
|
|
46632
|
+
});
|
|
46633
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46634
|
+
return props.options;
|
|
46635
|
+
}, function (zoomOptions) {
|
|
46636
|
+
var newOpt = getNormalizedOptions(zoomOptions);
|
|
46637
|
+
setOptionsForUseZoom(newOpt);
|
|
46638
|
+
}, {
|
|
46639
|
+
deep: true
|
|
46640
|
+
});
|
|
46641
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
46642
|
+
return [props.zoomStartIdx, props.zoomEndIdx];
|
|
46643
|
+
}, function (_ref) {
|
|
46644
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
46645
|
+
zoomStartIdx = _ref2[0],
|
|
46646
|
+
zoomEndIdx = _ref2[1];
|
|
46647
|
+
|
|
46648
|
+
if (brushIdx.isUseButton || brushIdx.isUseScroll) {
|
|
46649
|
+
return;
|
|
46650
|
+
}
|
|
46651
|
+
|
|
46652
|
+
controlZoomIdx(zoomStartIdx, zoomEndIdx);
|
|
46653
|
+
});
|
|
46654
|
+
return {
|
|
46655
|
+
evChartGroupRef: evChartGroupRef,
|
|
46656
|
+
evChartToolbarRef: evChartToolbarRef,
|
|
46657
|
+
zoomOptions: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toRef"])(evChartZoomOptions, 'zoom'),
|
|
46658
|
+
onClickToolbar: onClickToolbar
|
|
46659
|
+
};
|
|
46660
|
+
}
|
|
46661
|
+
});
|
|
46662
|
+
// CONCATENATED MODULE: ./src/components/chartGroup/ChartGroup.vue?vue&type=script&lang=js
|
|
46663
|
+
|
|
46664
|
+
// EXTERNAL MODULE: ./src/components/chartGroup/ChartGroup.vue?vue&type=style&index=0&id=bd8c6660&lang=scss&scoped=true
|
|
46665
|
+
var ChartGroupvue_type_style_index_0_id_bd8c6660_lang_scss_scoped_true = __webpack_require__("8352");
|
|
46666
|
+
|
|
46667
|
+
// CONCATENATED MODULE: ./src/components/chartGroup/ChartGroup.vue
|
|
46668
|
+
|
|
46669
|
+
|
|
46670
|
+
|
|
46671
|
+
|
|
46672
|
+
|
|
46673
|
+
|
|
46674
|
+
|
|
46675
|
+
const ChartGroup_exports_ = /*#__PURE__*/exportHelper_default()(ChartGroupvue_type_script_lang_js, [['render',ChartGroupvue_type_template_id_bd8c6660_scoped_true_render],['__scopeId',"data-v-bd8c6660"]])
|
|
46676
|
+
|
|
46677
|
+
/* harmony default export */ var ChartGroup = (ChartGroup_exports_);
|
|
46678
|
+
// CONCATENATED MODULE: ./src/components/chartGroup/index.js
|
|
46679
|
+
|
|
46680
|
+
|
|
46681
|
+
|
|
46682
|
+
|
|
46683
|
+
ChartGroup.install = function (app) {
|
|
46684
|
+
app.component(ChartGroup.name, ChartGroup);
|
|
46685
|
+
app.use(dist_default.a);
|
|
46686
|
+
};
|
|
46687
|
+
|
|
46688
|
+
/* harmony default export */ var chartGroup = (ChartGroup);
|
|
46689
|
+
// 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=1b10467a
|
|
46690
|
+
|
|
46691
|
+
function ChartBrushvue_type_template_id_1b10467a_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
46692
|
+
var _directive_resize = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("resize");
|
|
46693
|
+
|
|
46694
|
+
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", {
|
|
46695
|
+
key: 0,
|
|
46696
|
+
ref: "evChartBrushRef",
|
|
46697
|
+
style: $setup.evChartBrushStyle,
|
|
46698
|
+
class: "ev-chart-brush"
|
|
46699
|
+
}, null, 4)), [[_directive_resize, $setup.onResize]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true);
|
|
46700
|
+
}
|
|
46701
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/ChartBrush.vue?vue&type=template&id=1b10467a
|
|
46702
|
+
|
|
46703
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/chartBrush.core.js
|
|
46704
|
+
|
|
46705
|
+
|
|
46706
|
+
|
|
46707
|
+
|
|
46708
|
+
|
|
46709
|
+
|
|
46710
|
+
var chartBrush_core_EvChartBrush = /*#__PURE__*/function () {
|
|
46711
|
+
function EvChartBrush(evChart, evChartData, evChartBrushOptions, brushIdx, evChartBrushRef) {
|
|
46712
|
+
_classCallCheck(this, EvChartBrush);
|
|
46713
|
+
|
|
46714
|
+
this.evChart = evChart;
|
|
46715
|
+
this.evChartData = evChartData;
|
|
46716
|
+
this.evChartBrushOptions = evChartBrushOptions;
|
|
46717
|
+
this.evChartBrushRef = evChartBrushRef;
|
|
46718
|
+
this.brushIdx = brushIdx;
|
|
46719
|
+
|
|
46720
|
+
if (evChartBrushOptions.value.useDebounce) {
|
|
46721
|
+
this.debounceBrushIdx = {
|
|
46722
|
+
start: brushIdx.start,
|
|
46723
|
+
end: brushIdx.end
|
|
46724
|
+
};
|
|
46725
|
+
}
|
|
46726
|
+
}
|
|
46727
|
+
|
|
46728
|
+
_createClass(EvChartBrush, [{
|
|
46729
|
+
key: "init",
|
|
46730
|
+
value: function init(isResize) {
|
|
46731
|
+
if (this.brushIdx.start > this.brushIdx.end) {
|
|
46732
|
+
return;
|
|
46733
|
+
}
|
|
46734
|
+
|
|
46735
|
+
var existedBrushCanvas = this.evChartBrushRef.value.querySelector('.brush-canvas');
|
|
46736
|
+
|
|
46737
|
+
if (!existedBrushCanvas) {
|
|
46738
|
+
var brushCanvas = document.createElement('canvas');
|
|
46739
|
+
brushCanvas.setAttribute('class', 'brush-canvas');
|
|
46740
|
+
brushCanvas.setAttribute('style', 'display: block; z-index: 1;');
|
|
46741
|
+
var evChartBrushContainer = this.evChartBrushRef.value.querySelector('.ev-chart-brush-container');
|
|
46742
|
+
|
|
46743
|
+
if (evChartBrushContainer) {
|
|
46744
|
+
this.brushCanvas = brushCanvas;
|
|
46745
|
+
evChartBrushContainer.appendChild(brushCanvas);
|
|
46746
|
+
this.evChartBrushContainer = evChartBrushContainer;
|
|
46747
|
+
this.drawBrushRect({
|
|
46748
|
+
brushCanvas: brushCanvas
|
|
46749
|
+
});
|
|
46750
|
+
this.addEvent(brushCanvas);
|
|
46751
|
+
}
|
|
46752
|
+
} else {
|
|
46753
|
+
this.drawBrushRect({
|
|
46754
|
+
brushCanvas: existedBrushCanvas,
|
|
46755
|
+
isResize: isResize
|
|
46756
|
+
});
|
|
46757
|
+
}
|
|
46758
|
+
}
|
|
46759
|
+
}, {
|
|
46760
|
+
key: "drawBrushRect",
|
|
46761
|
+
value: function drawBrushRect(_ref) {
|
|
46762
|
+
var _this$debounceBrushId;
|
|
46763
|
+
|
|
46764
|
+
var brushCanvas = _ref.brushCanvas,
|
|
46765
|
+
isResize = _ref.isResize,
|
|
46766
|
+
isDebounce = _ref.isDebounce;
|
|
46767
|
+
var _this$evChart = this.evChart,
|
|
46768
|
+
chartRect = _this$evChart.chartRect,
|
|
46769
|
+
labelOffset = _this$evChart.labelOffset;
|
|
46770
|
+
|
|
46771
|
+
if (!chartRect && !labelOffset) {
|
|
46772
|
+
return;
|
|
46773
|
+
}
|
|
46774
|
+
|
|
46775
|
+
var evChartRange = {
|
|
46776
|
+
x1: chartRect.x1 + labelOffset.left,
|
|
46777
|
+
x2: chartRect.x2 - labelOffset.right,
|
|
46778
|
+
y1: chartRect.y1 + labelOffset.top,
|
|
46779
|
+
y2: chartRect.y2 - labelOffset.bottom
|
|
46780
|
+
};
|
|
46781
|
+
var pixelRatio = window.devicePixelRatio || 1;
|
|
46782
|
+
var brushButtonWidth = 6;
|
|
46783
|
+
var brushCanvasWidth = evChartRange.x2 - evChartRange.x1 + brushButtonWidth;
|
|
46784
|
+
var brushCanvasHeight = evChartRange.y2 - evChartRange.y1;
|
|
46785
|
+
var isEqualWidth = brushCanvas.width === Math.floor(brushCanvasWidth * pixelRatio);
|
|
46786
|
+
|
|
46787
|
+
if (isResize && isEqualWidth) {
|
|
46788
|
+
return;
|
|
46789
|
+
}
|
|
46790
|
+
|
|
46791
|
+
if (!isDebounce && this.debounceBrushIdx) {
|
|
46792
|
+
this.debounceBrushIdx.start = this.brushIdx.start;
|
|
46793
|
+
this.debounceBrushIdx.end = this.brushIdx.end;
|
|
46794
|
+
}
|
|
46795
|
+
|
|
46796
|
+
var brushIdx = (_this$debounceBrushId = this.debounceBrushIdx) !== null && _this$debounceBrushId !== void 0 ? _this$debounceBrushId : this.brushIdx;
|
|
46797
|
+
var labelEndIdx = this.evChartData.value.labels.length - 1;
|
|
46798
|
+
this.labelEndIdx = labelEndIdx;
|
|
46799
|
+
var axesXInterval = (evChartRange.x2 - evChartRange.x1) / labelEndIdx;
|
|
46800
|
+
var brushRectX = brushIdx.start * axesXInterval * pixelRatio;
|
|
46801
|
+
var brushRectWidth = (brushCanvasWidth - (labelEndIdx - (brushIdx.end - brushIdx.start)) * axesXInterval) * pixelRatio;
|
|
46802
|
+
var brushRectHeight = this.evChartBrushOptions.value.height - evChartRange.y1;
|
|
46803
|
+
var brushButtonLeftXPos = brushRectX;
|
|
46804
|
+
var brushButtonRightXPos = brushRectX + brushRectWidth;
|
|
46805
|
+
|
|
46806
|
+
if (!brushCanvas.style.position) {
|
|
46807
|
+
brushCanvas.style.position = 'absolute';
|
|
46808
|
+
brushCanvas.style.top = "".concat(evChartRange.y1, "px");
|
|
46809
|
+
brushCanvas.style.left = "".concat(evChartRange.x1 - brushButtonWidth / 2, "px");
|
|
46810
|
+
}
|
|
46811
|
+
|
|
46812
|
+
if (!isEqualWidth) {
|
|
46813
|
+
brushCanvas.width = brushCanvasWidth * pixelRatio;
|
|
46814
|
+
brushCanvas.style.width = "".concat(brushCanvasWidth, "px");
|
|
46815
|
+
brushCanvas.height = brushCanvasHeight * pixelRatio;
|
|
46816
|
+
brushCanvas.style.height = "".concat(brushCanvasHeight, "px");
|
|
46817
|
+
}
|
|
46818
|
+
|
|
46819
|
+
var ctx = brushCanvas.getContext('2d');
|
|
46820
|
+
ctx.clearRect(0, 0, brushCanvasWidth * pixelRatio, brushCanvasHeight * pixelRatio);
|
|
46821
|
+
ctx.fillStyle = this.evChartBrushOptions.value.selection.fillColor;
|
|
46822
|
+
ctx.globalAlpha = this.evChartBrushOptions.value.selection.opacity;
|
|
46823
|
+
ctx.fillRect(brushRectX, 0, brushRectWidth, brushRectHeight);
|
|
46824
|
+
ctx.fillRect(brushButtonLeftXPos, 0, brushButtonWidth, brushRectHeight);
|
|
46825
|
+
ctx.fillRect(brushButtonRightXPos - brushButtonWidth, 0, brushButtonWidth, brushRectHeight);
|
|
46826
|
+
this.evChartBrushPos = {
|
|
46827
|
+
leftX: brushButtonLeftXPos / pixelRatio,
|
|
46828
|
+
rightX: brushButtonRightXPos / pixelRatio,
|
|
46829
|
+
buttonWidth: brushButtonWidth,
|
|
46830
|
+
axesXInterval: axesXInterval
|
|
46831
|
+
};
|
|
46832
|
+
}
|
|
46833
|
+
}, {
|
|
46834
|
+
key: "addEvent",
|
|
46835
|
+
value: function addEvent() {
|
|
46836
|
+
var _this = this;
|
|
46837
|
+
|
|
46838
|
+
var mousePosition;
|
|
46839
|
+
|
|
46840
|
+
this.onMouseDown = function (e) {
|
|
46841
|
+
e.preventDefault();
|
|
46842
|
+
|
|
46843
|
+
if (mousePosition.isInsideButton) {
|
|
46844
|
+
_this.clickBrushInsideX = -1;
|
|
46845
|
+
} else if (mousePosition.isInsideBrush) {
|
|
46846
|
+
_this.clickBrushInsideX = e.offsetX;
|
|
46847
|
+
} else if (mousePosition.isOutsideBrush) {
|
|
46848
|
+
_this.teleportBrush(e);
|
|
46849
|
+
}
|
|
46850
|
+
};
|
|
46851
|
+
|
|
46852
|
+
var onMouseMove = function onMouseMove(e) {
|
|
46853
|
+
if (_this.clickBrushInsideX) {
|
|
46854
|
+
_this.mouseDownAndMove(e);
|
|
46855
|
+
} else {
|
|
46856
|
+
mousePosition = _this.getMousePosition(e);
|
|
46857
|
+
|
|
46858
|
+
_this.changeCursor(mousePosition);
|
|
46859
|
+
}
|
|
46860
|
+
};
|
|
46861
|
+
|
|
46862
|
+
this.onMouseMove = lodash_es_throttle(onMouseMove, 5);
|
|
46863
|
+
|
|
46864
|
+
this.onWheel = function (e) {
|
|
46865
|
+
e.preventDefault();
|
|
46866
|
+
|
|
46867
|
+
_this.updateBrushIdx(e.deltaY > 0 ? 'movedown' : 'moveup');
|
|
46868
|
+
};
|
|
46869
|
+
|
|
46870
|
+
this.onMouseUp = function () {
|
|
46871
|
+
_this.initEventState();
|
|
46872
|
+
};
|
|
46873
|
+
|
|
46874
|
+
this.onMouseLeave = function () {
|
|
46875
|
+
if (_this.clickBrushInsideX) {
|
|
46876
|
+
_this.initEventState();
|
|
46877
|
+
}
|
|
46878
|
+
};
|
|
46879
|
+
|
|
46880
|
+
var onWheelDebounce = function onWheelDebounce() {
|
|
46881
|
+
_this.initEventState();
|
|
46882
|
+
};
|
|
46883
|
+
|
|
46884
|
+
this.onWheelDebounce = lodash_es_debounce(onWheelDebounce, 100);
|
|
46885
|
+
this.setEventListener('addEventListener');
|
|
46886
|
+
}
|
|
46887
|
+
}, {
|
|
46888
|
+
key: "getMousePosition",
|
|
46889
|
+
value: function getMousePosition(e) {
|
|
46890
|
+
var _this2 = this;
|
|
46891
|
+
|
|
46892
|
+
var calDisToCurMouseX = function calDisToCurMouseX(xPos) {
|
|
46893
|
+
return Math.abs(_this2.evChartBrushPos[xPos] - e.offsetX);
|
|
46894
|
+
};
|
|
46895
|
+
|
|
46896
|
+
var buttonType = calDisToCurMouseX('rightX') > calDisToCurMouseX('leftX') ? 'leftX' : 'rightX';
|
|
46897
|
+
this.curBrushButtonType = buttonType;
|
|
46898
|
+
|
|
46899
|
+
var isMoveRight = function isMoveRight(xPos) {
|
|
46900
|
+
return e.offsetX > _this2.evChartBrushPos[xPos];
|
|
46901
|
+
};
|
|
46902
|
+
|
|
46903
|
+
var isMoveLeft = function isMoveLeft(xPos) {
|
|
46904
|
+
return e.offsetX < _this2.evChartBrushPos[xPos];
|
|
46905
|
+
};
|
|
46906
|
+
|
|
46907
|
+
var isOutsideBrush = isMoveLeft('leftX') || isMoveRight('rightX');
|
|
46908
|
+
var isInsideBrush = isMoveRight('leftX') && isMoveLeft('rightX');
|
|
46909
|
+
var isInsideButton = e.offsetX + this.evChartBrushPos.buttonWidth >= this.evChartBrushPos[buttonType] && e.offsetX - this.evChartBrushPos.buttonWidth <= this.evChartBrushPos[buttonType];
|
|
46910
|
+
return {
|
|
46911
|
+
isInsideButton: isInsideButton,
|
|
46912
|
+
isInsideBrush: isInsideBrush,
|
|
46913
|
+
isOutsideBrush: isOutsideBrush
|
|
46914
|
+
};
|
|
46915
|
+
}
|
|
46916
|
+
}, {
|
|
46917
|
+
key: "destroy",
|
|
46918
|
+
value: function destroy() {
|
|
46919
|
+
if (this.brushCanvas) {
|
|
46920
|
+
this.setEventListener('removeEventListener');
|
|
46921
|
+
this.brushCanvas = null;
|
|
46922
|
+
}
|
|
46923
|
+
|
|
46924
|
+
var evChartBrushContainer = this.evChartBrushContainer;
|
|
46925
|
+
|
|
46926
|
+
while (evChartBrushContainer.hasChildNodes()) {
|
|
46927
|
+
evChartBrushContainer.removeChild(evChartBrushContainer.firstChild);
|
|
46928
|
+
}
|
|
46929
|
+
}
|
|
46930
|
+
/**
|
|
46931
|
+
* @param {string} type eventListener setting type.
|
|
46932
|
+
*
|
|
46933
|
+
* @returns {undefined}
|
|
46934
|
+
*/
|
|
46935
|
+
|
|
46936
|
+
}, {
|
|
46937
|
+
key: "setEventListener",
|
|
46938
|
+
value: function setEventListener(type) {
|
|
46939
|
+
this.brushCanvas[type]('mousemove', this.onMouseMove);
|
|
46940
|
+
this.brushCanvas[type]('mousedown', this.onMouseDown);
|
|
46941
|
+
this.brushCanvas[type]('mouseup', this.onMouseUp);
|
|
46942
|
+
this.brushCanvas[type]('mouseleave', this.onMouseLeave);
|
|
46943
|
+
this.brushCanvas[type]('wheel', this.onWheel);
|
|
46944
|
+
this.brushCanvas[type]('wheel', this.onWheelDebounce);
|
|
46945
|
+
}
|
|
46946
|
+
}, {
|
|
46947
|
+
key: "removeBrushWrapper",
|
|
46948
|
+
value: function removeBrushWrapper() {
|
|
46949
|
+
if (this.evChartBrushRef.value) {
|
|
46950
|
+
var evChartBrushWrapper = this.evChartBrushRef.value.querySelector('.ev-chart-brush-wrapper');
|
|
46951
|
+
|
|
46952
|
+
if (evChartBrushWrapper) {
|
|
46953
|
+
this.evChartBrushRef.value.removeChild(evChartBrushWrapper);
|
|
46954
|
+
}
|
|
46955
|
+
}
|
|
46956
|
+
}
|
|
46957
|
+
}, {
|
|
46958
|
+
key: "removeBrushCanvas",
|
|
46959
|
+
value: function removeBrushCanvas() {
|
|
46960
|
+
if (this.evChartBrushContainer) {
|
|
46961
|
+
var brushCanvas = this.evChartBrushContainer.querySelector('.brush-canvas');
|
|
46962
|
+
|
|
46963
|
+
if (brushCanvas) {
|
|
46964
|
+
this.evChartBrushContainer.removeChild(brushCanvas);
|
|
46965
|
+
}
|
|
46966
|
+
}
|
|
46967
|
+
}
|
|
46968
|
+
}, {
|
|
46969
|
+
key: "teleportBrush",
|
|
46970
|
+
value: function teleportBrush(e) {
|
|
46971
|
+
var _this$debounceBrushId2;
|
|
46972
|
+
|
|
46973
|
+
var brushIdx = (_this$debounceBrushId2 = this.debounceBrushIdx) !== null && _this$debounceBrushId2 !== void 0 ? _this$debounceBrushId2 : this.brushIdx;
|
|
46974
|
+
var middle = (brushIdx.end - brushIdx.start) / 2;
|
|
46975
|
+
var left;
|
|
46976
|
+
var right;
|
|
46977
|
+
var clickIdx;
|
|
46978
|
+
|
|
46979
|
+
if (middle > 0.5) {
|
|
46980
|
+
if ((brushIdx.end - brushIdx.start) % 2 === 0) {
|
|
46981
|
+
clickIdx = Math.round(e.offsetX / this.evChartBrushPos.axesXInterval);
|
|
46982
|
+
left = Math.ceil(middle);
|
|
46983
|
+
right = Math.floor(middle);
|
|
46984
|
+
} else {
|
|
46985
|
+
clickIdx = Math.ceil(e.offsetX / this.evChartBrushPos.axesXInterval);
|
|
46986
|
+
left = Math.ceil(middle);
|
|
46987
|
+
right = Math.floor(middle);
|
|
46988
|
+
}
|
|
46989
|
+
} else {
|
|
46990
|
+
clickIdx = Math.floor(e.offsetX / this.evChartBrushPos.axesXInterval);
|
|
46991
|
+
|
|
46992
|
+
if (e.offsetX - clickIdx * this.evChartBrushPos.axesXInterval > this.evChartBrushPos.axesXInterval / 2) {
|
|
46993
|
+
left = Math.floor(middle);
|
|
46994
|
+
right = Math.ceil(middle);
|
|
46995
|
+
} else {
|
|
46996
|
+
left = Math.ceil(middle);
|
|
46997
|
+
right = Math.floor(middle);
|
|
46998
|
+
|
|
46999
|
+
if (middle < 1) {
|
|
47000
|
+
clickIdx += 1;
|
|
47001
|
+
}
|
|
47002
|
+
}
|
|
47003
|
+
}
|
|
47004
|
+
|
|
47005
|
+
if (clickIdx - left <= 0) {
|
|
47006
|
+
brushIdx.start = 0;
|
|
47007
|
+
brushIdx.end = right + left;
|
|
47008
|
+
} else if (clickIdx + right >= this.labelEndIdx) {
|
|
47009
|
+
brushIdx.start = this.labelEndIdx - right - left;
|
|
47010
|
+
brushIdx.end = this.labelEndIdx;
|
|
47011
|
+
} else {
|
|
47012
|
+
brushIdx.start = clickIdx - left;
|
|
47013
|
+
brushIdx.end = clickIdx + right;
|
|
47014
|
+
}
|
|
47015
|
+
|
|
47016
|
+
this.brushIdx.isUseScroll = true;
|
|
47017
|
+
}
|
|
47018
|
+
}, {
|
|
47019
|
+
key: "changeCursor",
|
|
47020
|
+
value: function changeCursor(mousePosition) {
|
|
47021
|
+
if (mousePosition.isOutsideBrush) {
|
|
47022
|
+
this.brushCanvas.style.cursor = 'pointer';
|
|
47023
|
+
} else if (mousePosition.isInsideBrush) {
|
|
47024
|
+
if (mousePosition.isInsideButton) {
|
|
47025
|
+
this.brushCanvas.style.cursor = 'ew-resize';
|
|
47026
|
+
} else {
|
|
47027
|
+
this.brushCanvas.style.cursor = 'grab';
|
|
47028
|
+
}
|
|
47029
|
+
}
|
|
47030
|
+
}
|
|
47031
|
+
}, {
|
|
47032
|
+
key: "mouseDownAndMove",
|
|
47033
|
+
value: function mouseDownAndMove(e) {
|
|
47034
|
+
var moveSensitive = this.evChartBrushPos.axesXInterval / 3;
|
|
47035
|
+
var mode;
|
|
47036
|
+
|
|
47037
|
+
if (e.offsetX > this.beforeMouseXPos) {
|
|
47038
|
+
// 오른쪽 이동
|
|
47039
|
+
if (this.clickBrushInsideX > 0) {
|
|
47040
|
+
if (this.clickBrushInsideX < e.offsetX - moveSensitive) {
|
|
47041
|
+
mode = 'moveup';
|
|
47042
|
+
this.clickBrushInsideX = e.offsetX + moveSensitive;
|
|
47043
|
+
}
|
|
47044
|
+
} else {
|
|
47045
|
+
var isMoveRight = e.offsetX - this.evChartBrushPos[this.curBrushButtonType] > moveSensitive;
|
|
47046
|
+
|
|
47047
|
+
if (isMoveRight) {
|
|
47048
|
+
mode = this.curBrushButtonType === 'leftX' ? 'decrease' : 'increase';
|
|
47049
|
+
}
|
|
47050
|
+
}
|
|
47051
|
+
} else if (e.offsetX < this.beforeMouseXPos) {
|
|
47052
|
+
// 왼쪽 이동
|
|
47053
|
+
if (this.clickBrushInsideX > 0) {
|
|
47054
|
+
if (this.clickBrushInsideX > e.offsetX + moveSensitive) {
|
|
47055
|
+
mode = 'movedown';
|
|
47056
|
+
this.clickBrushInsideX = e.offsetX - moveSensitive;
|
|
47057
|
+
}
|
|
47058
|
+
} else {
|
|
47059
|
+
var isMoveLeft = this.evChartBrushPos[this.curBrushButtonType] - e.offsetX > moveSensitive;
|
|
47060
|
+
|
|
47061
|
+
if (isMoveLeft) {
|
|
47062
|
+
mode = this.curBrushButtonType === 'leftX' ? 'increase' : 'decrease';
|
|
47063
|
+
}
|
|
47064
|
+
}
|
|
47065
|
+
}
|
|
47066
|
+
|
|
47067
|
+
if (mode) {
|
|
47068
|
+
this.updateBrushIdx(mode);
|
|
47069
|
+
}
|
|
47070
|
+
|
|
47071
|
+
this.beforeMouseXPos = e.offsetX;
|
|
47072
|
+
}
|
|
47073
|
+
/**
|
|
47074
|
+
* @param {string} mode determines how to update the brush index value.
|
|
47075
|
+
*
|
|
47076
|
+
* @returns {undefined}
|
|
47077
|
+
*/
|
|
47078
|
+
|
|
47079
|
+
}, {
|
|
47080
|
+
key: "updateBrushIdx",
|
|
47081
|
+
value: function updateBrushIdx(mode) {
|
|
47082
|
+
var _this$debounceBrushId3;
|
|
47083
|
+
|
|
47084
|
+
var brushIdx = (_this$debounceBrushId3 = this.debounceBrushIdx) !== null && _this$debounceBrushId3 !== void 0 ? _this$debounceBrushId3 : this.brushIdx;
|
|
47085
|
+
|
|
47086
|
+
switch (mode) {
|
|
47087
|
+
case 'moveup':
|
|
47088
|
+
if (brushIdx.end === this.labelEndIdx) {
|
|
47089
|
+
return;
|
|
47090
|
+
}
|
|
47091
|
+
|
|
47092
|
+
brushIdx.start += 1;
|
|
47093
|
+
brushIdx.end += 1;
|
|
47094
|
+
this.brushIdx.isUseScroll = true;
|
|
47095
|
+
break;
|
|
47096
|
+
|
|
47097
|
+
case 'movedown':
|
|
47098
|
+
if (!brushIdx.start) {
|
|
47099
|
+
return;
|
|
47100
|
+
}
|
|
47101
|
+
|
|
47102
|
+
brushIdx.start -= 1;
|
|
47103
|
+
brushIdx.end -= 1;
|
|
47104
|
+
this.brushIdx.isUseScroll = true;
|
|
47105
|
+
break;
|
|
47106
|
+
|
|
47107
|
+
case 'increase':
|
|
47108
|
+
if (this.curBrushButtonType === 'leftX') {
|
|
47109
|
+
if (!brushIdx.start) {
|
|
47110
|
+
return;
|
|
47111
|
+
}
|
|
47112
|
+
|
|
47113
|
+
brushIdx.start -= 1;
|
|
47114
|
+
} else {
|
|
47115
|
+
if (brushIdx.end === this.labelEndIdx) {
|
|
47116
|
+
return;
|
|
47117
|
+
}
|
|
47118
|
+
|
|
47119
|
+
brushIdx.end += 1;
|
|
47120
|
+
}
|
|
47121
|
+
|
|
47122
|
+
this.brushIdx.isUseButton = true;
|
|
47123
|
+
break;
|
|
47124
|
+
|
|
47125
|
+
case 'decrease':
|
|
47126
|
+
if (brushIdx.start === brushIdx.end - 1) {
|
|
47127
|
+
return;
|
|
47128
|
+
}
|
|
47129
|
+
|
|
47130
|
+
if (this.curBrushButtonType === 'leftX') {
|
|
47131
|
+
brushIdx.start += 1;
|
|
47132
|
+
} else {
|
|
47133
|
+
brushIdx.end -= 1;
|
|
47134
|
+
}
|
|
47135
|
+
|
|
47136
|
+
this.brushIdx.isUseButton = true;
|
|
47137
|
+
break;
|
|
47138
|
+
|
|
47139
|
+
default:
|
|
47140
|
+
break;
|
|
47141
|
+
}
|
|
47142
|
+
|
|
47143
|
+
if (mode && this.debounceBrushIdx) {
|
|
47144
|
+
this.drawBrushRect({
|
|
47145
|
+
brushCanvas: this.brushCanvas,
|
|
47146
|
+
isResize: false,
|
|
47147
|
+
isDebounce: true
|
|
47148
|
+
});
|
|
47149
|
+
}
|
|
47150
|
+
}
|
|
47151
|
+
/**
|
|
47152
|
+
* @param {boolean} isUpdateBrushIdx to initialize state after update brush index value
|
|
47153
|
+
*
|
|
47154
|
+
* @returns {undefined}
|
|
47155
|
+
*/
|
|
47156
|
+
|
|
47157
|
+
}, {
|
|
47158
|
+
key: "initEventState",
|
|
47159
|
+
value: function initEventState() {
|
|
47160
|
+
var _this3 = this;
|
|
47161
|
+
|
|
47162
|
+
var promise = new Promise(function (resolve) {
|
|
47163
|
+
if (_this3.debounceBrushIdx && (_this3.brushIdx.isUseButton || _this3.brushIdx.isUseScroll)) {
|
|
47164
|
+
_this3.brushIdx.start = _this3.debounceBrushIdx.start;
|
|
47165
|
+
_this3.brushIdx.end = _this3.debounceBrushIdx.end;
|
|
47166
|
+
}
|
|
47167
|
+
|
|
47168
|
+
resolve(true);
|
|
47169
|
+
});
|
|
47170
|
+
promise.then(function (isUpdateBrushIdx) {
|
|
47171
|
+
if (isUpdateBrushIdx) {
|
|
47172
|
+
_this3.clickBrushInsideX = null;
|
|
47173
|
+
_this3.beforeMouseXPos = null;
|
|
47174
|
+
_this3.curBrushButtonType = null;
|
|
47175
|
+
_this3.brushIdx.isUseButton = false;
|
|
47176
|
+
_this3.brushIdx.isUseScroll = false;
|
|
47177
|
+
}
|
|
47178
|
+
});
|
|
47179
|
+
}
|
|
47180
|
+
}]);
|
|
47181
|
+
|
|
47182
|
+
return EvChartBrush;
|
|
47183
|
+
}();
|
|
47184
|
+
|
|
47185
|
+
|
|
47186
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/uses.js
|
|
47187
|
+
|
|
47188
|
+
var chartBrush_uses_DEFAULT_OPTIONS = {
|
|
47189
|
+
show: true,
|
|
47190
|
+
useDebounce: true,
|
|
47191
|
+
chartIdx: 0,
|
|
47192
|
+
height: 100,
|
|
47193
|
+
showLabel: false,
|
|
47194
|
+
selection: {
|
|
47195
|
+
fillColor: '#38ACEC',
|
|
47196
|
+
opacity: 0.65
|
|
47197
|
+
}
|
|
47198
|
+
}; // eslint-disable-next-line import/prefer-default-export
|
|
47199
|
+
|
|
47200
|
+
var uses_useBrushModel = function useBrushModel() {
|
|
47201
|
+
var getNormalizedBrushOptions = function getNormalizedBrushOptions(options) {
|
|
47202
|
+
return lodash_es_defaultsDeep({}, options, chartBrush_uses_DEFAULT_OPTIONS);
|
|
47203
|
+
};
|
|
47204
|
+
|
|
47205
|
+
return {
|
|
47206
|
+
getNormalizedBrushOptions: getNormalizedBrushOptions
|
|
47207
|
+
};
|
|
47208
|
+
};
|
|
47209
|
+
// 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
|
|
47210
|
+
|
|
47211
|
+
|
|
47212
|
+
|
|
47213
|
+
|
|
47214
|
+
|
|
47215
|
+
|
|
47216
|
+
|
|
47217
|
+
|
|
47218
|
+
|
|
47219
|
+
|
|
47220
|
+
|
|
47221
|
+
|
|
47222
|
+
|
|
47223
|
+
|
|
47224
|
+
/* harmony default export */ var ChartBrushvue_type_script_lang_js = ({
|
|
47225
|
+
name: 'EvChartBrush',
|
|
47226
|
+
props: {
|
|
47227
|
+
options: {
|
|
47228
|
+
type: Object,
|
|
47229
|
+
default: function _default() {
|
|
47230
|
+
return {};
|
|
47231
|
+
}
|
|
47232
|
+
}
|
|
47233
|
+
},
|
|
47234
|
+
setup: function setup(props) {
|
|
47235
|
+
var evChart = null;
|
|
47236
|
+
var evChartBrush = null;
|
|
47237
|
+
var injectEvChartClone = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('evChartClone', {
|
|
47238
|
+
data: []
|
|
47239
|
+
});
|
|
47240
|
+
var injectEvChartInfo = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('evChartInfo', {
|
|
47241
|
+
props: {
|
|
47242
|
+
options: []
|
|
47243
|
+
}
|
|
47244
|
+
});
|
|
47245
|
+
var injectBrushIdx = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('brushIdx', {
|
|
47246
|
+
start: 0,
|
|
47247
|
+
end: 0,
|
|
47248
|
+
isUseButton: false,
|
|
47249
|
+
isUseScroll: false
|
|
47250
|
+
});
|
|
47251
|
+
var injectBrushSeries = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["inject"])('brushSeries', {
|
|
47252
|
+
list: [],
|
|
47253
|
+
chartIdx: null
|
|
47254
|
+
});
|
|
47255
|
+
|
|
47256
|
+
var _useBrushModel = uses_useBrushModel(),
|
|
47257
|
+
getNormalizedBrushOptions = _useBrushModel.getNormalizedBrushOptions;
|
|
47258
|
+
|
|
47259
|
+
var evChartBrushOptions = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
47260
|
+
return getNormalizedBrushOptions(props.options);
|
|
47261
|
+
});
|
|
47262
|
+
|
|
47263
|
+
var _useModel = chart_uses_useModel(),
|
|
47264
|
+
eventListeners = _useModel.eventListeners,
|
|
47265
|
+
selectItemInfo = _useModel.selectItemInfo,
|
|
47266
|
+
selectLabelInfo = _useModel.selectLabelInfo,
|
|
47267
|
+
selectSeriesInfo = _useModel.selectSeriesInfo,
|
|
47268
|
+
getNormalizedData = _useModel.getNormalizedData,
|
|
47269
|
+
getNormalizedOptions = _useModel.getNormalizedOptions;
|
|
47270
|
+
|
|
47271
|
+
var evChartData = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
47272
|
+
var _injectEvChartClone$d;
|
|
47273
|
+
|
|
47274
|
+
return getNormalizedData(((_injectEvChartClone$d = injectEvChartClone.data) !== null && _injectEvChartClone$d !== void 0 ? _injectEvChartClone$d : [])[evChartBrushOptions.value.chartIdx]);
|
|
47275
|
+
});
|
|
47276
|
+
var evChartOption = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["computed"])(function () {
|
|
47277
|
+
var _chartOption$axesX, _chartOption$axesY;
|
|
47278
|
+
|
|
47279
|
+
var chartOption = injectEvChartInfo.props.options[evChartBrushOptions.value.chartIdx];
|
|
47280
|
+
|
|
47281
|
+
var option = _objectSpread2(_objectSpread2({}, chartOption), {}, {
|
|
47282
|
+
brush: _objectSpread2({
|
|
47283
|
+
use: true
|
|
47284
|
+
}, evChartBrushOptions.value),
|
|
47285
|
+
height: evChartBrushOptions.value.height,
|
|
47286
|
+
zoom: {
|
|
47287
|
+
use: false
|
|
47288
|
+
},
|
|
47289
|
+
dragSelection: {
|
|
47290
|
+
use: false
|
|
47291
|
+
},
|
|
47292
|
+
title: {
|
|
47293
|
+
show: false
|
|
47294
|
+
},
|
|
47295
|
+
tooltip: {
|
|
47296
|
+
use: false
|
|
47297
|
+
},
|
|
47298
|
+
legend: {
|
|
47299
|
+
show: false
|
|
47300
|
+
},
|
|
47301
|
+
selectLabel: {
|
|
47302
|
+
use: false
|
|
47303
|
+
},
|
|
47304
|
+
selectSeries: {
|
|
47305
|
+
use: false
|
|
47306
|
+
},
|
|
47307
|
+
axesX: [_objectSpread2(_objectSpread2({}, chartOption === null || chartOption === void 0 ? void 0 : (_chartOption$axesX = chartOption.axesX) === null || _chartOption$axesX === void 0 ? void 0 : _chartOption$axesX[0]), {}, {
|
|
47308
|
+
title: {
|
|
47309
|
+
use: false
|
|
47310
|
+
}
|
|
47311
|
+
})],
|
|
47312
|
+
axesY: [_objectSpread2(_objectSpread2({}, chartOption === null || chartOption === void 0 ? void 0 : (_chartOption$axesY = chartOption.axesY) === null || _chartOption$axesY === void 0 ? void 0 : _chartOption$axesY[0]), {}, {
|
|
47313
|
+
title: {
|
|
47314
|
+
use: false
|
|
47315
|
+
}
|
|
47316
|
+
})]
|
|
47317
|
+
});
|
|
47318
|
+
|
|
47319
|
+
return getNormalizedOptions(option);
|
|
47320
|
+
});
|
|
47321
|
+
|
|
47322
|
+
var _useWrapper = uses_useWrapper(evChartOption.value),
|
|
47323
|
+
evChartBrushRef = _useWrapper.wrapper,
|
|
47324
|
+
evChartBrushStyle = _useWrapper.wrapperStyle;
|
|
47325
|
+
|
|
47326
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
47327
|
+
return injectBrushSeries.list;
|
|
47328
|
+
}, function () {
|
|
47329
|
+
if (evChartBrushRef.value && injectBrushSeries.chartIdx === evChartBrushOptions.value.chartIdx) {
|
|
47330
|
+
evChart.seriesList = injectBrushSeries.list[evChartBrushOptions.value.chartIdx];
|
|
47331
|
+
evChart.update({
|
|
47332
|
+
updateSeries: false,
|
|
47333
|
+
updateSelTip: {
|
|
47334
|
+
update: false,
|
|
47335
|
+
keepDomain: false
|
|
47336
|
+
}
|
|
47337
|
+
});
|
|
47338
|
+
}
|
|
47339
|
+
});
|
|
47340
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(evChartOption, function (newOpt, prevOpt) {
|
|
47341
|
+
var _injectEvChartClone$d2;
|
|
47342
|
+
|
|
47343
|
+
if (newOpt.brush.chartIdx <= ((_injectEvChartClone$d2 = injectEvChartClone.data) === null || _injectEvChartClone$d2 === void 0 ? void 0 : _injectEvChartClone$d2.length) - 1) {
|
|
47344
|
+
if (evChartBrush && !lodash_es_isEqual(prevOpt.brush, newOpt.brush)) {
|
|
47345
|
+
evChartBrush.removeBrushWrapper();
|
|
47346
|
+
} else if (evChart && !lodash_es_isEqual(newOpt, prevOpt)) {
|
|
47347
|
+
evChart.options = lodash_es_cloneDeep(newOpt);
|
|
47348
|
+
evChart.update({
|
|
47349
|
+
updateSeries: false,
|
|
47350
|
+
updateSelTip: {
|
|
47351
|
+
update: false,
|
|
47352
|
+
keepDomain: false
|
|
47353
|
+
}
|
|
47354
|
+
});
|
|
47355
|
+
}
|
|
47356
|
+
} else {
|
|
47357
|
+
evChart.data = lodash_es_cloneDeep(evChartData.value);
|
|
47358
|
+
evChart.update({
|
|
47359
|
+
updateSeries: true,
|
|
47360
|
+
updateSelTip: {
|
|
47361
|
+
update: false,
|
|
47362
|
+
keepDomain: false
|
|
47363
|
+
},
|
|
47364
|
+
updateData: false
|
|
47365
|
+
});
|
|
47366
|
+
evChartBrush.removeBrushCanvas();
|
|
47367
|
+
}
|
|
47368
|
+
});
|
|
47369
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
47370
|
+
return injectEvChartClone.data;
|
|
47371
|
+
}, function (newData) {
|
|
47372
|
+
if (evChart) {
|
|
47373
|
+
var data = newData[evChartBrushOptions.value.chartIdx];
|
|
47374
|
+
|
|
47375
|
+
if (data) {
|
|
47376
|
+
var isUpdateSeries = !lodash_es_isEqual(data.series, evChart.data.series);
|
|
47377
|
+
var seriesList = injectBrushSeries.list[evChartBrushOptions.value.chartIdx];
|
|
47378
|
+
|
|
47379
|
+
if (seriesList) {
|
|
47380
|
+
Object.keys(data.series).forEach(function (series) {
|
|
47381
|
+
data.series[series].show = seriesList[series].show;
|
|
47382
|
+
});
|
|
47383
|
+
}
|
|
47384
|
+
|
|
47385
|
+
evChart.data = lodash_es_cloneDeep(data);
|
|
47386
|
+
evChart.update({
|
|
47387
|
+
updateSeries: isUpdateSeries,
|
|
47388
|
+
updateSelTip: {
|
|
47389
|
+
update: false,
|
|
47390
|
+
keepDomain: false
|
|
47391
|
+
},
|
|
47392
|
+
updateData: false
|
|
47393
|
+
});
|
|
47394
|
+
}
|
|
47395
|
+
}
|
|
47396
|
+
});
|
|
47397
|
+
|
|
47398
|
+
var createChart = function createChart() {
|
|
47399
|
+
var selected;
|
|
47400
|
+
|
|
47401
|
+
if (evChartOption.value.selectLabel.use) {
|
|
47402
|
+
selected = selectLabelInfo;
|
|
47403
|
+
} else if (evChartOption.value.selectSeries.use) {
|
|
47404
|
+
selected = selectSeriesInfo;
|
|
47405
|
+
}
|
|
47406
|
+
|
|
47407
|
+
evChart = new chart_core(evChartBrushRef.value, evChartData.value, evChartOption.value, eventListeners, selectItemInfo, selected);
|
|
47408
|
+
};
|
|
47409
|
+
|
|
47410
|
+
var createChartBrush = function createChartBrush() {
|
|
47411
|
+
evChartBrush = new chartBrush_core_EvChartBrush(evChart, evChartData, evChartBrushOptions, injectBrushIdx, evChartBrushRef);
|
|
47412
|
+
};
|
|
47413
|
+
|
|
47414
|
+
var drawChart = function drawChart() {
|
|
47415
|
+
if (evChart) {
|
|
47416
|
+
evChart.init();
|
|
47417
|
+
}
|
|
47418
|
+
};
|
|
47419
|
+
|
|
47420
|
+
var drawChartBrush = function drawChartBrush(isResize) {
|
|
47421
|
+
if (evChartBrush) {
|
|
47422
|
+
evChartBrush.init(isResize);
|
|
47423
|
+
}
|
|
47424
|
+
};
|
|
47425
|
+
|
|
47426
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["watch"])(function () {
|
|
47427
|
+
return [injectBrushIdx.start, injectBrushIdx.end];
|
|
47428
|
+
}, function () {
|
|
47429
|
+
var _injectEvChartClone$d3;
|
|
47430
|
+
|
|
47431
|
+
if (evChartBrushRef.value && evChartBrushOptions.value.chartIdx <= ((_injectEvChartClone$d3 = injectEvChartClone.data) === null || _injectEvChartClone$d3 === void 0 ? void 0 : _injectEvChartClone$d3.length) - 1) {
|
|
47432
|
+
drawChartBrush();
|
|
47433
|
+
}
|
|
47434
|
+
});
|
|
47435
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onMounted"])( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
47436
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
47437
|
+
while (1) {
|
|
47438
|
+
switch (_context.prev = _context.next) {
|
|
47439
|
+
case 0:
|
|
47440
|
+
if (!evChartBrushOptions.value.show) {
|
|
47441
|
+
_context.next = 7;
|
|
47442
|
+
break;
|
|
47443
|
+
}
|
|
47444
|
+
|
|
47445
|
+
_context.next = 3;
|
|
47446
|
+
return createChart();
|
|
47447
|
+
|
|
47448
|
+
case 3:
|
|
47449
|
+
_context.next = 5;
|
|
47450
|
+
return drawChart();
|
|
47451
|
+
|
|
47452
|
+
case 5:
|
|
47453
|
+
createChartBrush();
|
|
47454
|
+
drawChartBrush();
|
|
47455
|
+
|
|
47456
|
+
case 7:
|
|
47457
|
+
case "end":
|
|
47458
|
+
return _context.stop();
|
|
47459
|
+
}
|
|
47460
|
+
}
|
|
47461
|
+
}, _callee);
|
|
47462
|
+
})));
|
|
47463
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onUpdated"])( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
47464
|
+
var _injectEvChartClone$d4, seriesList;
|
|
47465
|
+
|
|
47466
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
47467
|
+
while (1) {
|
|
47468
|
+
switch (_context2.prev = _context2.next) {
|
|
47469
|
+
case 0:
|
|
47470
|
+
if (!evChartBrushOptions.value.show) {
|
|
47471
|
+
_context2.next = 10;
|
|
47472
|
+
break;
|
|
47473
|
+
}
|
|
47474
|
+
|
|
47475
|
+
if (!(evChartBrushOptions.value.chartIdx <= ((_injectEvChartClone$d4 = injectEvChartClone.data) === null || _injectEvChartClone$d4 === void 0 ? void 0 : _injectEvChartClone$d4.length) - 1)) {
|
|
47476
|
+
_context2.next = 10;
|
|
47477
|
+
break;
|
|
47478
|
+
}
|
|
47479
|
+
|
|
47480
|
+
seriesList = injectBrushSeries.list[evChartBrushOptions.value.chartIdx];
|
|
47481
|
+
|
|
47482
|
+
if (seriesList) {
|
|
47483
|
+
Object.keys(evChartData.value.series).forEach(function (series) {
|
|
47484
|
+
evChartData.value.series[series].show = seriesList[series].show;
|
|
47485
|
+
});
|
|
47486
|
+
}
|
|
47487
|
+
|
|
47488
|
+
_context2.next = 6;
|
|
47489
|
+
return createChart();
|
|
47490
|
+
|
|
47491
|
+
case 6:
|
|
47492
|
+
_context2.next = 8;
|
|
47493
|
+
return drawChart();
|
|
47494
|
+
|
|
47495
|
+
case 8:
|
|
47496
|
+
createChartBrush();
|
|
47497
|
+
drawChartBrush();
|
|
47498
|
+
|
|
47499
|
+
case 10:
|
|
47500
|
+
case "end":
|
|
47501
|
+
return _context2.stop();
|
|
47502
|
+
}
|
|
47503
|
+
}
|
|
47504
|
+
}, _callee2);
|
|
47505
|
+
})));
|
|
47506
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onBeforeUnmount"])(function () {
|
|
47507
|
+
if (evChart && 'destroy' in evChart) {
|
|
47508
|
+
evChart.destroy();
|
|
47509
|
+
}
|
|
47510
|
+
|
|
47511
|
+
if (evChartBrush) {
|
|
47512
|
+
evChartBrush.destroy();
|
|
47513
|
+
}
|
|
47514
|
+
});
|
|
47515
|
+
Object(external_commonjs_vue_commonjs2_vue_root_Vue_["onDeactivated"])(function () {
|
|
47516
|
+
if (evChart && 'hideTooltip' in evChart) {
|
|
47517
|
+
evChart.hideTooltip();
|
|
47518
|
+
}
|
|
47519
|
+
});
|
|
47520
|
+
/**
|
|
47521
|
+
* @param {boolean} isResizeDone resizing complete status
|
|
47522
|
+
*
|
|
47523
|
+
* @returns {undefined}
|
|
47524
|
+
*/
|
|
47525
|
+
|
|
47526
|
+
var onResize = lodash_es_debounce(function () {
|
|
47527
|
+
if (evChart && 'resize' in evChart) {
|
|
47528
|
+
var resize = new Promise(function (resolve) {
|
|
47529
|
+
return evChart.resize(resolve);
|
|
47530
|
+
});
|
|
47531
|
+
resize.then(function (isResizeDone) {
|
|
47532
|
+
if (isResizeDone) {
|
|
47533
|
+
drawChartBrush(isResizeDone);
|
|
47534
|
+
}
|
|
47535
|
+
});
|
|
47536
|
+
}
|
|
47537
|
+
}, 0);
|
|
47538
|
+
return {
|
|
47539
|
+
evChartBrushOptions: evChartBrushOptions,
|
|
47540
|
+
evChartBrushRef: evChartBrushRef,
|
|
47541
|
+
evChartBrushStyle: evChartBrushStyle,
|
|
47542
|
+
onResize: onResize
|
|
47543
|
+
};
|
|
47544
|
+
}
|
|
47545
|
+
});
|
|
47546
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/ChartBrush.vue?vue&type=script&lang=js
|
|
47547
|
+
|
|
47548
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/ChartBrush.vue
|
|
47549
|
+
|
|
47550
|
+
|
|
47551
|
+
|
|
47552
|
+
|
|
47553
|
+
|
|
47554
|
+
const ChartBrush_exports_ = /*#__PURE__*/exportHelper_default()(ChartBrushvue_type_script_lang_js, [['render',ChartBrushvue_type_template_id_1b10467a_render]])
|
|
47555
|
+
|
|
47556
|
+
/* harmony default export */ var ChartBrush = (ChartBrush_exports_);
|
|
47557
|
+
// CONCATENATED MODULE: ./src/components/chartBrush/index.js
|
|
47558
|
+
|
|
47559
|
+
|
|
47560
|
+
|
|
47561
|
+
|
|
47562
|
+
ChartBrush.install = function (app) {
|
|
47563
|
+
app.component(ChartBrush.name, ChartBrush);
|
|
47564
|
+
app.use(dist_default.a);
|
|
47565
|
+
};
|
|
47566
|
+
|
|
47567
|
+
/* harmony default export */ var chartBrush = (ChartBrush);
|
|
45326
47568
|
// 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
|
|
45327
47569
|
|
|
45328
47570
|
|
|
@@ -46597,7 +48839,7 @@ var treeGrid_uses_contextMenuEvent = function contextMenuEvent(params) {
|
|
|
46597
48839
|
|
|
46598
48840
|
var onContextMenu = function onContextMenu(event) {
|
|
46599
48841
|
var target = event.target;
|
|
46600
|
-
var rowIndex = target.
|
|
48842
|
+
var rowIndex = target.closest('.row').dataset.index;
|
|
46601
48843
|
|
|
46602
48844
|
if (rowIndex) {
|
|
46603
48845
|
var index = stores.viewStore.findIndex(function (v) {
|
|
@@ -47743,22 +49985,27 @@ function Paginationvue_type_template_id_541b906a_render(_ctx, _cache, $props, $s
|
|
|
47743
49985
|
}
|
|
47744
49986
|
// CONCATENATED MODULE: ./src/components/pagination/Pagination.vue?vue&type=template&id=541b906a
|
|
47745
49987
|
|
|
47746
|
-
// 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=
|
|
49988
|
+
// 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
|
|
47747
49989
|
|
|
47748
49990
|
|
|
47749
|
-
function
|
|
49991
|
+
function pageButtonvue_type_template_id_530eda26_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
47750
49992
|
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"])({
|
|
47751
49993
|
class: _defineProperty({
|
|
47752
49994
|
'is-current': $props.page.isCurrent,
|
|
47753
49995
|
'is-disabled': $props.disabled || $props.page.disabled
|
|
47754
49996
|
}, $props.page.class, true)
|
|
47755
49997
|
}, _ctx.$attrs, {
|
|
47756
|
-
"aria-current": $props.page.isCurrent
|
|
49998
|
+
"aria-current": $props.page.isCurrent,
|
|
49999
|
+
onClick: _cache[1] || (_cache[1] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(function () {
|
|
50000
|
+
var _$props$page;
|
|
50001
|
+
|
|
50002
|
+
return $props.page.click && (_$props$page = $props.page).click.apply(_$props$page, arguments);
|
|
50003
|
+
}, ["stop"]))
|
|
47757
50004
|
}), [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", {}, function () {
|
|
47758
50005
|
return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])($props.page.number), 1)];
|
|
47759
50006
|
})], 16, ["aria-current"]);
|
|
47760
50007
|
}
|
|
47761
|
-
// CONCATENATED MODULE: ./src/components/pagination/pageButton.vue?vue&type=template&id=
|
|
50008
|
+
// CONCATENATED MODULE: ./src/components/pagination/pageButton.vue?vue&type=template&id=530eda26
|
|
47762
50009
|
|
|
47763
50010
|
// 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
|
|
47764
50011
|
/* harmony default export */ var pageButtonvue_type_script_lang_js = ({
|
|
@@ -47782,7 +50029,7 @@ function pageButtonvue_type_template_id_dcd27724_render(_ctx, _cache, $props, $s
|
|
|
47782
50029
|
|
|
47783
50030
|
|
|
47784
50031
|
|
|
47785
|
-
const pageButton_exports_ = /*#__PURE__*/exportHelper_default()(pageButtonvue_type_script_lang_js, [['render',
|
|
50032
|
+
const pageButton_exports_ = /*#__PURE__*/exportHelper_default()(pageButtonvue_type_script_lang_js, [['render',pageButtonvue_type_template_id_530eda26_render]])
|
|
47786
50033
|
|
|
47787
50034
|
/* harmony default export */ var pageButton = (pageButton_exports_);
|
|
47788
50035
|
// 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
|
|
@@ -48026,7 +50273,9 @@ var package_0 = __webpack_require__("9224");
|
|
|
48026
50273
|
|
|
48027
50274
|
|
|
48028
50275
|
|
|
48029
|
-
|
|
50276
|
+
|
|
50277
|
+
|
|
50278
|
+
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];
|
|
48030
50279
|
|
|
48031
50280
|
var install = function install(app) {
|
|
48032
50281
|
if (!app) {
|