@supermapgis/vue-iclient-leaflet 11.3.0 → 12.0.1-r
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/iclient-leaflet-vue.css +9 -5
- package/dist/iclient-leaflet-vue.js +976 -808
- package/dist/iclient-leaflet-vue.min.css +2 -2
- package/dist/iclient-leaflet-vue.min.js +10 -10
- package/lib/_assets/iconfont/icon-sm-components.css +7 -3
- package/lib/_assets/iconfont/icon-sm-components.ttf +0 -0
- package/lib/_assets/iconfont/icon-sm-components.woff +0 -0
- package/lib/_assets/iconfont/icon-sm-components.woff2 +0 -0
- package/lib/_lang/en.js +7 -3
- package/lib/_lang/index.js +23 -23
- package/lib/_lang/zh.js +7 -3
- package/lib/_mixin/AntdRender.js +8 -8
- package/lib/_mixin/Card.js +4 -4
- package/lib/_mixin/GridLayer.js +4 -4
- package/lib/_mixin/Layer.js +2 -2
- package/lib/_mixin/Popper.js +2 -2
- package/lib/_mixin/Theme.js +4 -4
- package/lib/_mixin/ThirdService.js +2 -2
- package/lib/_mixin/TileLayer.js +4 -4
- package/lib/_mixin/Timer.js +2 -2
- package/lib/_mixin/VmUpdater.js +2 -2
- package/lib/_mixin/map-events.js +2 -2
- package/lib/_mixin/map-getter.js +4 -4
- package/lib/_types/AddressMatchParameter.js +2 -2
- package/lib/_types/GeoJSONParamter.js +2 -2
- package/lib/_types/RestDataParameter.js +4 -4
- package/lib/_types/RestMapParameter.js +4 -4
- package/lib/_types/RestParameter.js +2 -2
- package/lib/_types/event/BaseTypes.js +2 -2
- package/lib/_types/event/Event.js +4 -4
- package/lib/_types/event/Events.js +10 -10
- package/lib/_types/event/Pixel.js +2 -2
- package/lib/_types/event/Util.js +2 -2
- package/lib/_types/iPortalDataParameter.js +2 -2
- package/lib/_types/iServerBaseParameter.js +2 -2
- package/lib/_types/iServerDataParameter.js +4 -4
- package/lib/_types/iServerMapParameter.js +4 -4
- package/lib/_types/index.js +18 -18
- package/lib/_types/map-event.js +2 -2
- package/lib/_utils/EchartsDataService.js +10 -10
- package/lib/_utils/RestService.js +2 -2
- package/lib/_utils/epsg-define.js +48 -7
- package/lib/_utils/get-features.js +6 -6
- package/lib/_utils/global-event.js +2 -2
- package/lib/_utils/iPortalDataService.js +7 -4
- package/lib/_utils/iServerRestService.js +10 -10
- package/lib/_utils/props-binder.js +2 -2
- package/lib/_utils/statistics.js +2 -2
- package/lib/_utils/style/color/colorPalette.js +2 -2
- package/lib/_utils/style/color/serialColors.js +6 -6
- package/lib/_utils/style/theme/chart.js +4 -4
- package/lib/_utils/style/theme/set-theme.js +6 -5
- package/lib/_utils/util.js +9 -0
- package/lib/_utils/vue-types/utils.js +2 -2
- package/lib/attribute-panel/style/attribute-panel.css +1 -1
- package/lib/avatar/index.js +6 -6
- package/lib/border/index.js +48 -48
- package/lib/breadcrumb/index.js +14 -14
- package/lib/button/index.js +10 -10
- package/lib/card/index.js +14 -14
- package/lib/chart/index.js +1254 -1145
- package/lib/checkbox/index.js +10 -10
- package/lib/collapse/index.js +13 -13
- package/lib/collapse-card/index.js +6 -6
- package/lib/color-picker/index.js +8 -8
- package/lib/date-picker/index.js +10 -10
- package/lib/dropdown/index.js +6 -6
- package/lib/empty/index.js +6 -6
- package/lib/icon/index.js +6 -6
- package/lib/identify/index.js +22 -22
- package/lib/iframe/index.js +6 -6
- package/lib/image/index.js +8 -8
- package/lib/indicator/index.js +15 -15
- package/lib/init.js +6 -6
- package/lib/input/index.js +22 -22
- package/lib/input-number/index.js +6 -6
- package/lib/layout/index.js +14 -14
- package/lib/liquid-fill/index.js +30 -21
- package/lib/marker/index.js +12 -12
- package/lib/menu/index.js +12 -12
- package/lib/modal/index.js +6 -6
- package/lib/notification/index.js +6 -6
- package/lib/pagination/index.js +15 -15
- package/lib/popup/index.js +16 -16
- package/lib/progress/index.js +24 -16
- package/lib/radio/index.js +15 -15
- package/lib/select/index.js +12 -12
- package/lib/slider/index.js +6 -6
- package/lib/slideshow/index.js +29 -29
- package/lib/spin/index.js +9 -9
- package/lib/steps/index.js +9 -9
- package/lib/switch/index.js +6 -6
- package/lib/table/index.js +17 -17
- package/lib/table-popup/index.js +8 -8
- package/lib/table-popup/style/table-popup.css +1 -1
- package/lib/tabs/index.js +9 -9
- package/lib/text/index.js +8 -8
- package/lib/tile-layer/index.js +14 -14
- package/lib/time-line/index.js +8 -8
- package/lib/time-picker/index.js +6 -6
- package/lib/time-range/index.js +8 -8
- package/lib/time-slider/index.js +12 -12
- package/lib/time-text/index.js +6 -6
- package/lib/tooltip/index.js +6 -6
- package/lib/transfer/index.js +6 -6
- package/lib/tree/index.js +15 -15
- package/lib/tree-select/index.js +9 -9
- package/lib/video-player/index.js +22 -22
- package/lib/web-map/index.js +45 -45
- package/package.json +1 -2
- package/src/common/_assets/iconfont/icon-sm-components.css +7 -3
- package/src/common/_assets/iconfont/icon-sm-components.ttf +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.woff +0 -0
- package/src/common/_assets/iconfont/icon-sm-components.woff2 +0 -0
- package/src/common/_lang/en.js +5 -1
- package/src/common/_lang/zh.js +5 -1
- package/src/common/_utils/epsg-define.js +39 -5
- package/src/common/_utils/iPortalDataService.js +2 -0
- package/src/common/_utils/style/theme/set-theme.ts +2 -1
- package/src/common/_utils/util.js +7 -0
- package/src/common/chart/ChartHandleMixin.vue +650 -0
- package/src/common/chart/ChartMixin.vue +16 -604
- package/src/common/progress/Progress.vue +6 -7
- package/src/common/table-popup/style/table-popup.scss +1 -1
- package/src/leaflet/package.json +1 -2
- package/src/sfc.d.ts +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @supermapgis/vue-iclient.(https://iclient.supermap.io)
|
|
4
4
|
* Copyright© 2000 - 2024 SuperMap Software Co.Ltd
|
|
5
5
|
* license: Apache-2.0
|
|
6
|
-
* version:
|
|
6
|
+
* version: v12.0.1-r
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -104,6 +104,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
104
104
|
/************************************************************************/
|
|
105
105
|
/******/ ({
|
|
106
106
|
|
|
107
|
+
/***/ "+581":
|
|
108
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
109
|
+
|
|
110
|
+
"use strict";
|
|
111
|
+
__webpack_require__.r(__webpack_exports__);
|
|
112
|
+
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Vpug");
|
|
113
|
+
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
|
|
114
|
+
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
|
115
|
+
/* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
|
|
116
|
+
|
|
117
|
+
/***/ }),
|
|
118
|
+
|
|
107
119
|
/***/ "+6XX":
|
|
108
120
|
/***/ (function(module, exports, __webpack_require__) {
|
|
109
121
|
|
|
@@ -16236,7 +16248,8 @@ var progressTypes = exports.progressTypes = (0, _extends2.default)({}, _progress
|
|
|
16236
16248
|
percent: _vueTypes.default.oneOfType([_vueTypes.default.string, _vueTypes.default.number]),
|
|
16237
16249
|
strokeWidth: _vueTypes.default.oneOfType([_vueTypes.default.number]),
|
|
16238
16250
|
// fix 其父元素宽高都很大的时候,需要传一个合适的size, 这时候不会自适应, 如需自适应则不传size
|
|
16239
|
-
size: _vueTypes.default.oneOfType([_progress.ProgressSize, _vueTypes.default.number])
|
|
16251
|
+
size: _vueTypes.default.oneOfType([_progress.ProgressSize, _vueTypes.default.number]),
|
|
16252
|
+
decimals: _vueTypes.default.number
|
|
16240
16253
|
});
|
|
16241
16254
|
|
|
16242
16255
|
var _default = exports.default = {
|
|
@@ -16267,11 +16280,9 @@ var _default = exports.default = {
|
|
|
16267
16280
|
strokeColor: this.colorData
|
|
16268
16281
|
};
|
|
16269
16282
|
|
|
16270
|
-
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
};
|
|
16274
|
-
}
|
|
16283
|
+
dealWithProps.format = function () {
|
|
16284
|
+
return (0, _util.getDecimalsFormatterVal)((0, _util.strip)(+_this.finalValue), _this.decimals) + '%';
|
|
16285
|
+
};
|
|
16275
16286
|
|
|
16276
16287
|
if (this.type === 'circle') {
|
|
16277
16288
|
dealWithProps.width = this.calWidth;
|
|
@@ -46303,6 +46314,7 @@ var setTheme = exports.setTheme = function setTheme(themeStyle, triggerInfo) {
|
|
|
46303
46314
|
}
|
|
46304
46315
|
}
|
|
46305
46316
|
|
|
46317
|
+
acceptedThemeStyle = (0, _util.objectWithoutProperties)(acceptedThemeStyle, (triggerInfo || {}).ignoreElements || []);
|
|
46306
46318
|
var nextThemeData = (0, _serialColors.dealWithTheme)(acceptedThemeStyle);
|
|
46307
46319
|
var nextTheme = Object.assign({}, nextThemeData.themeStyle);
|
|
46308
46320
|
|
|
@@ -46313,7 +46325,7 @@ var setTheme = exports.setTheme = function setTheme(themeStyle, triggerInfo) {
|
|
|
46313
46325
|
_globalEvent.default.$options.theme = nextTheme;
|
|
46314
46326
|
|
|
46315
46327
|
if (!triggerInfo || triggerInfo.triggerEvent === true) {
|
|
46316
|
-
_globalEvent.default.$emit('change-theme',
|
|
46328
|
+
_globalEvent.default.$emit('change-theme', nextTheme);
|
|
46317
46329
|
}
|
|
46318
46330
|
|
|
46319
46331
|
if (!_vue.default.iclient) {
|
|
@@ -46507,6 +46519,25 @@ var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_
|
|
|
46507
46519
|
component.options.__file = "Card.vue"
|
|
46508
46520
|
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
|
|
46509
46521
|
|
|
46522
|
+
/***/ }),
|
|
46523
|
+
|
|
46524
|
+
/***/ "GDn5":
|
|
46525
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
46526
|
+
|
|
46527
|
+
"use strict";
|
|
46528
|
+
|
|
46529
|
+
// EXPORTS
|
|
46530
|
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ render; });
|
|
46531
|
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ staticRenderFns; });
|
|
46532
|
+
|
|
46533
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/chart/ChartMixin.vue?vue&type=template&id=319961f0&
|
|
46534
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('sm-collapse-card',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"}],staticClass:"sm-component-chart",attrs:{"icon-class":_vm.iconClass,"icon-position":_vm.position,"header-name":_vm.headerName,"auto-rotate":_vm.autoRotate,"collapsed":_vm.collapsed,"split-line":_vm.splitLine}},[_c('v-chart',{ref:_vm.chartId,style:(_vm._chartStyle),attrs:{"id":_vm.chartId,"options":_vm._chartOptions,"initOptions":_vm.initOptions,"group":_vm.group,"manual-update":_vm.manualUpdate,"theme":_vm.theme || _vm.chartTheme},on:{"datazoom":_vm.dataZoomHandler}}),_vm._v(" "),_c('TablePopup',_vm._b({directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"chartTablePopup",attrs:{"split-line":_vm.splitLine,"text-color":_vm.textColor,"background":_vm.background}},'TablePopup',_vm.tablePopupProps,false))],1)}
|
|
46535
|
+
var staticRenderFns = []
|
|
46536
|
+
|
|
46537
|
+
|
|
46538
|
+
// CONCATENATED MODULE: ./src/common/chart/ChartMixin.vue?vue&type=template&id=319961f0&
|
|
46539
|
+
|
|
46540
|
+
|
|
46510
46541
|
/***/ }),
|
|
46511
46542
|
|
|
46512
46543
|
/***/ "GKdC":
|
|
@@ -58218,7 +58249,8 @@ var _default = exports.default = {
|
|
|
58218
58249
|
drillLayersNotSupport: '暂不支持加载下钻图层!',
|
|
58219
58250
|
mvtNotSupport: '暂不支持加载矢量瓦片图层!',
|
|
58220
58251
|
mapCreatedFailed: '地图加载失败!',
|
|
58221
|
-
projectionnotmatch: '{title}与当前地图投影不匹配!'
|
|
58252
|
+
projectionnotmatch: '{title}与当前地图投影不匹配!',
|
|
58253
|
+
xyztilelayernotsupport: '{title}瓦片图层与当前地图的分辨率或原点不匹配!'
|
|
58222
58254
|
},
|
|
58223
58255
|
videoPlus: {
|
|
58224
58256
|
loadingTip: '视频加载中...'
|
|
@@ -58422,6 +58454,9 @@ var _default = exports.default = {
|
|
|
58422
58454
|
realTime: '实时',
|
|
58423
58455
|
errorCoordinate: '坐标格式不正确'
|
|
58424
58456
|
},
|
|
58457
|
+
baseLayerSwitcher: {
|
|
58458
|
+
title: '底图切换'
|
|
58459
|
+
},
|
|
58425
58460
|
// layer
|
|
58426
58461
|
dataFlow: {
|
|
58427
58462
|
dataSubscriptionFailed: '数据订阅失败!'
|
|
@@ -65013,7 +65048,7 @@ module.exports = function (it) {
|
|
|
65013
65048
|
|
|
65014
65049
|
"use strict";
|
|
65015
65050
|
__webpack_require__.r(__webpack_exports__);
|
|
65016
|
-
/* harmony import */ var
|
|
65051
|
+
/* harmony import */ var _ChartMixin_vue_vue_type_template_id_319961f0___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GDn5");
|
|
65017
65052
|
/* harmony import */ var _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6sEm");
|
|
65018
65053
|
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
|
65019
65054
|
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("KHd+");
|
|
@@ -65026,8 +65061,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
65026
65061
|
|
|
65027
65062
|
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
|
|
65028
65063
|
_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
65029
|
-
|
|
65030
|
-
|
|
65064
|
+
_ChartMixin_vue_vue_type_template_id_319961f0___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
|
|
65065
|
+
_ChartMixin_vue_vue_type_template_id_319961f0___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
|
|
65031
65066
|
false,
|
|
65032
65067
|
null,
|
|
65033
65068
|
null,
|
|
@@ -87326,6 +87361,780 @@ var _default = exports.default = {
|
|
|
87326
87361
|
|
|
87327
87362
|
/***/ }),
|
|
87328
87363
|
|
|
87364
|
+
/***/ "Vpug":
|
|
87365
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
87366
|
+
|
|
87367
|
+
"use strict";
|
|
87368
|
+
|
|
87369
|
+
|
|
87370
|
+
var _interopRequireDefault = __webpack_require__("TqRt");
|
|
87371
|
+
|
|
87372
|
+
Object.defineProperty(exports, "__esModule", {
|
|
87373
|
+
value: true
|
|
87374
|
+
});
|
|
87375
|
+
exports.default = void 0;
|
|
87376
|
+
|
|
87377
|
+
var _chart = __webpack_require__("gzXh");
|
|
87378
|
+
|
|
87379
|
+
var _lodash = _interopRequireDefault(__webpack_require__("zT9C"));
|
|
87380
|
+
|
|
87381
|
+
var _lodash2 = _interopRequireDefault(__webpack_require__("2oH+"));
|
|
87382
|
+
|
|
87383
|
+
var _util = __webpack_require__("e7LN");
|
|
87384
|
+
|
|
87385
|
+
function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
87386
|
+
|
|
87387
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
87388
|
+
|
|
87389
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
87390
|
+
|
|
87391
|
+
var _default = exports.default = {
|
|
87392
|
+
methods: {
|
|
87393
|
+
_optionsHandler: function _optionsHandler(options, dataOptions, dataZoomChanged) {
|
|
87394
|
+
dataOptions = dataOptions && (0, _lodash.default)(dataOptions); // clone 避免引起重复刷新
|
|
87395
|
+
|
|
87396
|
+
options = options && (0, _lodash.default)(options); // clone 避免引起重复刷新
|
|
87397
|
+
|
|
87398
|
+
var extraSeries = [];
|
|
87399
|
+
|
|
87400
|
+
if (options && options.legend && !options.legend.type) {
|
|
87401
|
+
options.legend.type = 'scroll';
|
|
87402
|
+
}
|
|
87403
|
+
|
|
87404
|
+
var yAxis = options.yAxis;
|
|
87405
|
+
var xAxis = options.xAxis;
|
|
87406
|
+
|
|
87407
|
+
if (xAxis && dataOptions.xAxis) {
|
|
87408
|
+
this.handleAxis(options, dataOptions, xAxis, yAxis);
|
|
87409
|
+
}
|
|
87410
|
+
|
|
87411
|
+
if (options && options.series && dataOptions.series) {
|
|
87412
|
+
this.handleSeries(dataOptions, options, dataZoomChanged, extraSeries);
|
|
87413
|
+
}
|
|
87414
|
+
|
|
87415
|
+
if (options && options.radar && dataOptions.radar) {
|
|
87416
|
+
options.radar.indicator = Object.assign({}, dataOptions.radar.indicator || {});
|
|
87417
|
+
|
|
87418
|
+
this._handleRadarAxisLabelFormatter(options);
|
|
87419
|
+
}
|
|
87420
|
+
|
|
87421
|
+
var series = dataOptions.series;
|
|
87422
|
+
var isRingShine = options.series && options.series[0] && options.series[0].outerGap >= 0;
|
|
87423
|
+
|
|
87424
|
+
if (series && series.length && series[0].type === 'pie') {
|
|
87425
|
+
this.setItemStyleColor(false, series);
|
|
87426
|
+
}
|
|
87427
|
+
|
|
87428
|
+
if (isRingShine) {
|
|
87429
|
+
dataOptions.series = this._createRingShineSeries(series, options.series);
|
|
87430
|
+
}
|
|
87431
|
+
|
|
87432
|
+
if (this.highlightOptions && this.highlightOptions.length > 0) {
|
|
87433
|
+
if (isRingShine) {
|
|
87434
|
+
dataOptions.series = this._createRingShineHighlight(series, this.highlightOptions);
|
|
87435
|
+
} else {
|
|
87436
|
+
this.setItemStyleColor(true, series);
|
|
87437
|
+
}
|
|
87438
|
+
}
|
|
87439
|
+
|
|
87440
|
+
var mergeOptions = (0, _lodash2.default)(options, dataOptions);
|
|
87441
|
+
|
|
87442
|
+
if (extraSeries.length > 0) {
|
|
87443
|
+
var _mergeOptions$series;
|
|
87444
|
+
|
|
87445
|
+
(_mergeOptions$series = mergeOptions.series).push.apply(_mergeOptions$series, extraSeries);
|
|
87446
|
+
}
|
|
87447
|
+
|
|
87448
|
+
return mergeOptions;
|
|
87449
|
+
},
|
|
87450
|
+
handleAxis: function handleAxis(options, dataOptions, xAxis, yAxis) {
|
|
87451
|
+
var axis = xAxis;
|
|
87452
|
+
var axisData = dataOptions.xAxis[0];
|
|
87453
|
+
var type = 'xAxis';
|
|
87454
|
+
|
|
87455
|
+
if (yAxis && yAxis.type === 'category') {
|
|
87456
|
+
// 处理条形图
|
|
87457
|
+
type = 'yAxis';
|
|
87458
|
+
axis = yAxis;
|
|
87459
|
+
dataOptions.yAxis = dataOptions.xAxis;
|
|
87460
|
+
delete dataOptions.xAxis;
|
|
87461
|
+
|
|
87462
|
+
this._initAxisLabel(yAxis.axisLabel, yAxis.decimals, dataOptions.yAxis[0].data, options.visualMap, dataOptions.series);
|
|
87463
|
+
|
|
87464
|
+
delete options.yAxis.decimals;
|
|
87465
|
+
}
|
|
87466
|
+
|
|
87467
|
+
if (dataOptions.series.length === 0) {
|
|
87468
|
+
axis = [{}];
|
|
87469
|
+
} else if (!Array.isArray(axis)) {
|
|
87470
|
+
if (axisData.data && axisData.data.length) {
|
|
87471
|
+
axis.data = [];
|
|
87472
|
+
}
|
|
87473
|
+
|
|
87474
|
+
axis = [Object.assign({}, axisData, axis)];
|
|
87475
|
+
}
|
|
87476
|
+
|
|
87477
|
+
options[type] = axis;
|
|
87478
|
+
},
|
|
87479
|
+
handleSeries: function handleSeries(dataOptions, options, dataZoomChanged, extraSeries) {
|
|
87480
|
+
if (dataOptions.series.length === 0) {
|
|
87481
|
+
options.series = [];
|
|
87482
|
+
} else {
|
|
87483
|
+
options.series = options.series.map(function (element, index) {
|
|
87484
|
+
return Object.assign({}, element, dataOptions.series[index] || {});
|
|
87485
|
+
});
|
|
87486
|
+
var parallelShowNumber = this.getParallelShowNumber(options.series);
|
|
87487
|
+
|
|
87488
|
+
if (options.series[0].shape === 'cylinder') {
|
|
87489
|
+
this.setCylinderXAxis(parallelShowNumber, options);
|
|
87490
|
+
}
|
|
87491
|
+
|
|
87492
|
+
this.configureSeries(options, dataOptions, parallelShowNumber, dataZoomChanged, extraSeries); // 玫瑰图多个选中
|
|
87493
|
+
|
|
87494
|
+
if (options.series[0].type === 'pie' && options.series[0].roseType) {
|
|
87495
|
+
options.series = options.series.map(function (serie) {
|
|
87496
|
+
if (!serie.roseType) {
|
|
87497
|
+
serie.roseType = options.series[0].roseType;
|
|
87498
|
+
}
|
|
87499
|
+
|
|
87500
|
+
return serie;
|
|
87501
|
+
});
|
|
87502
|
+
} // pie的图例需要一个扇形是一个图例
|
|
87503
|
+
|
|
87504
|
+
|
|
87505
|
+
if (options.legend && options.series.length > 0 && options.series[0].type === 'pie') {
|
|
87506
|
+
options.legend.data = [];
|
|
87507
|
+
options.series.forEach(function (element) {
|
|
87508
|
+
if (element.data) {
|
|
87509
|
+
var _options$legend$data;
|
|
87510
|
+
|
|
87511
|
+
(_options$legend$data = options.legend.data).push.apply(_options$legend$data, element.data.map(function (item) {
|
|
87512
|
+
return item.name;
|
|
87513
|
+
}));
|
|
87514
|
+
}
|
|
87515
|
+
});
|
|
87516
|
+
}
|
|
87517
|
+
}
|
|
87518
|
+
},
|
|
87519
|
+
configureSeries: function configureSeries(options, dataOptions, parallelShowNumber, dataZoomChanged, extraSeries) {
|
|
87520
|
+
var _this2 = this;
|
|
87521
|
+
|
|
87522
|
+
var dataZoom = options.dataZoom && options.dataZoom[0];
|
|
87523
|
+
var leftRightCount = parallelShowNumber / 2;
|
|
87524
|
+
var baseSpace = 32;
|
|
87525
|
+
var seriesSpace = 0;
|
|
87526
|
+
var seriesSpaceCount = -Math.floor(leftRightCount);
|
|
87527
|
+
var seriesNameTag;
|
|
87528
|
+
var colorIndex = 0;
|
|
87529
|
+
options.series = options.series.map(function (serie, index) {
|
|
87530
|
+
if (parallelShowNumber !== 0) {
|
|
87531
|
+
var serieName = serie.name.substring(serie.name.indexOf('-') + 1);
|
|
87532
|
+
|
|
87533
|
+
if (!seriesNameTag) {
|
|
87534
|
+
seriesNameTag = serieName;
|
|
87535
|
+
seriesSpace = _this2.getSericeSpace(parallelShowNumber, baseSpace, seriesSpaceCount);
|
|
87536
|
+
} else {
|
|
87537
|
+
if (seriesNameTag === serieName) {
|
|
87538
|
+
seriesSpace = _this2.getSericeSpace(parallelShowNumber, baseSpace, seriesSpaceCount);
|
|
87539
|
+
} else {
|
|
87540
|
+
seriesSpaceCount = -Math.floor(leftRightCount);
|
|
87541
|
+
seriesNameTag = serieName;
|
|
87542
|
+
seriesSpace = _this2.getSericeSpace(parallelShowNumber, baseSpace, seriesSpaceCount);
|
|
87543
|
+
colorIndex += 1;
|
|
87544
|
+
}
|
|
87545
|
+
}
|
|
87546
|
+
|
|
87547
|
+
seriesSpaceCount += 1;
|
|
87548
|
+
}
|
|
87549
|
+
|
|
87550
|
+
var label = serie.label && serie.label.normal;
|
|
87551
|
+
|
|
87552
|
+
if (label && !label.smart) {
|
|
87553
|
+
serie.label.normal = _this2._controlLabel(label, serie.maxLabels);
|
|
87554
|
+
}
|
|
87555
|
+
|
|
87556
|
+
if (label && label.show && label.smart) {
|
|
87557
|
+
_this2.handleLabel(label, serie, options, dataZoom, dataZoomChanged);
|
|
87558
|
+
} else if (serie && serie.type !== 'pie' && serie.type !== 'radar') {
|
|
87559
|
+
var colorGroup = (0, _chart.getMultiColorGroup)(_this2.colorGroupsData, _this2.colorNumber);
|
|
87560
|
+
|
|
87561
|
+
if (serie.type === '2.5Bar') {
|
|
87562
|
+
var shape = serie.shape;
|
|
87563
|
+
var defaultColor = serie.itemStyle && serie.itemStyle.color;
|
|
87564
|
+
|
|
87565
|
+
if (['square', 'rectangle'].includes(shape)) {
|
|
87566
|
+
var cubeType = shape;
|
|
87567
|
+
serie.type = 'custom';
|
|
87568
|
+
dataOptions.series[index] && (dataOptions.series[index].type = 'custom');
|
|
87569
|
+
var _this = _this2;
|
|
87570
|
+
serie.renderItem = _this2._squareRectangleRenderItem(seriesSpace, defaultColor, colorGroup, _this, cubeType, colorIndex);
|
|
87571
|
+
} else if (shape === 'cylinder') {
|
|
87572
|
+
_this2.handleCylinder(parallelShowNumber, dataOptions, index, serie, options, defaultColor, colorGroup, extraSeries);
|
|
87573
|
+
}
|
|
87574
|
+
|
|
87575
|
+
delete serie.shape;
|
|
87576
|
+
}
|
|
87577
|
+
}
|
|
87578
|
+
|
|
87579
|
+
return serie;
|
|
87580
|
+
});
|
|
87581
|
+
},
|
|
87582
|
+
handleLabel: function handleLabel(label, serie, options, dataZoom, dataZoomChanged) {
|
|
87583
|
+
label.position = label.position || 'top';
|
|
87584
|
+
var data = serie.data || [];
|
|
87585
|
+
var startDataIndex = 0;
|
|
87586
|
+
var endDataIndex = data.length > 0 ? data.length - 1 : 0;
|
|
87587
|
+
|
|
87588
|
+
if (dataZoom && dataZoom.show !== false) {
|
|
87589
|
+
if (dataZoom.start > dataZoom.end) {
|
|
87590
|
+
var oldStart = dataZoom.start;
|
|
87591
|
+
dataZoom.start = dataZoom.end;
|
|
87592
|
+
dataZoom.end = oldStart;
|
|
87593
|
+
}
|
|
87594
|
+
|
|
87595
|
+
if (dataZoomChanged) {
|
|
87596
|
+
var _ref = this.smChart.chart.getOption().dataZoom[0] || {},
|
|
87597
|
+
startValue = _ref.startValue,
|
|
87598
|
+
endValue = _ref.endValue;
|
|
87599
|
+
|
|
87600
|
+
startDataIndex = startValue;
|
|
87601
|
+
endDataIndex = endValue;
|
|
87602
|
+
options.dataZoom = options.dataZoom.map(function (val) {
|
|
87603
|
+
if (startValue >= 0 && endValue >= 0) {
|
|
87604
|
+
val.startValue = startValue;
|
|
87605
|
+
val.endValue = endValue;
|
|
87606
|
+
delete val.start;
|
|
87607
|
+
delete val.end;
|
|
87608
|
+
return val;
|
|
87609
|
+
}
|
|
87610
|
+
|
|
87611
|
+
return val;
|
|
87612
|
+
});
|
|
87613
|
+
} else {
|
|
87614
|
+
startDataIndex = Math.floor(dataZoom.start / 100 * data.length);
|
|
87615
|
+
endDataIndex = Math.ceil(dataZoom.end / 100 * data.length);
|
|
87616
|
+
}
|
|
87617
|
+
|
|
87618
|
+
data = serie.data.slice(startDataIndex, endDataIndex + 1);
|
|
87619
|
+
}
|
|
87620
|
+
|
|
87621
|
+
label.formatter = function (_ref2) {
|
|
87622
|
+
var dataIndex = _ref2.dataIndex,
|
|
87623
|
+
value = _ref2.value;
|
|
87624
|
+
var result = '';
|
|
87625
|
+
|
|
87626
|
+
if (dataIndex === startDataIndex || dataIndex === endDataIndex || Math.max.apply(null, data) + '' === value + '') {
|
|
87627
|
+
result = (0, _util.getDecimalsFormatterVal)(value, label.decimals);
|
|
87628
|
+
}
|
|
87629
|
+
|
|
87630
|
+
return result;
|
|
87631
|
+
};
|
|
87632
|
+
},
|
|
87633
|
+
handleCylinder: function handleCylinder(parallelShowNumber, dataOptions, index, serie, options, defaultColor, colorGroup, extraSeries) {
|
|
87634
|
+
var _this3 = this;
|
|
87635
|
+
|
|
87636
|
+
serie.type = 'bar';
|
|
87637
|
+
serie.barGap = parallelShowNumber === 0 ? '-100%' : '0';
|
|
87638
|
+
|
|
87639
|
+
if (parallelShowNumber !== 0) {
|
|
87640
|
+
var serieColor = defaultColor || colorGroup[Math.ceil((index + 1) / parallelShowNumber) - 1];
|
|
87641
|
+
|
|
87642
|
+
if (serie.itemStyle) {
|
|
87643
|
+
serie.itemStyle.color = this.setGradientColor(serieColor, '#fff');
|
|
87644
|
+
} else {
|
|
87645
|
+
serie.itemStyle = {};
|
|
87646
|
+
serie.itemStyle.color = this.setGradientColor(serieColor, '#fff');
|
|
87647
|
+
}
|
|
87648
|
+
}
|
|
87649
|
+
|
|
87650
|
+
options.tooltip && options.tooltip.trigger === 'axis' && (options.tooltip.trigger = 'item');
|
|
87651
|
+
dataOptions.series[index] && (dataOptions.series[index].type = 'bar');
|
|
87652
|
+
var colorIndex = parallelShowNumber !== 0 ? Math.ceil((index + 1) / parallelShowNumber) - 1 : index;
|
|
87653
|
+
var cirCleColor = defaultColor || colorGroup[colorIndex];
|
|
87654
|
+
var cirCleColorFnList = [];
|
|
87655
|
+
|
|
87656
|
+
if (typeof cirCleColor === 'string') {
|
|
87657
|
+
cirCleColor = this.setGradientColor(cirCleColor, '#fff');
|
|
87658
|
+
}
|
|
87659
|
+
|
|
87660
|
+
if (this.highlightOptions && this.highlightOptions.length > 0) {
|
|
87661
|
+
var matchDataList = [];
|
|
87662
|
+
this.highlightOptions.forEach(function (item) {
|
|
87663
|
+
if (item.seriesIndex.includes(index)) {
|
|
87664
|
+
var color = item.color || _this3.highlightColor;
|
|
87665
|
+
|
|
87666
|
+
if (typeof color === 'string') {
|
|
87667
|
+
color = _this3.setGradientColor(color, '#fff');
|
|
87668
|
+
}
|
|
87669
|
+
|
|
87670
|
+
matchDataList.push({
|
|
87671
|
+
dataIndex: item.dataIndex,
|
|
87672
|
+
color: color
|
|
87673
|
+
});
|
|
87674
|
+
}
|
|
87675
|
+
});
|
|
87676
|
+
|
|
87677
|
+
if (matchDataList.length > 0) {
|
|
87678
|
+
cirCleColorFnList = ['topCirCleColorFn', 'bottomCirCleColorFn'].map(function () {
|
|
87679
|
+
return function (_ref3) {
|
|
87680
|
+
var dataIndex = _ref3.dataIndex;
|
|
87681
|
+
var matchData = matchDataList.find(function (item) {
|
|
87682
|
+
return item.dataIndex === dataIndex;
|
|
87683
|
+
});
|
|
87684
|
+
return matchData ? matchData.color : cirCleColor;
|
|
87685
|
+
};
|
|
87686
|
+
});
|
|
87687
|
+
}
|
|
87688
|
+
}
|
|
87689
|
+
|
|
87690
|
+
this.handleExtraSeries(parallelShowNumber, dataOptions, index, serie, extraSeries, cirCleColor, cirCleColorFnList);
|
|
87691
|
+
},
|
|
87692
|
+
handleExtraSeries: function handleExtraSeries(parallelShowNumber, dataOptions, index, serie, extraSeries, cirCleColor, cirCleColorFnList) {
|
|
87693
|
+
var baseColumnWidth = parallelShowNumber !== 0 ? 100 / parallelShowNumber + "%" : '100%';
|
|
87694
|
+
var nextSerieDatas = dataOptions.series[index + 1] && dataOptions.series[index + 1].data;
|
|
87695
|
+
var offsetDistance = this.getOffsetDistance(parallelShowNumber, index);
|
|
87696
|
+
var xAxisIndex = parallelShowNumber !== 0 ? Math.ceil((index + 1) / parallelShowNumber) - 1 : 0;
|
|
87697
|
+
serie.xAxisIndex = xAxisIndex;
|
|
87698
|
+
extraSeries.push( // 头部的圆片
|
|
87699
|
+
{
|
|
87700
|
+
name: parallelShowNumber !== 0 ? serie.name : '',
|
|
87701
|
+
type: 'pictorialBar',
|
|
87702
|
+
symbolOffset: parallelShowNumber !== 0 ? [offsetDistance, '-50%'] : [0, -8],
|
|
87703
|
+
xAxisIndex: parallelShowNumber !== 0 ? xAxisIndex : 0,
|
|
87704
|
+
symbolPosition: 'end',
|
|
87705
|
+
z: 12,
|
|
87706
|
+
itemStyle: {
|
|
87707
|
+
normal: {
|
|
87708
|
+
color: cirCleColorFnList[0] || cirCleColor
|
|
87709
|
+
}
|
|
87710
|
+
},
|
|
87711
|
+
data: dataOptions.series[index].data.map(function (item, dataIndex) {
|
|
87712
|
+
if (parallelShowNumber !== 0) {
|
|
87713
|
+
return {
|
|
87714
|
+
value: item,
|
|
87715
|
+
symbolSize: [baseColumnWidth, 15]
|
|
87716
|
+
};
|
|
87717
|
+
} else {
|
|
87718
|
+
return {
|
|
87719
|
+
value: item,
|
|
87720
|
+
symbolSize: !nextSerieDatas || nextSerieDatas[dataIndex] && +item >= +nextSerieDatas[dataIndex] ? [baseColumnWidth, 15] : [0, 15]
|
|
87721
|
+
};
|
|
87722
|
+
}
|
|
87723
|
+
})
|
|
87724
|
+
}, {
|
|
87725
|
+
// 底部的圆片
|
|
87726
|
+
name: parallelShowNumber !== 0 ? serie.name : '',
|
|
87727
|
+
type: 'pictorialBar',
|
|
87728
|
+
xAxisIndex: parallelShowNumber !== 0 ? xAxisIndex : 0,
|
|
87729
|
+
symbolSize: parallelShowNumber !== 0 ? [baseColumnWidth, 10] : [offsetDistance, 10],
|
|
87730
|
+
symbolOffset: parallelShowNumber !== 0 ? [offsetDistance, '50%'] : [0, 5],
|
|
87731
|
+
z: 12,
|
|
87732
|
+
itemStyle: {
|
|
87733
|
+
normal: {
|
|
87734
|
+
color: cirCleColorFnList[1] || cirCleColor
|
|
87735
|
+
}
|
|
87736
|
+
},
|
|
87737
|
+
data: dataOptions.series[index].data
|
|
87738
|
+
});
|
|
87739
|
+
},
|
|
87740
|
+
_handleRadarAxisLabelFormatter: function _handleRadarAxisLabelFormatter(options) {
|
|
87741
|
+
if (typeof options.radar.decimals === 'number') {
|
|
87742
|
+
for (var key in options.radar.indicator) {
|
|
87743
|
+
var item = options.radar.indicator[key];
|
|
87744
|
+
item.text = (0, _util.getDecimalsFormatterVal)(item.text, options.radar.decimals);
|
|
87745
|
+
}
|
|
87746
|
+
|
|
87747
|
+
delete options.radar.decimals;
|
|
87748
|
+
}
|
|
87749
|
+
|
|
87750
|
+
return options;
|
|
87751
|
+
},
|
|
87752
|
+
multipleYField: function multipleYField(optionSeries) {
|
|
87753
|
+
var series = (0, _lodash.default)(optionSeries);
|
|
87754
|
+
var nameList = series.map(function (serie) {
|
|
87755
|
+
if (!serie.name.includes('-')) {
|
|
87756
|
+
return serie.name;
|
|
87757
|
+
}
|
|
87758
|
+
|
|
87759
|
+
var position = serie.name.indexOf('-');
|
|
87760
|
+
var prefix = serie.name.substring(0, position);
|
|
87761
|
+
|
|
87762
|
+
if (isNaN(+prefix)) {
|
|
87763
|
+
return serie.name;
|
|
87764
|
+
}
|
|
87765
|
+
|
|
87766
|
+
return serie.name.substring(position + 1);
|
|
87767
|
+
});
|
|
87768
|
+
return series.length !== new Set(nameList).size;
|
|
87769
|
+
},
|
|
87770
|
+
getParallelShowNumber: function getParallelShowNumber(series) {
|
|
87771
|
+
if (series.length === 0 || !this.multipleYField(series)) {
|
|
87772
|
+
// 0表示不进行并列显示
|
|
87773
|
+
return 0;
|
|
87774
|
+
}
|
|
87775
|
+
|
|
87776
|
+
var parallelShowNumber = 0;
|
|
87777
|
+
var symbolPosition = series[0].name.indexOf('-');
|
|
87778
|
+
var firstSeriesName = series[0].name.substring(symbolPosition + 1);
|
|
87779
|
+
series.forEach(function (option) {
|
|
87780
|
+
var optionName = option.name.substring(symbolPosition + 1);
|
|
87781
|
+
|
|
87782
|
+
if (firstSeriesName === optionName) {
|
|
87783
|
+
parallelShowNumber++;
|
|
87784
|
+
}
|
|
87785
|
+
});
|
|
87786
|
+
return parallelShowNumber;
|
|
87787
|
+
},
|
|
87788
|
+
_initAxisLabel: function _initAxisLabel(axisLabel, decimals, data, visualMap, series) {
|
|
87789
|
+
if (!this.xBar) {
|
|
87790
|
+
return;
|
|
87791
|
+
}
|
|
87792
|
+
|
|
87793
|
+
var sortSeriesIndex = this.datasetOptions.findIndex(function (item) {
|
|
87794
|
+
return item.sort !== 'unsort' && item.rankLabel;
|
|
87795
|
+
});
|
|
87796
|
+
|
|
87797
|
+
if (sortSeriesIndex > -1 && axisLabel && data) {
|
|
87798
|
+
var orderNumLength = data.length.toString().length;
|
|
87799
|
+
|
|
87800
|
+
for (var index = 0, len = data.length, rankIndex = len - 1; index < len; index++, rankIndex--) {
|
|
87801
|
+
var paddedNumber = rankIndex.toString().padStart(orderNumLength, '0');
|
|
87802
|
+
data[index] = "" + paddedNumber + data[index];
|
|
87803
|
+
}
|
|
87804
|
+
|
|
87805
|
+
var firstVisualMap = visualMap && visualMap.find(function (item) {
|
|
87806
|
+
return item.seriesIndex === sortSeriesIndex;
|
|
87807
|
+
});
|
|
87808
|
+
axisLabel.rich = axisLabel.rich || {};
|
|
87809
|
+
axisLabel.rich.default = {
|
|
87810
|
+
backgroundColor: this.getStringColor(this.colorGroup[sortSeriesIndex]),
|
|
87811
|
+
width: 20,
|
|
87812
|
+
height: 20,
|
|
87813
|
+
align: 'center',
|
|
87814
|
+
borderRadius: 2
|
|
87815
|
+
};
|
|
87816
|
+
firstVisualMap && firstVisualMap.pieces.forEach(function (item, index) {
|
|
87817
|
+
axisLabel.rich["color_" + index] = {
|
|
87818
|
+
backgroundColor: item.color,
|
|
87819
|
+
width: 20,
|
|
87820
|
+
height: 20,
|
|
87821
|
+
align: 'center',
|
|
87822
|
+
borderRadius: 2
|
|
87823
|
+
};
|
|
87824
|
+
});
|
|
87825
|
+
var serieData = series && series[sortSeriesIndex].data;
|
|
87826
|
+
|
|
87827
|
+
axisLabel.formatter = function (label, index) {
|
|
87828
|
+
var orderNum = parseInt(label.slice(0, orderNumLength)) + 1;
|
|
87829
|
+
var leftLabel = (0, _util.getDecimalsFormatterVal)(label.slice(orderNumLength), decimals);
|
|
87830
|
+
var labelValue = serieData && +serieData[index];
|
|
87831
|
+
|
|
87832
|
+
if (firstVisualMap) {
|
|
87833
|
+
var matchItemIndex = firstVisualMap.pieces.findIndex(function (item) {
|
|
87834
|
+
var condition = true;
|
|
87835
|
+
|
|
87836
|
+
if (item.min) {
|
|
87837
|
+
condition = condition && labelValue >= item.min;
|
|
87838
|
+
}
|
|
87839
|
+
|
|
87840
|
+
if (item.max) {
|
|
87841
|
+
condition = condition && labelValue <= item.max;
|
|
87842
|
+
}
|
|
87843
|
+
|
|
87844
|
+
if (item.lte) {
|
|
87845
|
+
condition = condition && labelValue <= item.lte;
|
|
87846
|
+
}
|
|
87847
|
+
|
|
87848
|
+
if (item.gte) {
|
|
87849
|
+
condition = condition && labelValue >= item.gte;
|
|
87850
|
+
}
|
|
87851
|
+
|
|
87852
|
+
if (item.lt) {
|
|
87853
|
+
condition = condition && labelValue < item.lt;
|
|
87854
|
+
}
|
|
87855
|
+
|
|
87856
|
+
if (item.gt) {
|
|
87857
|
+
condition = condition && labelValue > item.gt;
|
|
87858
|
+
}
|
|
87859
|
+
|
|
87860
|
+
if (item.value) {
|
|
87861
|
+
condition = condition && labelValue === item.value;
|
|
87862
|
+
}
|
|
87863
|
+
|
|
87864
|
+
return condition;
|
|
87865
|
+
});
|
|
87866
|
+
|
|
87867
|
+
if (matchItemIndex > -1) {
|
|
87868
|
+
return ["{color_" + matchItemIndex + "|" + orderNum + "} " + leftLabel].join('\n');
|
|
87869
|
+
}
|
|
87870
|
+
}
|
|
87871
|
+
|
|
87872
|
+
return ["{default|" + orderNum + "} " + leftLabel].join('\n');
|
|
87873
|
+
};
|
|
87874
|
+
}
|
|
87875
|
+
},
|
|
87876
|
+
_createRingShineSeries: function _createRingShineSeries(series, optionsSeries) {
|
|
87877
|
+
var _this4 = this;
|
|
87878
|
+
|
|
87879
|
+
if (optionsSeries) {
|
|
87880
|
+
this.datasetOptions.forEach(function (datasetOption, index) {
|
|
87881
|
+
var _ref4 = optionsSeries[index] || {},
|
|
87882
|
+
type = _ref4.type,
|
|
87883
|
+
outerGap = _ref4.outerGap,
|
|
87884
|
+
isShine = _ref4.isShine;
|
|
87885
|
+
|
|
87886
|
+
if (type === 'pie' && outerGap >= 0) {
|
|
87887
|
+
var data = series[index].data.map(function (val) {
|
|
87888
|
+
return val.value;
|
|
87889
|
+
});
|
|
87890
|
+
outerGap = outerGap || Math.min.apply(null, data) / 5;
|
|
87891
|
+
series[index].data = _this4._createRingShineDataOption(series[index].data, outerGap, isShine);
|
|
87892
|
+
delete optionsSeries[index].outerGap;
|
|
87893
|
+
delete optionsSeries[index].isShine;
|
|
87894
|
+
}
|
|
87895
|
+
});
|
|
87896
|
+
}
|
|
87897
|
+
|
|
87898
|
+
return series;
|
|
87899
|
+
},
|
|
87900
|
+
_createRingShineDataOption: function _createRingShineDataOption(data, outerGap, isShine) {
|
|
87901
|
+
if (!data) {
|
|
87902
|
+
return;
|
|
87903
|
+
}
|
|
87904
|
+
|
|
87905
|
+
var colors = this._handlerColorGroup(data.length);
|
|
87906
|
+
|
|
87907
|
+
var gapItem = {
|
|
87908
|
+
value: outerGap,
|
|
87909
|
+
name: '',
|
|
87910
|
+
itemStyle: {
|
|
87911
|
+
normal: {
|
|
87912
|
+
label: {
|
|
87913
|
+
show: false
|
|
87914
|
+
},
|
|
87915
|
+
labelLine: {
|
|
87916
|
+
show: false
|
|
87917
|
+
},
|
|
87918
|
+
color: 'rgba(0, 0, 0, 0)',
|
|
87919
|
+
borderColor: 'rgba(0, 0, 0, 0)',
|
|
87920
|
+
borderWidth: 0
|
|
87921
|
+
}
|
|
87922
|
+
}
|
|
87923
|
+
};
|
|
87924
|
+
var result = [];
|
|
87925
|
+
|
|
87926
|
+
for (var i = 0; i < data.length; i++) {
|
|
87927
|
+
var dataItem = {
|
|
87928
|
+
value: data[i].value,
|
|
87929
|
+
name: data[i].name
|
|
87930
|
+
};
|
|
87931
|
+
|
|
87932
|
+
if (isShine) {
|
|
87933
|
+
dataItem.itemStyle = {
|
|
87934
|
+
borderWidth: 5,
|
|
87935
|
+
shadowBlur: 10,
|
|
87936
|
+
color: colors[i],
|
|
87937
|
+
borderColor: colors[i],
|
|
87938
|
+
shadowColor: colors[i]
|
|
87939
|
+
};
|
|
87940
|
+
}
|
|
87941
|
+
|
|
87942
|
+
result.push(dataItem);
|
|
87943
|
+
|
|
87944
|
+
if (data.length > 1) {
|
|
87945
|
+
result.push(gapItem);
|
|
87946
|
+
}
|
|
87947
|
+
}
|
|
87948
|
+
|
|
87949
|
+
return result;
|
|
87950
|
+
},
|
|
87951
|
+
setCylinderXAxis: function setCylinderXAxis(parallelShowNumber, options) {
|
|
87952
|
+
if (parallelShowNumber === 0) {
|
|
87953
|
+
return;
|
|
87954
|
+
}
|
|
87955
|
+
|
|
87956
|
+
var xAixsType = options.xAxis[0] && options.xAxis[0].type;
|
|
87957
|
+
|
|
87958
|
+
for (var i = 1; i <= parallelShowNumber; i++) {
|
|
87959
|
+
options.xAxis.push({
|
|
87960
|
+
type: xAixsType,
|
|
87961
|
+
show: false
|
|
87962
|
+
});
|
|
87963
|
+
}
|
|
87964
|
+
},
|
|
87965
|
+
getOffsetDistance: function getOffsetDistance(parallelShowNumber, index) {
|
|
87966
|
+
if (parallelShowNumber === 0) {
|
|
87967
|
+
return '100%';
|
|
87968
|
+
}
|
|
87969
|
+
|
|
87970
|
+
var distance;
|
|
87971
|
+
|
|
87972
|
+
if (parallelShowNumber % 2) {
|
|
87973
|
+
distance = -100 * Math.floor(parallelShowNumber / 2) + index % parallelShowNumber * 100;
|
|
87974
|
+
return distance + "%";
|
|
87975
|
+
} else {
|
|
87976
|
+
distance = -100 * (Math.floor(parallelShowNumber / 2) - 0.5) + index % parallelShowNumber * 100;
|
|
87977
|
+
}
|
|
87978
|
+
|
|
87979
|
+
return distance + "%";
|
|
87980
|
+
},
|
|
87981
|
+
_squareRectangleRenderItem: function _squareRectangleRenderItem(seriesSpace, defaultColor, colorGroup, _this, cubeType, colorIndex) {
|
|
87982
|
+
return function (params, api) {
|
|
87983
|
+
var location = api.coord([api.value(0), api.value(1)]);
|
|
87984
|
+
var fillColor = defaultColor || colorGroup[colorIndex];
|
|
87985
|
+
|
|
87986
|
+
if (_this.highlightOptions && _this.highlightOptions.length > 0) {
|
|
87987
|
+
var matchData = _this.highlightOptions.find(function (item) {
|
|
87988
|
+
return item.seriesIndex.includes(params.seriesIndex) && item.dataIndex === params.dataIndex;
|
|
87989
|
+
});
|
|
87990
|
+
|
|
87991
|
+
if (matchData && (matchData.color || _this.highlightColor)) {
|
|
87992
|
+
fillColor = matchData.color || _this.highlightColor;
|
|
87993
|
+
}
|
|
87994
|
+
}
|
|
87995
|
+
|
|
87996
|
+
var leftColor, rightColor, topColor;
|
|
87997
|
+
|
|
87998
|
+
if (typeof fillColor === 'object') {
|
|
87999
|
+
var copyLeftColor = (0, _lodash.default)(fillColor);
|
|
88000
|
+
var copyRightColor = (0, _lodash.default)(fillColor);
|
|
88001
|
+
var copyTopColor = (0, _lodash.default)(fillColor);
|
|
88002
|
+
copyLeftColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyLeftColor.colorStops[0].color, 0.4);
|
|
88003
|
+
copyLeftColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyLeftColor.colorStops[1].color, 0.4);
|
|
88004
|
+
copyRightColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyRightColor.colorStops[0].color, 0.7);
|
|
88005
|
+
copyRightColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyRightColor.colorStops[1].color, 0.7);
|
|
88006
|
+
copyTopColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyTopColor.colorStops[0].color, 0.85);
|
|
88007
|
+
copyTopColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyTopColor.colorStops[1].color, 0.85);
|
|
88008
|
+
leftColor = copyLeftColor;
|
|
88009
|
+
rightColor = copyRightColor;
|
|
88010
|
+
topColor = copyTopColor;
|
|
88011
|
+
} else {
|
|
88012
|
+
leftColor = (0, _util.getColorWithOpacity)(fillColor, 0.4);
|
|
88013
|
+
rightColor = (0, _util.getColorWithOpacity)(fillColor, 0.7);
|
|
88014
|
+
topColor = (0, _util.getColorWithOpacity)(fillColor, 0.85);
|
|
88015
|
+
}
|
|
88016
|
+
|
|
88017
|
+
return {
|
|
88018
|
+
type: 'group',
|
|
88019
|
+
children: [{
|
|
88020
|
+
type: "Cube" + cubeType + "Left",
|
|
88021
|
+
shape: {
|
|
88022
|
+
api: api,
|
|
88023
|
+
xValue: api.value(0),
|
|
88024
|
+
yValue: api.value(1),
|
|
88025
|
+
x: location[0] + seriesSpace,
|
|
88026
|
+
y: location[1],
|
|
88027
|
+
bottomYAxis: api.coord([api.value(0), 0])[1]
|
|
88028
|
+
},
|
|
88029
|
+
style: {
|
|
88030
|
+
fill: leftColor
|
|
88031
|
+
}
|
|
88032
|
+
}, {
|
|
88033
|
+
type: "Cube" + cubeType + "Right",
|
|
88034
|
+
shape: {
|
|
88035
|
+
api: api,
|
|
88036
|
+
xValue: api.value(0),
|
|
88037
|
+
yValue: api.value(1),
|
|
88038
|
+
x: location[0] + seriesSpace,
|
|
88039
|
+
y: location[1],
|
|
88040
|
+
bottomYAxis: api.coord([api.value(0), 0])[1]
|
|
88041
|
+
},
|
|
88042
|
+
style: {
|
|
88043
|
+
fill: rightColor
|
|
88044
|
+
}
|
|
88045
|
+
}, {
|
|
88046
|
+
type: "Cube" + cubeType + "Top",
|
|
88047
|
+
shape: {
|
|
88048
|
+
api: api,
|
|
88049
|
+
xValue: api.value(0),
|
|
88050
|
+
yValue: api.value(1),
|
|
88051
|
+
x: location[0] + seriesSpace,
|
|
88052
|
+
y: location[1],
|
|
88053
|
+
bottomYAxis: api.coord([api.value(0), 0])[1]
|
|
88054
|
+
},
|
|
88055
|
+
style: {
|
|
88056
|
+
fill: topColor
|
|
88057
|
+
}
|
|
88058
|
+
}]
|
|
88059
|
+
};
|
|
88060
|
+
};
|
|
88061
|
+
},
|
|
88062
|
+
getSericeSpace: function getSericeSpace(sameYFieldSeriesCount, baseSpace, seriesSpaceCount) {
|
|
88063
|
+
if (sameYFieldSeriesCount % 2 === 0) {
|
|
88064
|
+
return seriesSpaceCount * baseSpace + baseSpace / 2;
|
|
88065
|
+
} else {
|
|
88066
|
+
return seriesSpaceCount * baseSpace;
|
|
88067
|
+
}
|
|
88068
|
+
},
|
|
88069
|
+
getSameYFieldSeriesCount: function getSameYFieldSeriesCount(series) {
|
|
88070
|
+
var firstSeriesName = series[0].name.split('-')[1];
|
|
88071
|
+
var seriesCount = 0;
|
|
88072
|
+
|
|
88073
|
+
for (var _iterator = _createForOfIteratorHelperLoose(series), _step; !(_step = _iterator()).done;) {
|
|
88074
|
+
var serie = _step.value;
|
|
88075
|
+
var serieNname = serie.name.split('-')[1];
|
|
88076
|
+
|
|
88077
|
+
if (firstSeriesName === serieNname) {
|
|
88078
|
+
seriesCount += 1;
|
|
88079
|
+
} else {
|
|
88080
|
+
return seriesCount;
|
|
88081
|
+
}
|
|
88082
|
+
}
|
|
88083
|
+
|
|
88084
|
+
return seriesCount;
|
|
88085
|
+
},
|
|
88086
|
+
_createRingShineHighlight: function _createRingShineHighlight(series, highlightOptions, color) {
|
|
88087
|
+
if (color === void 0) {
|
|
88088
|
+
color = this.highlightColor;
|
|
88089
|
+
}
|
|
88090
|
+
|
|
88091
|
+
series = series || [];
|
|
88092
|
+
series = series.map(function (serie, seriesIndex) {
|
|
88093
|
+
var dataIndexs = highlightOptions.map(function (item) {
|
|
88094
|
+
if (item.seriesIndex && item.seriesIndex.includes(seriesIndex)) {
|
|
88095
|
+
return item.dataIndex;
|
|
88096
|
+
}
|
|
88097
|
+
});
|
|
88098
|
+
var colors = highlightOptions.map(function (item) {
|
|
88099
|
+
if (item.seriesIndex && item.seriesIndex.includes(seriesIndex)) {
|
|
88100
|
+
return item.color || color;
|
|
88101
|
+
}
|
|
88102
|
+
});
|
|
88103
|
+
var serieDatas = serie && serie.data || [];
|
|
88104
|
+
dataIndexs.forEach(function (dataIndex, index) {
|
|
88105
|
+
serieDatas[dataIndex].itemStyle.color = colors[index];
|
|
88106
|
+
serieDatas[dataIndex].itemStyle.borderColor = colors[index];
|
|
88107
|
+
serieDatas[dataIndex].itemStyle.shadowColor = colors[index];
|
|
88108
|
+
});
|
|
88109
|
+
return serie;
|
|
88110
|
+
});
|
|
88111
|
+
return series;
|
|
88112
|
+
},
|
|
88113
|
+
getStringColor: function getStringColor(color) {
|
|
88114
|
+
if (color instanceof Object) {
|
|
88115
|
+
return ((color.colorStops || [])[0] || {}).color;
|
|
88116
|
+
}
|
|
88117
|
+
|
|
88118
|
+
return color;
|
|
88119
|
+
},
|
|
88120
|
+
setGradientColor: function setGradientColor(color, nextColor) {
|
|
88121
|
+
if (typeof color === 'string') {
|
|
88122
|
+
return new this.$options.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
88123
|
+
offset: 0,
|
|
88124
|
+
color: color
|
|
88125
|
+
}, {
|
|
88126
|
+
offset: 1,
|
|
88127
|
+
color: nextColor || color
|
|
88128
|
+
}]);
|
|
88129
|
+
}
|
|
88130
|
+
|
|
88131
|
+
return color;
|
|
88132
|
+
}
|
|
88133
|
+
}
|
|
88134
|
+
};
|
|
88135
|
+
|
|
88136
|
+
/***/ }),
|
|
88137
|
+
|
|
87329
88138
|
/***/ "Vs1/":
|
|
87330
88139
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
87331
88140
|
|
|
@@ -87856,7 +88665,8 @@ var _default = exports.default = {
|
|
|
87856
88665
|
drillLayersNotSupport: 'Drill-down layers are not supported yet!',
|
|
87857
88666
|
mvtNotSupport: 'Vector tile layers is not supported yet!',
|
|
87858
88667
|
mapCreatedFailed: 'Failed to load map!',
|
|
87859
|
-
projectionnotmatch: '{title} does not match the current map projection!'
|
|
88668
|
+
projectionnotmatch: '{title} does not match the current map projection!',
|
|
88669
|
+
xyztilelayernotsupport: '{title} XYZ Tile layer does not match the resolution or origin of the current map!'
|
|
87860
88670
|
},
|
|
87861
88671
|
drillMap: {
|
|
87862
88672
|
goBack: 'Go Back'
|
|
@@ -88057,6 +88867,9 @@ var _default = exports.default = {
|
|
|
88057
88867
|
realTime: 'real-time',
|
|
88058
88868
|
errorCoordinate: 'invalid coordinate'
|
|
88059
88869
|
},
|
|
88870
|
+
baseLayerSwitcher: {
|
|
88871
|
+
title: 'Base Map Switch'
|
|
88872
|
+
},
|
|
88060
88873
|
// layer
|
|
88061
88874
|
dataFlow: {
|
|
88062
88875
|
dataSubscriptionFailed: 'Data subscription failed!'
|
|
@@ -92214,6 +93027,37 @@ var _default = exports.default = {
|
|
|
92214
93027
|
|
|
92215
93028
|
/***/ }),
|
|
92216
93029
|
|
|
93030
|
+
/***/ "Xp+g":
|
|
93031
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
93032
|
+
|
|
93033
|
+
"use strict";
|
|
93034
|
+
__webpack_require__.r(__webpack_exports__);
|
|
93035
|
+
/* harmony import */ var _ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+581");
|
|
93036
|
+
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
|
|
93037
|
+
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("KHd+");
|
|
93038
|
+
var render, staticRenderFns
|
|
93039
|
+
|
|
93040
|
+
|
|
93041
|
+
|
|
93042
|
+
|
|
93043
|
+
/* normalize component */
|
|
93044
|
+
|
|
93045
|
+
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(
|
|
93046
|
+
_ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
93047
|
+
render,
|
|
93048
|
+
staticRenderFns,
|
|
93049
|
+
false,
|
|
93050
|
+
null,
|
|
93051
|
+
null,
|
|
93052
|
+
null
|
|
93053
|
+
|
|
93054
|
+
)
|
|
93055
|
+
|
|
93056
|
+
component.options.__file = "ChartHandleMixin.vue"
|
|
93057
|
+
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
|
|
93058
|
+
|
|
93059
|
+
/***/ }),
|
|
93060
|
+
|
|
92217
93061
|
/***/ "Xvvz":
|
|
92218
93062
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92219
93063
|
|
|
@@ -105789,6 +106633,7 @@ exports.getColorWithOpacity = getColorWithOpacity;
|
|
|
105789
106633
|
exports.getDarkenColor = getDarkenColor;
|
|
105790
106634
|
exports.getDataType = getDataType;
|
|
105791
106635
|
exports.getDateTime = getDateTime;
|
|
106636
|
+
exports.getDecimalsFormatterVal = getDecimalsFormatterVal;
|
|
105792
106637
|
exports.getDerivedColorsByTextColor = getDerivedColorsByTextColor;
|
|
105793
106638
|
exports.getFeatureCenter = getFeatureCenter;
|
|
105794
106639
|
exports.getValueCaseInsensitive = getValueCaseInsensitive;
|
|
@@ -106114,6 +106959,14 @@ var statisticFunctions = exports.statisticFunctions = {
|
|
|
106114
106959
|
}
|
|
106115
106960
|
};
|
|
106116
106961
|
|
|
106962
|
+
function getDecimalsFormatterVal(val, decimals) {
|
|
106963
|
+
if (!Number.isFinite(+val)) {
|
|
106964
|
+
return val;
|
|
106965
|
+
}
|
|
106966
|
+
|
|
106967
|
+
return decimals === -1 || typeof decimals !== 'number' ? val : Number(val).toFixed(decimals);
|
|
106968
|
+
}
|
|
106969
|
+
|
|
106117
106970
|
/***/ }),
|
|
106118
106971
|
|
|
106119
106972
|
/***/ "eCvj":
|
|
@@ -125505,13 +126358,11 @@ var _vueEcharts = _interopRequireDefault(__webpack_require__("Zni2"));
|
|
|
125505
126358
|
|
|
125506
126359
|
var _lodash = _interopRequireDefault(__webpack_require__("9csQ"));
|
|
125507
126360
|
|
|
125508
|
-
var _lodash2 = _interopRequireDefault(__webpack_require__("
|
|
125509
|
-
|
|
125510
|
-
var _lodash3 = _interopRequireDefault(__webpack_require__("XaGS"));
|
|
126361
|
+
var _lodash2 = _interopRequireDefault(__webpack_require__("XaGS"));
|
|
125511
126362
|
|
|
125512
|
-
var
|
|
126363
|
+
var _lodash3 = _interopRequireDefault(__webpack_require__("9/5/"));
|
|
125513
126364
|
|
|
125514
|
-
var
|
|
126365
|
+
var _lodash4 = _interopRequireDefault(__webpack_require__("zT9C"));
|
|
125515
126366
|
|
|
125516
126367
|
var _Card = _interopRequireDefault(__webpack_require__("tnDp"));
|
|
125517
126368
|
|
|
@@ -125533,11 +126384,8 @@ var _index = _interopRequireDefault(__webpack_require__("NQEM"));
|
|
|
125533
126384
|
|
|
125534
126385
|
var _resizeDetector = __webpack_require__("QG5D");
|
|
125535
126386
|
|
|
125536
|
-
|
|
126387
|
+
var _ChartHandleMixin = _interopRequireDefault(__webpack_require__("Xp+g"));
|
|
125537
126388
|
|
|
125538
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
125539
|
-
|
|
125540
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } //
|
|
125541
126389
|
//
|
|
125542
126390
|
//
|
|
125543
126391
|
//
|
|
@@ -125569,8 +126417,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
125569
126417
|
//
|
|
125570
126418
|
//
|
|
125571
126419
|
//
|
|
125572
|
-
|
|
125573
|
-
|
|
126420
|
+
//
|
|
125574
126421
|
// 枚举事件类型
|
|
125575
126422
|
var EVENTS = ['legendselectchanged', 'legendselected', 'legendunselected', 'legendscroll', 'datazoom', 'datarangeselected', 'timelinechanged', 'timelineplaychanged', 'restore', 'dataviewchanged', 'magictypechanged', 'geoselectchanged', 'geoselected', 'geounselected', 'pieselectchanged', 'pieselected', 'pieunselected', 'mapselectchanged', 'mapselected', 'mapunselected', 'axisareaselected', 'focusnodeadjacency', 'unfocusnodeadjacency', 'brush', 'brushselected', 'rendered', 'finished', 'click', 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'mouseup', 'globalout', 'contextmenu'];
|
|
125576
126423
|
|
|
@@ -125579,7 +126426,7 @@ var _default2 = exports.default = {
|
|
|
125579
126426
|
'v-chart': _vueEcharts.default,
|
|
125580
126427
|
TablePopup: _TablePopup.default
|
|
125581
126428
|
},
|
|
125582
|
-
mixins: [_Theme.default, _Card.default, _Timer.default],
|
|
126429
|
+
mixins: [_Theme.default, _Card.default, _Timer.default, _ChartHandleMixin.default],
|
|
125583
126430
|
props: {
|
|
125584
126431
|
iconClass: {
|
|
125585
126432
|
type: String,
|
|
@@ -125679,7 +126526,7 @@ var _default2 = exports.default = {
|
|
|
125679
126526
|
};
|
|
125680
126527
|
},
|
|
125681
126528
|
parseOptions: function parseOptions() {
|
|
125682
|
-
var
|
|
126529
|
+
var _this = this;
|
|
125683
126530
|
|
|
125684
126531
|
if (!this.options.series) {
|
|
125685
126532
|
return this.options;
|
|
@@ -125701,8 +126548,8 @@ var _default2 = exports.default = {
|
|
|
125701
126548
|
|
|
125702
126549
|
var series = this.options.series.map(function (serie) {
|
|
125703
126550
|
if (serie.label) {
|
|
125704
|
-
var cloneSerie = (0,
|
|
125705
|
-
cloneSerie.label.normal =
|
|
126551
|
+
var cloneSerie = (0, _lodash4.default)(serie);
|
|
126552
|
+
cloneSerie.label.normal = _this._controlLabel(cloneSerie.label.normal, cloneSerie.maxLabels);
|
|
125706
126553
|
return cloneSerie;
|
|
125707
126554
|
}
|
|
125708
126555
|
|
|
@@ -125738,17 +126585,17 @@ var _default2 = exports.default = {
|
|
|
125738
126585
|
this.chartTheme = null;
|
|
125739
126586
|
},
|
|
125740
126587
|
colorGroupsData: function colorGroupsData(newVal, oldVal) {
|
|
125741
|
-
if (!(0,
|
|
126588
|
+
if (!(0, _lodash2.default)(newVal, oldVal)) {
|
|
125742
126589
|
this._setChartTheme();
|
|
125743
126590
|
}
|
|
125744
126591
|
},
|
|
125745
126592
|
textColorsData: function textColorsData(newVal, oldVal) {
|
|
125746
|
-
if (!(0,
|
|
126593
|
+
if (!(0, _lodash2.default)(newVal, oldVal)) {
|
|
125747
126594
|
this._setChartTheme();
|
|
125748
126595
|
}
|
|
125749
126596
|
},
|
|
125750
126597
|
getBackground: function getBackground(newVal, oldVal) {
|
|
125751
|
-
if (!(0,
|
|
126598
|
+
if (!(0, _lodash2.default)(newVal, oldVal)) {
|
|
125752
126599
|
this._setChartTheme();
|
|
125753
126600
|
}
|
|
125754
126601
|
},
|
|
@@ -125761,7 +126608,7 @@ var _default2 = exports.default = {
|
|
|
125761
126608
|
},
|
|
125762
126609
|
datasetOptions: {
|
|
125763
126610
|
handler: function handler(newVal, oldVal) {
|
|
125764
|
-
if (!(0,
|
|
126611
|
+
if (!(0, _lodash2.default)(newVal, oldVal)) {
|
|
125765
126612
|
this._setChartTheme();
|
|
125766
126613
|
|
|
125767
126614
|
this.registerShape();
|
|
@@ -125861,10 +126708,10 @@ var _default2 = exports.default = {
|
|
|
125861
126708
|
},
|
|
125862
126709
|
methods: {
|
|
125863
126710
|
_initAutoResize: function _initAutoResize() {
|
|
125864
|
-
var
|
|
126711
|
+
var _this2 = this;
|
|
125865
126712
|
|
|
125866
|
-
this.__resizeHandler = (0,
|
|
125867
|
-
|
|
126713
|
+
this.__resizeHandler = (0, _lodash3.default)(function () {
|
|
126714
|
+
_this2.resize();
|
|
125868
126715
|
}, 100, {
|
|
125869
126716
|
leading: true
|
|
125870
126717
|
});
|
|
@@ -125875,124 +126722,16 @@ var _default2 = exports.default = {
|
|
|
125875
126722
|
}
|
|
125876
126723
|
},
|
|
125877
126724
|
_initDataZoom: function _initDataZoom() {
|
|
125878
|
-
var
|
|
126725
|
+
var _this3 = this;
|
|
125879
126726
|
|
|
125880
|
-
this.dataZoomHandler = (0,
|
|
125881
|
-
|
|
126727
|
+
this.dataZoomHandler = (0, _lodash3.default)(function () {
|
|
126728
|
+
_this3._dataZoomChanged();
|
|
125882
126729
|
}, 500, {
|
|
125883
126730
|
leading: true
|
|
125884
126731
|
});
|
|
125885
126732
|
},
|
|
125886
|
-
getStringColor: function getStringColor(color) {
|
|
125887
|
-
if (color instanceof Object) {
|
|
125888
|
-
return ((color.colorStops || [])[0] || {}).color;
|
|
125889
|
-
}
|
|
125890
|
-
|
|
125891
|
-
return color;
|
|
125892
|
-
},
|
|
125893
|
-
setGradientColor: function setGradientColor(color, nextColor) {
|
|
125894
|
-
if (typeof color === 'string') {
|
|
125895
|
-
return new this.$options.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
125896
|
-
offset: 0,
|
|
125897
|
-
color: color
|
|
125898
|
-
}, {
|
|
125899
|
-
offset: 1,
|
|
125900
|
-
color: nextColor || color
|
|
125901
|
-
}]);
|
|
125902
|
-
}
|
|
125903
|
-
|
|
125904
|
-
return color;
|
|
125905
|
-
},
|
|
125906
|
-
_initAxisLabel: function _initAxisLabel(axisLabel, data, visualMap, series) {
|
|
125907
|
-
if (!this.xBar) {
|
|
125908
|
-
return;
|
|
125909
|
-
}
|
|
125910
|
-
|
|
125911
|
-
var sortSeriesIndex = this.datasetOptions.findIndex(function (item) {
|
|
125912
|
-
return item.sort !== 'unsort' && item.rankLabel;
|
|
125913
|
-
});
|
|
125914
|
-
|
|
125915
|
-
if (sortSeriesIndex > -1 && axisLabel && data) {
|
|
125916
|
-
var orderNumLength = data.length.toString().length;
|
|
125917
|
-
|
|
125918
|
-
for (var index = 0, len = data.length, rankIndex = len - 1; index < len; index++, rankIndex--) {
|
|
125919
|
-
var paddedNumber = rankIndex.toString().padStart(orderNumLength, '0');
|
|
125920
|
-
data[index] = "" + paddedNumber + data[index];
|
|
125921
|
-
}
|
|
125922
|
-
|
|
125923
|
-
var firstVisualMap = visualMap && visualMap.find(function (item) {
|
|
125924
|
-
return item.seriesIndex === sortSeriesIndex;
|
|
125925
|
-
});
|
|
125926
|
-
axisLabel.rich = axisLabel.rich || {};
|
|
125927
|
-
axisLabel.rich.default = {
|
|
125928
|
-
backgroundColor: this.getStringColor(this.colorGroup[sortSeriesIndex]),
|
|
125929
|
-
width: 20,
|
|
125930
|
-
height: 20,
|
|
125931
|
-
align: 'center',
|
|
125932
|
-
borderRadius: 2
|
|
125933
|
-
};
|
|
125934
|
-
firstVisualMap && firstVisualMap.pieces.forEach(function (item, index) {
|
|
125935
|
-
axisLabel.rich["color_" + index] = {
|
|
125936
|
-
backgroundColor: item.color,
|
|
125937
|
-
width: 20,
|
|
125938
|
-
height: 20,
|
|
125939
|
-
align: 'center',
|
|
125940
|
-
borderRadius: 2
|
|
125941
|
-
};
|
|
125942
|
-
});
|
|
125943
|
-
var serieData = series && series[sortSeriesIndex].data;
|
|
125944
|
-
|
|
125945
|
-
axisLabel.formatter = function (label, index) {
|
|
125946
|
-
var orderNum = parseInt(label.slice(0, orderNumLength)) + 1;
|
|
125947
|
-
var leftLabel = label.slice(orderNumLength);
|
|
125948
|
-
var labelValue = serieData && +serieData[index];
|
|
125949
|
-
|
|
125950
|
-
if (firstVisualMap) {
|
|
125951
|
-
var matchItemIndex = firstVisualMap.pieces.findIndex(function (item) {
|
|
125952
|
-
var condition = true;
|
|
125953
|
-
|
|
125954
|
-
if (item.min) {
|
|
125955
|
-
condition = condition && labelValue >= item.min;
|
|
125956
|
-
}
|
|
125957
|
-
|
|
125958
|
-
if (item.max) {
|
|
125959
|
-
condition = condition && labelValue <= item.max;
|
|
125960
|
-
}
|
|
125961
|
-
|
|
125962
|
-
if (item.lte) {
|
|
125963
|
-
condition = condition && labelValue <= item.lte;
|
|
125964
|
-
}
|
|
125965
|
-
|
|
125966
|
-
if (item.gte) {
|
|
125967
|
-
condition = condition && labelValue >= item.gte;
|
|
125968
|
-
}
|
|
125969
|
-
|
|
125970
|
-
if (item.lt) {
|
|
125971
|
-
condition = condition && labelValue < item.lt;
|
|
125972
|
-
}
|
|
125973
|
-
|
|
125974
|
-
if (item.gt) {
|
|
125975
|
-
condition = condition && labelValue > item.gt;
|
|
125976
|
-
}
|
|
125977
|
-
|
|
125978
|
-
if (item.value) {
|
|
125979
|
-
condition = condition && labelValue === item.value;
|
|
125980
|
-
}
|
|
125981
|
-
|
|
125982
|
-
return condition;
|
|
125983
|
-
});
|
|
125984
|
-
|
|
125985
|
-
if (matchItemIndex > -1) {
|
|
125986
|
-
return ["{color_" + matchItemIndex + "|" + orderNum + "} " + leftLabel].join('\n');
|
|
125987
|
-
}
|
|
125988
|
-
}
|
|
125989
|
-
|
|
125990
|
-
return ["{default|" + orderNum + "} " + leftLabel].join('\n');
|
|
125991
|
-
};
|
|
125992
|
-
}
|
|
125993
|
-
},
|
|
125994
126733
|
setItemStyleColor: function setItemStyleColor(isSet, series, highlightOptions, color) {
|
|
125995
|
-
var
|
|
126734
|
+
var _this4 = this;
|
|
125996
126735
|
|
|
125997
126736
|
if (isSet === void 0) {
|
|
125998
126737
|
isSet = true;
|
|
@@ -126006,7 +126745,7 @@ var _default2 = exports.default = {
|
|
|
126006
126745
|
color = this.highlightColor;
|
|
126007
126746
|
}
|
|
126008
126747
|
|
|
126009
|
-
series = series || (0,
|
|
126748
|
+
series = series || (0, _lodash4.default)(this.echartOptions && this.echartOptions.series) || [];
|
|
126010
126749
|
series.forEach(function (serie, seriesIndex) {
|
|
126011
126750
|
var dataIndexs = highlightOptions.map(function (item) {
|
|
126012
126751
|
if (item.seriesIndex && item.seriesIndex.includes(seriesIndex)) {
|
|
@@ -126018,7 +126757,7 @@ var _default2 = exports.default = {
|
|
|
126018
126757
|
return item.color || color;
|
|
126019
126758
|
}
|
|
126020
126759
|
});
|
|
126021
|
-
var serieColor =
|
|
126760
|
+
var serieColor = _this4.options.series && _this4.options.series[seriesIndex] && _this4.options.series[seriesIndex].itemStyle && _this4.options.series[seriesIndex].itemStyle.color;
|
|
126022
126761
|
serie.itemStyle = serie.itemStyle || {
|
|
126023
126762
|
color: ''
|
|
126024
126763
|
};
|
|
@@ -126030,7 +126769,7 @@ var _default2 = exports.default = {
|
|
|
126030
126769
|
if (index > -1) {
|
|
126031
126770
|
return colors[index];
|
|
126032
126771
|
} else if (serie.type === 'pie') {
|
|
126033
|
-
var colorGroup =
|
|
126772
|
+
var colorGroup = _this4._handlerColorGroup(serie.data.length);
|
|
126034
126773
|
|
|
126035
126774
|
return colorGroup[dataIndex];
|
|
126036
126775
|
} else {
|
|
@@ -126053,7 +126792,7 @@ var _default2 = exports.default = {
|
|
|
126053
126792
|
}
|
|
126054
126793
|
},
|
|
126055
126794
|
setPieAutoPlay: function setPieAutoPlay(echartsNode) {
|
|
126056
|
-
var
|
|
126795
|
+
var _this5 = this;
|
|
126057
126796
|
|
|
126058
126797
|
var i = -1;
|
|
126059
126798
|
this.pieAutoPlay = setInterval(function () {
|
|
@@ -126064,7 +126803,7 @@ var _default2 = exports.default = {
|
|
|
126064
126803
|
});
|
|
126065
126804
|
i++;
|
|
126066
126805
|
|
|
126067
|
-
if (i >=
|
|
126806
|
+
if (i >= _this5._chartOptions.legend.data.length) {
|
|
126068
126807
|
i = 0;
|
|
126069
126808
|
}
|
|
126070
126809
|
|
|
@@ -126087,21 +126826,21 @@ var _default2 = exports.default = {
|
|
|
126087
126826
|
}
|
|
126088
126827
|
},
|
|
126089
126828
|
timing: function timing() {
|
|
126090
|
-
var
|
|
126829
|
+
var _this6 = this;
|
|
126091
126830
|
|
|
126092
126831
|
this.echartsDataService && this.echartsDataService.getDataOption(this.dataset, this.xBar).then(function (options) {
|
|
126093
|
-
|
|
126832
|
+
_this6.hideLoading(); // 缓存dataSeriesCache,请求后格式化成echart的数据
|
|
126094
126833
|
|
|
126095
126834
|
|
|
126096
|
-
|
|
126097
|
-
|
|
126835
|
+
_this6.dataSeriesCache = Object.assign({}, options);
|
|
126836
|
+
_this6.datasetChange = false; // 设置echartOptions
|
|
126098
126837
|
|
|
126099
|
-
|
|
126838
|
+
_this6.echartOptions = _this6._optionsHandler(_this6.options, options);
|
|
126100
126839
|
});
|
|
126101
126840
|
},
|
|
126102
126841
|
// 请求数据,设置echartOptions
|
|
126103
126842
|
_setEchartOptions: function _setEchartOptions(dataset, datasetOptions, echartOptions) {
|
|
126104
|
-
var
|
|
126843
|
+
var _this7 = this;
|
|
126105
126844
|
|
|
126106
126845
|
this.echartsDataService = null;
|
|
126107
126846
|
this.dataSeriesCache = null;
|
|
@@ -126118,615 +126857,14 @@ var _default2 = exports.default = {
|
|
|
126118
126857
|
|
|
126119
126858
|
this.echartsDataService = new _EchartsDataService.default(dataset, datasetOptions);
|
|
126120
126859
|
this.echartsDataService.getDataOption(dataset, this.xBar).then(function (options) {
|
|
126121
|
-
|
|
126122
|
-
|
|
126123
|
-
|
|
126124
|
-
_this8.dataSeriesCache = Object.assign({}, options);
|
|
126125
|
-
_this8.datasetChange = false; // 设置echartOptions
|
|
126126
|
-
|
|
126127
|
-
_this8.echartOptions = _this8._optionsHandler(echartOptions, options);
|
|
126128
|
-
});
|
|
126129
|
-
},
|
|
126130
|
-
_optionsHandler: function _optionsHandler(options, dataOptions, dataZoomChanged) {
|
|
126131
|
-
var _this9 = this;
|
|
126132
|
-
|
|
126133
|
-
dataOptions = dataOptions && (0, _lodash5.default)(dataOptions); // clone 避免引起重复刷新
|
|
126134
|
-
|
|
126135
|
-
options = options && (0, _lodash5.default)(options); // clone 避免引起重复刷新
|
|
126136
|
-
|
|
126137
|
-
var extraSeries = [];
|
|
126138
|
-
|
|
126139
|
-
if (options && options.legend && !options.legend.type) {
|
|
126140
|
-
options.legend.type = 'scroll';
|
|
126141
|
-
}
|
|
126142
|
-
|
|
126143
|
-
var yAxis = options.yAxis;
|
|
126144
|
-
var xAxis = options.xAxis;
|
|
126145
|
-
|
|
126146
|
-
if (xAxis && dataOptions.xAxis) {
|
|
126147
|
-
var axis = xAxis;
|
|
126148
|
-
var axisData = dataOptions.xAxis[0];
|
|
126149
|
-
var type = 'xAxis';
|
|
126150
|
-
|
|
126151
|
-
if (yAxis && yAxis.type === 'category') {
|
|
126152
|
-
// 处理条形图
|
|
126153
|
-
type = 'yAxis';
|
|
126154
|
-
axis = yAxis;
|
|
126155
|
-
dataOptions.yAxis = dataOptions.xAxis;
|
|
126156
|
-
delete dataOptions.xAxis;
|
|
126157
|
-
|
|
126158
|
-
this._initAxisLabel(yAxis.axisLabel, dataOptions.yAxis[0].data, options.visualMap, dataOptions.series);
|
|
126159
|
-
}
|
|
126160
|
-
|
|
126161
|
-
if (dataOptions.series.length === 0) {
|
|
126162
|
-
axis = [{}];
|
|
126163
|
-
} else if (!Array.isArray(axis)) {
|
|
126164
|
-
if (axisData.data && axisData.data.length) {
|
|
126165
|
-
axis.data = [];
|
|
126166
|
-
}
|
|
126167
|
-
|
|
126168
|
-
axis = [Object.assign({}, axisData, axis)];
|
|
126169
|
-
}
|
|
126170
|
-
|
|
126171
|
-
options[type] = axis;
|
|
126172
|
-
}
|
|
126173
|
-
|
|
126174
|
-
if (options && options.series && dataOptions.series) {
|
|
126175
|
-
if (dataOptions.series.length === 0) {
|
|
126176
|
-
options.series = [];
|
|
126177
|
-
} else {
|
|
126178
|
-
options.series = options.series.map(function (element, index) {
|
|
126179
|
-
return Object.assign({}, element, dataOptions.series[index] || {});
|
|
126180
|
-
});
|
|
126181
|
-
var dataZoom = options.dataZoom && options.dataZoom[0];
|
|
126182
|
-
var parallelShowNumber = this.getParallelShowNumber(options.series);
|
|
126183
|
-
|
|
126184
|
-
if (options.series[0].shape === 'cylinder') {
|
|
126185
|
-
this.setCylinderXAxis(parallelShowNumber, options);
|
|
126186
|
-
}
|
|
126187
|
-
|
|
126188
|
-
var leftRightCount = parallelShowNumber / 2;
|
|
126189
|
-
var baseSpace = 32;
|
|
126190
|
-
var seriesSpace = 0;
|
|
126191
|
-
var seriesSpaceCount = -Math.floor(leftRightCount);
|
|
126192
|
-
var seriesNameTag;
|
|
126193
|
-
var colorIndex = 0;
|
|
126194
|
-
options.series = options.series.map(function (serie, index) {
|
|
126195
|
-
if (parallelShowNumber !== 0) {
|
|
126196
|
-
var serieName = serie.name.substring(serie.name.indexOf('-') + 1);
|
|
126197
|
-
|
|
126198
|
-
if (!seriesNameTag) {
|
|
126199
|
-
seriesNameTag = serieName;
|
|
126200
|
-
seriesSpace = _this9.getSericeSpace(parallelShowNumber, baseSpace, seriesSpaceCount);
|
|
126201
|
-
} else {
|
|
126202
|
-
if (seriesNameTag === serieName) {
|
|
126203
|
-
seriesSpace = _this9.getSericeSpace(parallelShowNumber, baseSpace, seriesSpaceCount);
|
|
126204
|
-
} else {
|
|
126205
|
-
seriesSpaceCount = -Math.floor(leftRightCount);
|
|
126206
|
-
seriesNameTag = serieName;
|
|
126207
|
-
seriesSpace = _this9.getSericeSpace(parallelShowNumber, baseSpace, seriesSpaceCount);
|
|
126208
|
-
colorIndex += 1;
|
|
126209
|
-
}
|
|
126210
|
-
}
|
|
126211
|
-
|
|
126212
|
-
seriesSpaceCount += 1;
|
|
126213
|
-
}
|
|
126214
|
-
|
|
126215
|
-
var label = serie.label && serie.label.normal;
|
|
126216
|
-
|
|
126217
|
-
if (label && !label.smart) {
|
|
126218
|
-
serie.label.normal = _this9._controlLabel(label, serie.maxLabels);
|
|
126219
|
-
}
|
|
126220
|
-
|
|
126221
|
-
if (label && label.show && label.smart) {
|
|
126222
|
-
label.position = label.position || 'top';
|
|
126223
|
-
var data = serie.data || [];
|
|
126224
|
-
var startDataIndex = 0;
|
|
126225
|
-
var endDataIndex = data.length > 0 ? data.length - 1 : 0;
|
|
126226
|
-
|
|
126227
|
-
if (dataZoom && dataZoom.show !== false) {
|
|
126228
|
-
if (dataZoom.start > dataZoom.end) {
|
|
126229
|
-
var oldStart = dataZoom.start;
|
|
126230
|
-
dataZoom.start = dataZoom.end;
|
|
126231
|
-
dataZoom.end = oldStart;
|
|
126232
|
-
}
|
|
126233
|
-
|
|
126234
|
-
if (dataZoomChanged) {
|
|
126235
|
-
var _ref2 = _this9.smChart.chart.getOption().dataZoom[0] || {},
|
|
126236
|
-
startValue = _ref2.startValue,
|
|
126237
|
-
endValue = _ref2.endValue;
|
|
126238
|
-
|
|
126239
|
-
startDataIndex = startValue;
|
|
126240
|
-
endDataIndex = endValue;
|
|
126241
|
-
options.dataZoom = options.dataZoom.map(function (val) {
|
|
126242
|
-
if (startValue >= 0 && endValue >= 0) {
|
|
126243
|
-
val.startValue = startValue;
|
|
126244
|
-
val.endValue = endValue;
|
|
126245
|
-
delete val.start;
|
|
126246
|
-
delete val.end;
|
|
126247
|
-
return val;
|
|
126248
|
-
}
|
|
126249
|
-
|
|
126250
|
-
return val;
|
|
126251
|
-
});
|
|
126252
|
-
} else {
|
|
126253
|
-
startDataIndex = Math.floor(dataZoom.start / 100 * data.length);
|
|
126254
|
-
endDataIndex = Math.ceil(dataZoom.end / 100 * data.length);
|
|
126255
|
-
}
|
|
126256
|
-
|
|
126257
|
-
data = serie.data.slice(startDataIndex, endDataIndex + 1);
|
|
126258
|
-
}
|
|
126259
|
-
|
|
126260
|
-
label.formatter = function (_ref3) {
|
|
126261
|
-
var dataIndex = _ref3.dataIndex,
|
|
126262
|
-
value = _ref3.value;
|
|
126263
|
-
var result = '';
|
|
126264
|
-
|
|
126265
|
-
if (dataIndex === startDataIndex || dataIndex === endDataIndex || Math.max.apply(null, data) + '' === value + '') {
|
|
126266
|
-
result = value;
|
|
126267
|
-
}
|
|
126268
|
-
|
|
126269
|
-
return result;
|
|
126270
|
-
};
|
|
126271
|
-
} else if (serie && serie.type !== 'pie' && serie.type !== 'radar') {
|
|
126272
|
-
var colorGroup = (0, _chart.getMultiColorGroup)(_this9.colorGroupsData, _this9.colorNumber);
|
|
126273
|
-
|
|
126274
|
-
if (serie.type === '2.5Bar') {
|
|
126275
|
-
var shape = serie.shape;
|
|
126276
|
-
var defaultColor = serie.itemStyle && serie.itemStyle.color;
|
|
126277
|
-
|
|
126278
|
-
if (['square', 'rectangle'].includes(shape)) {
|
|
126279
|
-
var cubeType = shape;
|
|
126280
|
-
serie.type = 'custom';
|
|
126281
|
-
dataOptions.series[index] && (dataOptions.series[index].type = 'custom');
|
|
126282
|
-
var _this = _this9;
|
|
126283
|
-
serie.renderItem = _this9._squareRectangleRenderItem(seriesSpace, defaultColor, colorGroup, _this, cubeType, colorIndex);
|
|
126284
|
-
} else if (shape === 'cylinder') {
|
|
126285
|
-
_this9.handleCylinder(parallelShowNumber, dataOptions, index, serie, options, defaultColor, colorGroup, extraSeries);
|
|
126286
|
-
}
|
|
126287
|
-
|
|
126288
|
-
delete serie.shape;
|
|
126289
|
-
}
|
|
126290
|
-
}
|
|
126291
|
-
|
|
126292
|
-
return serie;
|
|
126293
|
-
}); // 玫瑰图多个选中
|
|
126294
|
-
|
|
126295
|
-
if (options.series[0].type === 'pie' && options.series[0].roseType) {
|
|
126296
|
-
options.series = options.series.map(function (serie) {
|
|
126297
|
-
if (!serie.roseType) {
|
|
126298
|
-
serie.roseType = options.series[0].roseType;
|
|
126299
|
-
}
|
|
126300
|
-
|
|
126301
|
-
return serie;
|
|
126302
|
-
});
|
|
126303
|
-
} // pie的图例需要一个扇形是一个图例
|
|
126304
|
-
|
|
126305
|
-
|
|
126306
|
-
if (options.legend && options.series.length > 0 && options.series[0].type === 'pie') {
|
|
126307
|
-
options.legend.data = [];
|
|
126308
|
-
options.series.forEach(function (element) {
|
|
126309
|
-
if (element.data) {
|
|
126310
|
-
var _options$legend$data;
|
|
126311
|
-
|
|
126312
|
-
(_options$legend$data = options.legend.data).push.apply(_options$legend$data, element.data.map(function (item) {
|
|
126313
|
-
return item.name;
|
|
126314
|
-
}));
|
|
126315
|
-
}
|
|
126316
|
-
});
|
|
126317
|
-
}
|
|
126318
|
-
}
|
|
126319
|
-
}
|
|
126320
|
-
|
|
126321
|
-
if (options && options.radar && dataOptions.radar) {
|
|
126322
|
-
options.radar.indicator = Object.assign({}, dataOptions.radar.indicator || {});
|
|
126323
|
-
}
|
|
126324
|
-
|
|
126325
|
-
var series = dataOptions.series;
|
|
126326
|
-
var isRingShine = options.series && options.series[0] && options.series[0].outerGap >= 0;
|
|
126327
|
-
|
|
126328
|
-
if (series && series.length && series[0].type === 'pie') {
|
|
126329
|
-
this.setItemStyleColor(false, series);
|
|
126330
|
-
}
|
|
126331
|
-
|
|
126332
|
-
if (isRingShine) {
|
|
126333
|
-
dataOptions.series = this._createRingShineSeries(series, options.series);
|
|
126334
|
-
}
|
|
126335
|
-
|
|
126336
|
-
if (this.highlightOptions && this.highlightOptions.length > 0) {
|
|
126337
|
-
if (isRingShine) {
|
|
126338
|
-
dataOptions.series = this._createRingShineHighlight(series, this.highlightOptions);
|
|
126339
|
-
} else {
|
|
126340
|
-
this.setItemStyleColor(true, series);
|
|
126341
|
-
}
|
|
126342
|
-
}
|
|
126343
|
-
|
|
126344
|
-
var mergeOptions = (0, _lodash2.default)(options, dataOptions);
|
|
126345
|
-
|
|
126346
|
-
if (extraSeries.length > 0) {
|
|
126347
|
-
var _mergeOptions$series;
|
|
126348
|
-
|
|
126349
|
-
(_mergeOptions$series = mergeOptions.series).push.apply(_mergeOptions$series, extraSeries);
|
|
126350
|
-
}
|
|
126351
|
-
|
|
126352
|
-
return mergeOptions;
|
|
126353
|
-
},
|
|
126354
|
-
handleCylinder: function handleCylinder(parallelShowNumber, dataOptions, index, serie, options, defaultColor, colorGroup, extraSeries) {
|
|
126355
|
-
var _this10 = this;
|
|
126356
|
-
|
|
126357
|
-
var baseColumnWidth = parallelShowNumber !== 0 ? 100 / parallelShowNumber + "%" : '100%';
|
|
126358
|
-
var nextSerieDatas = dataOptions.series[index + 1] && dataOptions.series[index + 1].data;
|
|
126359
|
-
serie.type = 'bar';
|
|
126360
|
-
serie.barGap = parallelShowNumber === 0 ? '-100%' : '0';
|
|
126361
|
-
|
|
126362
|
-
if (parallelShowNumber !== 0) {
|
|
126363
|
-
var serieColor = defaultColor || colorGroup[Math.ceil((index + 1) / parallelShowNumber) - 1];
|
|
126364
|
-
|
|
126365
|
-
if (serie.itemStyle) {
|
|
126366
|
-
serie.itemStyle.color = this.setGradientColor(serieColor, '#fff');
|
|
126367
|
-
} else {
|
|
126368
|
-
serie.itemStyle = {};
|
|
126369
|
-
serie.itemStyle.color = this.setGradientColor(serieColor, '#fff');
|
|
126370
|
-
}
|
|
126371
|
-
}
|
|
126372
|
-
|
|
126373
|
-
options.tooltip && options.tooltip.trigger === 'axis' && (options.tooltip.trigger = 'item');
|
|
126374
|
-
dataOptions.series[index] && (dataOptions.series[index].type = 'bar');
|
|
126375
|
-
var colorIndex = parallelShowNumber !== 0 ? Math.ceil((index + 1) / parallelShowNumber) - 1 : index;
|
|
126376
|
-
var cirCleColor = defaultColor || colorGroup[colorIndex];
|
|
126377
|
-
var cirCleColorFnList = [];
|
|
126378
|
-
|
|
126379
|
-
if (typeof cirCleColor === 'string') {
|
|
126380
|
-
cirCleColor = this.setGradientColor(cirCleColor, '#fff');
|
|
126381
|
-
}
|
|
126382
|
-
|
|
126383
|
-
if (this.highlightOptions && this.highlightOptions.length > 0) {
|
|
126384
|
-
var matchDataList = [];
|
|
126385
|
-
this.highlightOptions.forEach(function (item) {
|
|
126386
|
-
if (item.seriesIndex.includes(index)) {
|
|
126387
|
-
var color = item.color || _this10.highlightColor;
|
|
126388
|
-
|
|
126389
|
-
if (typeof color === 'string') {
|
|
126390
|
-
color = _this10.setGradientColor(color, '#fff');
|
|
126391
|
-
}
|
|
126392
|
-
|
|
126393
|
-
matchDataList.push({
|
|
126394
|
-
dataIndex: item.dataIndex,
|
|
126395
|
-
color: color
|
|
126396
|
-
});
|
|
126397
|
-
}
|
|
126398
|
-
});
|
|
126399
|
-
|
|
126400
|
-
if (matchDataList.length > 0) {
|
|
126401
|
-
cirCleColorFnList = ['topCirCleColorFn', 'bottomCirCleColorFn'].map(function () {
|
|
126402
|
-
return function (_ref4) {
|
|
126403
|
-
var dataIndex = _ref4.dataIndex;
|
|
126404
|
-
var matchData = matchDataList.find(function (item) {
|
|
126405
|
-
return item.dataIndex === dataIndex;
|
|
126406
|
-
});
|
|
126407
|
-
return matchData ? matchData.color : cirCleColor;
|
|
126408
|
-
};
|
|
126409
|
-
});
|
|
126410
|
-
}
|
|
126411
|
-
}
|
|
126412
|
-
|
|
126413
|
-
var offsetDistance = this.getOffsetDistance(parallelShowNumber, index);
|
|
126414
|
-
var xAxisIndex = parallelShowNumber !== 0 ? Math.ceil((index + 1) / parallelShowNumber) - 1 : 0;
|
|
126415
|
-
serie.xAxisIndex = xAxisIndex;
|
|
126416
|
-
extraSeries.push( // 头部的圆片
|
|
126417
|
-
{
|
|
126418
|
-
name: parallelShowNumber !== 0 ? serie.name : '',
|
|
126419
|
-
type: 'pictorialBar',
|
|
126420
|
-
symbolOffset: parallelShowNumber !== 0 ? [offsetDistance, '-50%'] : [0, -8],
|
|
126421
|
-
xAxisIndex: parallelShowNumber !== 0 ? xAxisIndex : 0,
|
|
126422
|
-
symbolPosition: 'end',
|
|
126423
|
-
z: 12,
|
|
126424
|
-
itemStyle: {
|
|
126425
|
-
normal: {
|
|
126426
|
-
color: cirCleColorFnList[0] || cirCleColor
|
|
126427
|
-
}
|
|
126428
|
-
},
|
|
126429
|
-
data: dataOptions.series[index].data.map(function (item, dataIndex) {
|
|
126430
|
-
if (parallelShowNumber !== 0) {
|
|
126431
|
-
return {
|
|
126432
|
-
value: item,
|
|
126433
|
-
symbolSize: [baseColumnWidth, 15]
|
|
126434
|
-
};
|
|
126435
|
-
} else {
|
|
126436
|
-
return {
|
|
126437
|
-
value: item,
|
|
126438
|
-
symbolSize: !nextSerieDatas || nextSerieDatas[dataIndex] && +item >= +nextSerieDatas[dataIndex] ? [baseColumnWidth, 15] : [0, 15]
|
|
126439
|
-
};
|
|
126440
|
-
}
|
|
126441
|
-
})
|
|
126442
|
-
}, {
|
|
126443
|
-
// 底部的圆片
|
|
126444
|
-
name: parallelShowNumber !== 0 ? serie.name : '',
|
|
126445
|
-
type: 'pictorialBar',
|
|
126446
|
-
xAxisIndex: parallelShowNumber !== 0 ? xAxisIndex : 0,
|
|
126447
|
-
symbolSize: parallelShowNumber !== 0 ? [baseColumnWidth, 10] : [offsetDistance, 10],
|
|
126448
|
-
symbolOffset: parallelShowNumber !== 0 ? [offsetDistance, '50%'] : [0, 5],
|
|
126449
|
-
z: 12,
|
|
126450
|
-
itemStyle: {
|
|
126451
|
-
normal: {
|
|
126452
|
-
color: cirCleColorFnList[1] || cirCleColor
|
|
126453
|
-
}
|
|
126454
|
-
},
|
|
126455
|
-
data: dataOptions.series[index].data
|
|
126456
|
-
});
|
|
126457
|
-
},
|
|
126458
|
-
getParallelShowNumber: function getParallelShowNumber(series) {
|
|
126459
|
-
if (series.length === 0 || !this.multipleYField(series)) {
|
|
126460
|
-
// 0表示不进行并列显示
|
|
126461
|
-
return 0;
|
|
126462
|
-
}
|
|
126463
|
-
|
|
126464
|
-
var parallelShowNumber = 0;
|
|
126465
|
-
var symbolPosition = series[0].name.indexOf('-');
|
|
126466
|
-
var firstSeriesName = series[0].name.substring(symbolPosition + 1);
|
|
126467
|
-
series.forEach(function (option) {
|
|
126468
|
-
var optionName = option.name.substring(symbolPosition + 1);
|
|
126469
|
-
|
|
126470
|
-
if (firstSeriesName === optionName) {
|
|
126471
|
-
parallelShowNumber++;
|
|
126472
|
-
}
|
|
126473
|
-
});
|
|
126474
|
-
return parallelShowNumber;
|
|
126475
|
-
},
|
|
126476
|
-
setCylinderXAxis: function setCylinderXAxis(parallelShowNumber, options) {
|
|
126477
|
-
if (parallelShowNumber === 0) {
|
|
126478
|
-
return;
|
|
126479
|
-
}
|
|
126480
|
-
|
|
126481
|
-
var xAixsType = options.xAxis[0] && options.xAxis[0].type;
|
|
126482
|
-
|
|
126483
|
-
for (var i = 1; i <= parallelShowNumber; i++) {
|
|
126484
|
-
options.xAxis.push({
|
|
126485
|
-
type: xAixsType,
|
|
126486
|
-
show: false
|
|
126487
|
-
});
|
|
126488
|
-
}
|
|
126489
|
-
},
|
|
126490
|
-
getOffsetDistance: function getOffsetDistance(parallelShowNumber, index) {
|
|
126491
|
-
if (parallelShowNumber === 0) {
|
|
126492
|
-
return '100%';
|
|
126493
|
-
}
|
|
126494
|
-
|
|
126495
|
-
var distance;
|
|
126496
|
-
|
|
126497
|
-
if (parallelShowNumber % 2) {
|
|
126498
|
-
distance = -100 * Math.floor(parallelShowNumber / 2) + index % parallelShowNumber * 100;
|
|
126499
|
-
return distance + "%";
|
|
126500
|
-
} else {
|
|
126501
|
-
distance = -100 * (Math.floor(parallelShowNumber / 2) - 0.5) + index % parallelShowNumber * 100;
|
|
126502
|
-
}
|
|
126503
|
-
|
|
126504
|
-
return distance + "%";
|
|
126505
|
-
},
|
|
126506
|
-
multipleYField: function multipleYField(optionSeries) {
|
|
126507
|
-
var series = (0, _lodash5.default)(optionSeries);
|
|
126508
|
-
var nameList = series.map(function (serie) {
|
|
126509
|
-
if (!serie.name.includes('-')) {
|
|
126510
|
-
return serie.name;
|
|
126511
|
-
}
|
|
126512
|
-
|
|
126513
|
-
var position = serie.name.indexOf('-');
|
|
126514
|
-
var prefix = serie.name.substring(0, position);
|
|
126515
|
-
|
|
126516
|
-
if (isNaN(+prefix)) {
|
|
126517
|
-
return serie.name;
|
|
126518
|
-
}
|
|
126519
|
-
|
|
126520
|
-
return serie.name.substring(position + 1);
|
|
126521
|
-
});
|
|
126522
|
-
return series.length !== new Set(nameList).size;
|
|
126523
|
-
},
|
|
126524
|
-
_squareRectangleRenderItem: function _squareRectangleRenderItem(seriesSpace, defaultColor, colorGroup, _this, cubeType, colorIndex) {
|
|
126525
|
-
return function (params, api) {
|
|
126526
|
-
var location = api.coord([api.value(0), api.value(1)]);
|
|
126527
|
-
var fillColor = defaultColor || colorGroup[colorIndex];
|
|
126528
|
-
|
|
126529
|
-
if (_this.highlightOptions && _this.highlightOptions.length > 0) {
|
|
126530
|
-
var matchData = _this.highlightOptions.find(function (item) {
|
|
126531
|
-
return item.seriesIndex.includes(params.seriesIndex) && item.dataIndex === params.dataIndex;
|
|
126532
|
-
});
|
|
126533
|
-
|
|
126534
|
-
if (matchData && (matchData.color || _this.highlightColor)) {
|
|
126535
|
-
fillColor = matchData.color || _this.highlightColor;
|
|
126536
|
-
}
|
|
126537
|
-
}
|
|
126538
|
-
|
|
126539
|
-
var leftColor, rightColor, topColor;
|
|
126540
|
-
|
|
126541
|
-
if (typeof fillColor === 'object') {
|
|
126542
|
-
var copyLeftColor = (0, _lodash5.default)(fillColor);
|
|
126543
|
-
var copyRightColor = (0, _lodash5.default)(fillColor);
|
|
126544
|
-
var copyTopColor = (0, _lodash5.default)(fillColor);
|
|
126545
|
-
copyLeftColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyLeftColor.colorStops[0].color, 0.4);
|
|
126546
|
-
copyLeftColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyLeftColor.colorStops[1].color, 0.4);
|
|
126547
|
-
copyRightColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyRightColor.colorStops[0].color, 0.7);
|
|
126548
|
-
copyRightColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyRightColor.colorStops[1].color, 0.7);
|
|
126549
|
-
copyTopColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyTopColor.colorStops[0].color, 0.85);
|
|
126550
|
-
copyTopColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyTopColor.colorStops[1].color, 0.85);
|
|
126551
|
-
leftColor = copyLeftColor;
|
|
126552
|
-
rightColor = copyRightColor;
|
|
126553
|
-
topColor = copyTopColor;
|
|
126554
|
-
} else {
|
|
126555
|
-
leftColor = (0, _util.getColorWithOpacity)(fillColor, 0.4);
|
|
126556
|
-
rightColor = (0, _util.getColorWithOpacity)(fillColor, 0.7);
|
|
126557
|
-
topColor = (0, _util.getColorWithOpacity)(fillColor, 0.85);
|
|
126558
|
-
}
|
|
126559
|
-
|
|
126560
|
-
return {
|
|
126561
|
-
type: 'group',
|
|
126562
|
-
children: [{
|
|
126563
|
-
type: "Cube" + cubeType + "Left",
|
|
126564
|
-
shape: {
|
|
126565
|
-
api: api,
|
|
126566
|
-
xValue: api.value(0),
|
|
126567
|
-
yValue: api.value(1),
|
|
126568
|
-
x: location[0] + seriesSpace,
|
|
126569
|
-
y: location[1],
|
|
126570
|
-
bottomYAxis: api.coord([api.value(0), 0])[1]
|
|
126571
|
-
},
|
|
126572
|
-
style: {
|
|
126573
|
-
fill: leftColor
|
|
126574
|
-
}
|
|
126575
|
-
}, {
|
|
126576
|
-
type: "Cube" + cubeType + "Right",
|
|
126577
|
-
shape: {
|
|
126578
|
-
api: api,
|
|
126579
|
-
xValue: api.value(0),
|
|
126580
|
-
yValue: api.value(1),
|
|
126581
|
-
x: location[0] + seriesSpace,
|
|
126582
|
-
y: location[1],
|
|
126583
|
-
bottomYAxis: api.coord([api.value(0), 0])[1]
|
|
126584
|
-
},
|
|
126585
|
-
style: {
|
|
126586
|
-
fill: rightColor
|
|
126587
|
-
}
|
|
126588
|
-
}, {
|
|
126589
|
-
type: "Cube" + cubeType + "Top",
|
|
126590
|
-
shape: {
|
|
126591
|
-
api: api,
|
|
126592
|
-
xValue: api.value(0),
|
|
126593
|
-
yValue: api.value(1),
|
|
126594
|
-
x: location[0] + seriesSpace,
|
|
126595
|
-
y: location[1],
|
|
126596
|
-
bottomYAxis: api.coord([api.value(0), 0])[1]
|
|
126597
|
-
},
|
|
126598
|
-
style: {
|
|
126599
|
-
fill: topColor
|
|
126600
|
-
}
|
|
126601
|
-
}]
|
|
126602
|
-
};
|
|
126603
|
-
};
|
|
126604
|
-
},
|
|
126605
|
-
getSericeSpace: function getSericeSpace(sameYFieldSeriesCount, baseSpace, seriesSpaceCount) {
|
|
126606
|
-
if (sameYFieldSeriesCount % 2 === 0) {
|
|
126607
|
-
return seriesSpaceCount * baseSpace + baseSpace / 2;
|
|
126608
|
-
} else {
|
|
126609
|
-
return seriesSpaceCount * baseSpace;
|
|
126610
|
-
}
|
|
126611
|
-
},
|
|
126612
|
-
getSameYFieldSeriesCount: function getSameYFieldSeriesCount(series) {
|
|
126613
|
-
var firstSeriesName = series[0].name.split('-')[1];
|
|
126614
|
-
var seriesCount = 0;
|
|
126615
|
-
|
|
126616
|
-
for (var _iterator = _createForOfIteratorHelperLoose(series), _step; !(_step = _iterator()).done;) {
|
|
126617
|
-
var serie = _step.value;
|
|
126618
|
-
var serieNname = serie.name.split('-')[1];
|
|
126619
|
-
|
|
126620
|
-
if (firstSeriesName === serieNname) {
|
|
126621
|
-
seriesCount += 1;
|
|
126622
|
-
} else {
|
|
126623
|
-
return seriesCount;
|
|
126624
|
-
}
|
|
126625
|
-
}
|
|
126626
|
-
|
|
126627
|
-
return seriesCount;
|
|
126628
|
-
},
|
|
126629
|
-
_createRingShineSeries: function _createRingShineSeries(series, optionsSeries) {
|
|
126630
|
-
var _this11 = this;
|
|
126631
|
-
|
|
126632
|
-
if (optionsSeries) {
|
|
126633
|
-
this.datasetOptions.forEach(function (datasetOption, index) {
|
|
126634
|
-
var _ref5 = optionsSeries[index] || {},
|
|
126635
|
-
type = _ref5.type,
|
|
126636
|
-
outerGap = _ref5.outerGap,
|
|
126637
|
-
isShine = _ref5.isShine;
|
|
126638
|
-
|
|
126639
|
-
if (type === 'pie' && outerGap >= 0) {
|
|
126640
|
-
var data = series[index].data.map(function (val) {
|
|
126641
|
-
return val.value;
|
|
126642
|
-
});
|
|
126643
|
-
outerGap = outerGap || Math.min.apply(null, data) / 5;
|
|
126644
|
-
series[index].data = _this11._createRingShineDataOption(series[index].data, outerGap, isShine);
|
|
126645
|
-
delete optionsSeries[index].outerGap;
|
|
126646
|
-
delete optionsSeries[index].isShine;
|
|
126647
|
-
}
|
|
126648
|
-
});
|
|
126649
|
-
}
|
|
126650
|
-
|
|
126651
|
-
return series;
|
|
126652
|
-
},
|
|
126653
|
-
_createRingShineDataOption: function _createRingShineDataOption(data, outerGap, isShine) {
|
|
126654
|
-
if (!data) {
|
|
126655
|
-
return;
|
|
126656
|
-
}
|
|
126657
|
-
|
|
126658
|
-
var colors = this._handlerColorGroup(data.length);
|
|
126659
|
-
|
|
126660
|
-
var gapItem = {
|
|
126661
|
-
value: outerGap,
|
|
126662
|
-
name: '',
|
|
126663
|
-
itemStyle: {
|
|
126664
|
-
normal: {
|
|
126665
|
-
label: {
|
|
126666
|
-
show: false
|
|
126667
|
-
},
|
|
126668
|
-
labelLine: {
|
|
126669
|
-
show: false
|
|
126670
|
-
},
|
|
126671
|
-
color: 'rgba(0, 0, 0, 0)',
|
|
126672
|
-
borderColor: 'rgba(0, 0, 0, 0)',
|
|
126673
|
-
borderWidth: 0
|
|
126674
|
-
}
|
|
126675
|
-
}
|
|
126676
|
-
};
|
|
126677
|
-
var result = [];
|
|
126678
|
-
|
|
126679
|
-
for (var i = 0; i < data.length; i++) {
|
|
126680
|
-
var dataItem = {
|
|
126681
|
-
value: data[i].value,
|
|
126682
|
-
name: data[i].name
|
|
126683
|
-
};
|
|
126684
|
-
|
|
126685
|
-
if (isShine) {
|
|
126686
|
-
dataItem.itemStyle = {
|
|
126687
|
-
borderWidth: 5,
|
|
126688
|
-
shadowBlur: 10,
|
|
126689
|
-
color: colors[i],
|
|
126690
|
-
borderColor: colors[i],
|
|
126691
|
-
shadowColor: colors[i]
|
|
126692
|
-
};
|
|
126693
|
-
}
|
|
126694
|
-
|
|
126695
|
-
result.push(dataItem);
|
|
126860
|
+
_this7.hideLoading(); // 缓存dataSeriesCache,请求后格式化成echart的数据
|
|
126696
126861
|
|
|
126697
|
-
if (data.length > 1) {
|
|
126698
|
-
result.push(gapItem);
|
|
126699
|
-
}
|
|
126700
|
-
}
|
|
126701
126862
|
|
|
126702
|
-
|
|
126703
|
-
|
|
126704
|
-
_createRingShineHighlight: function _createRingShineHighlight(series, highlightOptions, color) {
|
|
126705
|
-
if (color === void 0) {
|
|
126706
|
-
color = this.highlightColor;
|
|
126707
|
-
}
|
|
126863
|
+
_this7.dataSeriesCache = Object.assign({}, options);
|
|
126864
|
+
_this7.datasetChange = false; // 设置echartOptions
|
|
126708
126865
|
|
|
126709
|
-
|
|
126710
|
-
series = series.map(function (serie, seriesIndex) {
|
|
126711
|
-
var dataIndexs = highlightOptions.map(function (item) {
|
|
126712
|
-
if (item.seriesIndex && item.seriesIndex.includes(seriesIndex)) {
|
|
126713
|
-
return item.dataIndex;
|
|
126714
|
-
}
|
|
126715
|
-
});
|
|
126716
|
-
var colors = highlightOptions.map(function (item) {
|
|
126717
|
-
if (item.seriesIndex && item.seriesIndex.includes(seriesIndex)) {
|
|
126718
|
-
return item.color || color;
|
|
126719
|
-
}
|
|
126720
|
-
});
|
|
126721
|
-
var serieDatas = serie && serie.data || [];
|
|
126722
|
-
dataIndexs.forEach(function (dataIndex, index) {
|
|
126723
|
-
serieDatas[dataIndex].itemStyle.color = colors[index];
|
|
126724
|
-
serieDatas[dataIndex].itemStyle.borderColor = colors[index];
|
|
126725
|
-
serieDatas[dataIndex].itemStyle.shadowColor = colors[index];
|
|
126726
|
-
});
|
|
126727
|
-
return serie;
|
|
126866
|
+
_this7.echartOptions = _this7._optionsHandler(echartOptions, options);
|
|
126728
126867
|
});
|
|
126729
|
-
return series;
|
|
126730
126868
|
},
|
|
126731
126869
|
_handlerColorGroup: function _handlerColorGroup(serielDataLength) {
|
|
126732
126870
|
if (typeof this.colorGroupsData[0] === 'object') {
|
|
@@ -126738,18 +126876,23 @@ var _default2 = exports.default = {
|
|
|
126738
126876
|
// 控制label显示条数
|
|
126739
126877
|
_controlLabel: function _controlLabel(normalLabel, maxLabels) {
|
|
126740
126878
|
if (normalLabel && normalLabel.show && maxLabels) {
|
|
126741
|
-
var endNormalLabel = (0,
|
|
126879
|
+
var endNormalLabel = (0, _lodash4.default)(normalLabel);
|
|
126742
126880
|
var formatMode;
|
|
126743
126881
|
|
|
126744
126882
|
if (endNormalLabel.formatter && typeof endNormalLabel.formatter === 'string') {
|
|
126745
126883
|
formatMode = endNormalLabel.formatter;
|
|
126746
|
-
}
|
|
126747
|
-
|
|
126748
|
-
|
|
126749
|
-
|
|
126750
|
-
|
|
126751
|
-
|
|
126752
|
-
|
|
126884
|
+
} else if (endNormalLabel.originFormatter) {
|
|
126885
|
+
formatMode = endNormalLabel.originFormatter;
|
|
126886
|
+
}
|
|
126887
|
+
|
|
126888
|
+
endNormalLabel.formatter = function (_ref2) {
|
|
126889
|
+
var dataIndex = _ref2.dataIndex,
|
|
126890
|
+
value = _ref2.value,
|
|
126891
|
+
name = _ref2.name,
|
|
126892
|
+
percent = _ref2.percent;
|
|
126893
|
+
name = (0, _util.getDecimalsFormatterVal)(name, normalLabel.xFieldDecimals);
|
|
126894
|
+
value = (0, _util.getDecimalsFormatterVal)(value, normalLabel.decimals);
|
|
126895
|
+
percent = (0, _util.getDecimalsFormatterVal)(percent, normalLabel.decimals);
|
|
126753
126896
|
var FORMATTER_MAP = {
|
|
126754
126897
|
'{b}: {c}': name + ": " + value,
|
|
126755
126898
|
'{b}': "" + name,
|
|
@@ -126928,7 +127071,7 @@ var _default2 = exports.default = {
|
|
|
126928
127071
|
}
|
|
126929
127072
|
},
|
|
126930
127073
|
showDetailInfo: function showDetailInfo(feature) {
|
|
126931
|
-
var
|
|
127074
|
+
var _this8 = this;
|
|
126932
127075
|
|
|
126933
127076
|
var coordinates = ((feature || {}).geometry || {}).coordinates;
|
|
126934
127077
|
var hasCoordinates = coordinates && !!coordinates.length;
|
|
@@ -126941,8 +127084,8 @@ var _default2 = exports.default = {
|
|
|
126941
127084
|
var propsData = this.generateTableData(properties);
|
|
126942
127085
|
this.tablePopupProps = (0, _extends2.default)({}, propsData);
|
|
126943
127086
|
this.$nextTick(function () {
|
|
126944
|
-
|
|
126945
|
-
return (0, _util.setPopupArrowStyle)(
|
|
127087
|
+
_this8.viewModel.setPopupContent(_coordinates, _this8.$refs.chartTablePopup.$el, function () {
|
|
127088
|
+
return (0, _util.setPopupArrowStyle)(_this8.tablePopupBgData);
|
|
126946
127089
|
});
|
|
126947
127090
|
});
|
|
126948
127091
|
} else {
|
|
@@ -126995,13 +127138,13 @@ var _default2 = exports.default = {
|
|
|
126995
127138
|
}
|
|
126996
127139
|
},
|
|
126997
127140
|
registerShape: function registerShape() {
|
|
126998
|
-
var
|
|
127141
|
+
var _this9 = this;
|
|
126999
127142
|
|
|
127000
127143
|
this.datasetOptions && this.options.series && this.datasetOptions.forEach(function (item, index) {
|
|
127001
|
-
var graphicIntance =
|
|
127144
|
+
var graphicIntance = _this9.$options.graphic;
|
|
127002
127145
|
|
|
127003
127146
|
if (item.seriesType === '2.5Bar') {
|
|
127004
|
-
var cubeType =
|
|
127147
|
+
var cubeType = _this9.options.series[index].shape;
|
|
127005
127148
|
|
|
127006
127149
|
if (graphicIntance.getShapeClass("Cube" + cubeType + "Left")) {
|
|
127007
127150
|
return;
|
|
@@ -127139,14 +127282,14 @@ var _default2 = exports.default = {
|
|
|
127139
127282
|
};
|
|
127140
127283
|
},
|
|
127141
127284
|
spinPoint: function spinPoint(angle, spinAngle, effectColor, radius) {
|
|
127142
|
-
var
|
|
127285
|
+
var _this10 = this;
|
|
127143
127286
|
|
|
127144
127287
|
return function (params, api) {
|
|
127145
127288
|
var x0 = api.getWidth() / 2;
|
|
127146
127289
|
var y0 = api.getHeight() / 2;
|
|
127147
127290
|
var r = Math.min(api.getWidth(), api.getHeight()) / 2 * radius;
|
|
127148
127291
|
|
|
127149
|
-
var point =
|
|
127292
|
+
var point = _this10.getCirlPoint(x0, y0, r, angle + spinAngle);
|
|
127150
127293
|
|
|
127151
127294
|
return {
|
|
127152
127295
|
type: 'circle',
|
|
@@ -127205,19 +127348,19 @@ var _default2 = exports.default = {
|
|
|
127205
127348
|
}
|
|
127206
127349
|
},
|
|
127207
127350
|
startEffect: function startEffect() {
|
|
127208
|
-
var
|
|
127351
|
+
var _this11 = this;
|
|
127209
127352
|
|
|
127210
127353
|
var angle = 0;
|
|
127211
127354
|
this.startSpin = setInterval(function () {
|
|
127212
|
-
if (!
|
|
127355
|
+
if (!_this11.options.series) {
|
|
127213
127356
|
return;
|
|
127214
127357
|
}
|
|
127215
127358
|
|
|
127216
|
-
if (
|
|
127217
|
-
|
|
127359
|
+
if (_this11.options.series[0].customType === 'customRingsSeries') {
|
|
127360
|
+
_this11.customSeries = [];
|
|
127218
127361
|
angle += 3;
|
|
127219
127362
|
|
|
127220
|
-
|
|
127363
|
+
_this11.addEffect(angle);
|
|
127221
127364
|
}
|
|
127222
127365
|
}, 100);
|
|
127223
127366
|
},
|
|
@@ -128421,6 +128564,8 @@ var iPortalDataService = exports.default = /*#__PURE__*/function (_Events) {
|
|
|
128421
128564
|
featureResults = data.features;
|
|
128422
128565
|
|
|
128423
128566
|
if (data.numberMatched < maxFeatures) {
|
|
128567
|
+
featureResults = _this4._transformContentFeatures(featureResults);
|
|
128568
|
+
|
|
128424
128569
|
_this4.iserverService._getFeaturesSucceed({
|
|
128425
128570
|
result: {
|
|
128426
128571
|
features: {
|
|
@@ -128444,6 +128589,7 @@ var iPortalDataService = exports.default = /*#__PURE__*/function (_Events) {
|
|
|
128444
128589
|
results.forEach(function (result) {
|
|
128445
128590
|
featureResults = featureResults.concat(result.features);
|
|
128446
128591
|
});
|
|
128592
|
+
featureResults = _this4._transformContentFeatures(featureResults);
|
|
128447
128593
|
|
|
128448
128594
|
_this4.iserverService._getFeaturesSucceed({
|
|
128449
128595
|
result: {
|
|
@@ -153302,25 +153448,6 @@ function isIndex(value, length) {
|
|
|
153302
153448
|
module.exports = isIndex;
|
|
153303
153449
|
|
|
153304
153450
|
|
|
153305
|
-
/***/ }),
|
|
153306
|
-
|
|
153307
|
-
/***/ "wMDX":
|
|
153308
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
153309
|
-
|
|
153310
|
-
"use strict";
|
|
153311
|
-
|
|
153312
|
-
// EXPORTS
|
|
153313
|
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ render; });
|
|
153314
|
-
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ staticRenderFns; });
|
|
153315
|
-
|
|
153316
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/chart/ChartMixin.vue?vue&type=template&id=26d34c92&
|
|
153317
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('sm-collapse-card',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"}],staticClass:"sm-component-chart",attrs:{"icon-class":_vm.iconClass,"icon-position":_vm.position,"header-name":_vm.headerName,"auto-rotate":_vm.autoRotate,"collapsed":_vm.collapsed,"split-line":_vm.splitLine}},[_c('v-chart',{ref:_vm.chartId,style:(_vm._chartStyle),attrs:{"id":_vm.chartId,"options":_vm._chartOptions,"initOptions":_vm.initOptions,"group":_vm.group,"manual-update":_vm.manualUpdate,"theme":_vm.theme || _vm.chartTheme},on:{"datazoom":_vm.dataZoomHandler}}),_vm._v(" "),_c('TablePopup',_vm._b({directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"chartTablePopup",attrs:{"split-line":_vm.splitLine,"text-color":_vm.textColor,"background":_vm.background}},'TablePopup',_vm.tablePopupProps,false))],1)}
|
|
153318
|
-
var staticRenderFns = []
|
|
153319
|
-
|
|
153320
|
-
|
|
153321
|
-
// CONCATENATED MODULE: ./src/common/chart/ChartMixin.vue?vue&type=template&id=26d34c92&
|
|
153322
|
-
|
|
153323
|
-
|
|
153324
153451
|
/***/ }),
|
|
153325
153452
|
|
|
153326
153453
|
/***/ "wOTH":
|
|
@@ -162223,13 +162350,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
162223
162350
|
exports.getProjection = getProjection;
|
|
162224
162351
|
exports.registerProjection = registerProjection;
|
|
162225
162352
|
exports.toEpsgCode = toEpsgCode;
|
|
162353
|
+
exports.transformCoodinates = transformCoodinates;
|
|
162354
|
+
exports.transformCoordinate = transformCoordinate;
|
|
162226
162355
|
|
|
162227
162356
|
var _util = __webpack_require__("e7LN");
|
|
162228
162357
|
|
|
162229
162358
|
var _proj = _interopRequireDefault(__webpack_require__("p5/s"));
|
|
162230
162359
|
|
|
162231
|
-
function defineProjection(epsgCode, projection) {
|
|
162232
|
-
if (_proj.default.defs(epsgCode)) {
|
|
162360
|
+
function defineProjection(epsgCode, projection, isCover) {
|
|
162361
|
+
if (_proj.default.defs(epsgCode) && !isCover) {
|
|
162233
162362
|
return;
|
|
162234
162363
|
}
|
|
162235
162364
|
|
|
@@ -162241,18 +162370,18 @@ function defineProjection(epsgCode, projection) {
|
|
|
162241
162370
|
_proj.default.defs(epsgCode, projection);
|
|
162242
162371
|
}
|
|
162243
162372
|
|
|
162244
|
-
function registerProjection(epsgKey, epsgValue) {
|
|
162373
|
+
function registerProjection(epsgKey, epsgValue, isCover) {
|
|
162245
162374
|
if ((0, _util.getDataType)(arguments[0]) === '[object Object]' && arguments.length === 1) {
|
|
162246
162375
|
var projections = arguments[0];
|
|
162247
162376
|
|
|
162248
162377
|
for (var epsgCode in projections) {
|
|
162249
|
-
defineProjection(epsgCode, projections[epsgCode]);
|
|
162378
|
+
defineProjection(epsgCode, projections[epsgCode], isCover);
|
|
162250
162379
|
}
|
|
162251
162380
|
|
|
162252
162381
|
return;
|
|
162253
162382
|
}
|
|
162254
162383
|
|
|
162255
|
-
defineProjection(epsgKey, epsgValue);
|
|
162384
|
+
defineProjection(epsgKey, epsgValue, isCover);
|
|
162256
162385
|
}
|
|
162257
162386
|
|
|
162258
162387
|
function getProjection(epsgKey) {
|
|
@@ -162288,6 +162417,45 @@ function toEpsgCode(wkt) {
|
|
|
162288
162417
|
}
|
|
162289
162418
|
}
|
|
162290
162419
|
|
|
162420
|
+
function transformCoodinates(_ref) {
|
|
162421
|
+
var coordinates = _ref.coordinates,
|
|
162422
|
+
sourceProjection = _ref.sourceProjection,
|
|
162423
|
+
_ref$destProjection = _ref.destProjection,
|
|
162424
|
+
destProjection = _ref$destProjection === void 0 ? 'EPSG:4326' : _ref$destProjection;
|
|
162425
|
+
|
|
162426
|
+
try {
|
|
162427
|
+
return (0, _proj.default)(sourceProjection, destProjection, coordinates);
|
|
162428
|
+
} catch (error) {
|
|
162429
|
+
var errorMsg = error + " is not defined";
|
|
162430
|
+
throw errorMsg;
|
|
162431
|
+
}
|
|
162432
|
+
}
|
|
162433
|
+
|
|
162434
|
+
function transformCoordinate(fromProjection, toProjection, coordinates) {
|
|
162435
|
+
if (fromProjection === toProjection) return coordinates;
|
|
162436
|
+
|
|
162437
|
+
if (fromProjection === 'EPSG:4490' && toProjection === 'EPSG:4326' || fromProjection === 'EPSG:4326' && toProjection === 'EPSG:4490') {
|
|
162438
|
+
return coordinates;
|
|
162439
|
+
} // proj4缺陷,EPSG:4214的坐标x为180,转换后变成-179.
|
|
162440
|
+
|
|
162441
|
+
|
|
162442
|
+
if (fromProjection === 'EPSG:4214' && toProjection === 'EPSG:4326' && coordinates[0] === 180) {
|
|
162443
|
+
var newCoordinate = transformCoodinates({
|
|
162444
|
+
coordinates: coordinates,
|
|
162445
|
+
sourceProjection: fromProjection,
|
|
162446
|
+
destProjection: toProjection
|
|
162447
|
+
});
|
|
162448
|
+
newCoordinate[0] = 180;
|
|
162449
|
+
return newCoordinate;
|
|
162450
|
+
}
|
|
162451
|
+
|
|
162452
|
+
return transformCoodinates({
|
|
162453
|
+
coordinates: coordinates,
|
|
162454
|
+
sourceProjection: fromProjection,
|
|
162455
|
+
destProjection: toProjection
|
|
162456
|
+
});
|
|
162457
|
+
}
|
|
162458
|
+
|
|
162291
162459
|
/***/ }),
|
|
162292
162460
|
|
|
162293
162461
|
/***/ "ymVN":
|