@supermapgis/vue-iclient-leaflet 11.3.0 → 12.0.0-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 +2 -2
- package/dist/iclient-leaflet-vue.js +941 -808
- package/dist/iclient-leaflet-vue.min.css +2 -2
- package/dist/iclient-leaflet-vue.min.js +10 -10
- package/lib/_lang/en.js +4 -3
- package/lib/_lang/index.js +23 -23
- package/lib/_lang/zh.js +4 -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 +22 -7
- package/lib/_utils/get-features.js +6 -6
- package/lib/_utils/global-event.js +2 -2
- package/lib/_utils/iPortalDataService.js +4 -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/_lang/en.js +2 -1
- package/src/common/_lang/zh.js +2 -1
- package/src/common/_utils/epsg-define.js +14 -5
- 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.0-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: '视频加载中...'
|
|
@@ -65013,7 +65045,7 @@ module.exports = function (it) {
|
|
|
65013
65045
|
|
|
65014
65046
|
"use strict";
|
|
65015
65047
|
__webpack_require__.r(__webpack_exports__);
|
|
65016
|
-
/* harmony import */ var
|
|
65048
|
+
/* harmony import */ var _ChartMixin_vue_vue_type_template_id_319961f0___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GDn5");
|
|
65017
65049
|
/* harmony import */ var _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6sEm");
|
|
65018
65050
|
/* 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
65051
|
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("KHd+");
|
|
@@ -65026,8 +65058,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
65026
65058
|
|
|
65027
65059
|
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
|
|
65028
65060
|
_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
65029
|
-
|
|
65030
|
-
|
|
65061
|
+
_ChartMixin_vue_vue_type_template_id_319961f0___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
|
|
65062
|
+
_ChartMixin_vue_vue_type_template_id_319961f0___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
|
|
65031
65063
|
false,
|
|
65032
65064
|
null,
|
|
65033
65065
|
null,
|
|
@@ -87326,6 +87358,780 @@ var _default = exports.default = {
|
|
|
87326
87358
|
|
|
87327
87359
|
/***/ }),
|
|
87328
87360
|
|
|
87361
|
+
/***/ "Vpug":
|
|
87362
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
87363
|
+
|
|
87364
|
+
"use strict";
|
|
87365
|
+
|
|
87366
|
+
|
|
87367
|
+
var _interopRequireDefault = __webpack_require__("TqRt");
|
|
87368
|
+
|
|
87369
|
+
Object.defineProperty(exports, "__esModule", {
|
|
87370
|
+
value: true
|
|
87371
|
+
});
|
|
87372
|
+
exports.default = void 0;
|
|
87373
|
+
|
|
87374
|
+
var _chart = __webpack_require__("gzXh");
|
|
87375
|
+
|
|
87376
|
+
var _lodash = _interopRequireDefault(__webpack_require__("zT9C"));
|
|
87377
|
+
|
|
87378
|
+
var _lodash2 = _interopRequireDefault(__webpack_require__("2oH+"));
|
|
87379
|
+
|
|
87380
|
+
var _util = __webpack_require__("e7LN");
|
|
87381
|
+
|
|
87382
|
+
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."); }
|
|
87383
|
+
|
|
87384
|
+
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; } }
|
|
87385
|
+
|
|
87386
|
+
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; }
|
|
87387
|
+
|
|
87388
|
+
var _default = exports.default = {
|
|
87389
|
+
methods: {
|
|
87390
|
+
_optionsHandler: function _optionsHandler(options, dataOptions, dataZoomChanged) {
|
|
87391
|
+
dataOptions = dataOptions && (0, _lodash.default)(dataOptions); // clone 避免引起重复刷新
|
|
87392
|
+
|
|
87393
|
+
options = options && (0, _lodash.default)(options); // clone 避免引起重复刷新
|
|
87394
|
+
|
|
87395
|
+
var extraSeries = [];
|
|
87396
|
+
|
|
87397
|
+
if (options && options.legend && !options.legend.type) {
|
|
87398
|
+
options.legend.type = 'scroll';
|
|
87399
|
+
}
|
|
87400
|
+
|
|
87401
|
+
var yAxis = options.yAxis;
|
|
87402
|
+
var xAxis = options.xAxis;
|
|
87403
|
+
|
|
87404
|
+
if (xAxis && dataOptions.xAxis) {
|
|
87405
|
+
this.handleAxis(options, dataOptions, xAxis, yAxis);
|
|
87406
|
+
}
|
|
87407
|
+
|
|
87408
|
+
if (options && options.series && dataOptions.series) {
|
|
87409
|
+
this.handleSeries(dataOptions, options, dataZoomChanged, extraSeries);
|
|
87410
|
+
}
|
|
87411
|
+
|
|
87412
|
+
if (options && options.radar && dataOptions.radar) {
|
|
87413
|
+
options.radar.indicator = Object.assign({}, dataOptions.radar.indicator || {});
|
|
87414
|
+
|
|
87415
|
+
this._handleRadarAxisLabelFormatter(options);
|
|
87416
|
+
}
|
|
87417
|
+
|
|
87418
|
+
var series = dataOptions.series;
|
|
87419
|
+
var isRingShine = options.series && options.series[0] && options.series[0].outerGap >= 0;
|
|
87420
|
+
|
|
87421
|
+
if (series && series.length && series[0].type === 'pie') {
|
|
87422
|
+
this.setItemStyleColor(false, series);
|
|
87423
|
+
}
|
|
87424
|
+
|
|
87425
|
+
if (isRingShine) {
|
|
87426
|
+
dataOptions.series = this._createRingShineSeries(series, options.series);
|
|
87427
|
+
}
|
|
87428
|
+
|
|
87429
|
+
if (this.highlightOptions && this.highlightOptions.length > 0) {
|
|
87430
|
+
if (isRingShine) {
|
|
87431
|
+
dataOptions.series = this._createRingShineHighlight(series, this.highlightOptions);
|
|
87432
|
+
} else {
|
|
87433
|
+
this.setItemStyleColor(true, series);
|
|
87434
|
+
}
|
|
87435
|
+
}
|
|
87436
|
+
|
|
87437
|
+
var mergeOptions = (0, _lodash2.default)(options, dataOptions);
|
|
87438
|
+
|
|
87439
|
+
if (extraSeries.length > 0) {
|
|
87440
|
+
var _mergeOptions$series;
|
|
87441
|
+
|
|
87442
|
+
(_mergeOptions$series = mergeOptions.series).push.apply(_mergeOptions$series, extraSeries);
|
|
87443
|
+
}
|
|
87444
|
+
|
|
87445
|
+
return mergeOptions;
|
|
87446
|
+
},
|
|
87447
|
+
handleAxis: function handleAxis(options, dataOptions, xAxis, yAxis) {
|
|
87448
|
+
var axis = xAxis;
|
|
87449
|
+
var axisData = dataOptions.xAxis[0];
|
|
87450
|
+
var type = 'xAxis';
|
|
87451
|
+
|
|
87452
|
+
if (yAxis && yAxis.type === 'category') {
|
|
87453
|
+
// 处理条形图
|
|
87454
|
+
type = 'yAxis';
|
|
87455
|
+
axis = yAxis;
|
|
87456
|
+
dataOptions.yAxis = dataOptions.xAxis;
|
|
87457
|
+
delete dataOptions.xAxis;
|
|
87458
|
+
|
|
87459
|
+
this._initAxisLabel(yAxis.axisLabel, yAxis.decimals, dataOptions.yAxis[0].data, options.visualMap, dataOptions.series);
|
|
87460
|
+
|
|
87461
|
+
delete options.yAxis.decimals;
|
|
87462
|
+
}
|
|
87463
|
+
|
|
87464
|
+
if (dataOptions.series.length === 0) {
|
|
87465
|
+
axis = [{}];
|
|
87466
|
+
} else if (!Array.isArray(axis)) {
|
|
87467
|
+
if (axisData.data && axisData.data.length) {
|
|
87468
|
+
axis.data = [];
|
|
87469
|
+
}
|
|
87470
|
+
|
|
87471
|
+
axis = [Object.assign({}, axisData, axis)];
|
|
87472
|
+
}
|
|
87473
|
+
|
|
87474
|
+
options[type] = axis;
|
|
87475
|
+
},
|
|
87476
|
+
handleSeries: function handleSeries(dataOptions, options, dataZoomChanged, extraSeries) {
|
|
87477
|
+
if (dataOptions.series.length === 0) {
|
|
87478
|
+
options.series = [];
|
|
87479
|
+
} else {
|
|
87480
|
+
options.series = options.series.map(function (element, index) {
|
|
87481
|
+
return Object.assign({}, element, dataOptions.series[index] || {});
|
|
87482
|
+
});
|
|
87483
|
+
var parallelShowNumber = this.getParallelShowNumber(options.series);
|
|
87484
|
+
|
|
87485
|
+
if (options.series[0].shape === 'cylinder') {
|
|
87486
|
+
this.setCylinderXAxis(parallelShowNumber, options);
|
|
87487
|
+
}
|
|
87488
|
+
|
|
87489
|
+
this.configureSeries(options, dataOptions, parallelShowNumber, dataZoomChanged, extraSeries); // 玫瑰图多个选中
|
|
87490
|
+
|
|
87491
|
+
if (options.series[0].type === 'pie' && options.series[0].roseType) {
|
|
87492
|
+
options.series = options.series.map(function (serie) {
|
|
87493
|
+
if (!serie.roseType) {
|
|
87494
|
+
serie.roseType = options.series[0].roseType;
|
|
87495
|
+
}
|
|
87496
|
+
|
|
87497
|
+
return serie;
|
|
87498
|
+
});
|
|
87499
|
+
} // pie的图例需要一个扇形是一个图例
|
|
87500
|
+
|
|
87501
|
+
|
|
87502
|
+
if (options.legend && options.series.length > 0 && options.series[0].type === 'pie') {
|
|
87503
|
+
options.legend.data = [];
|
|
87504
|
+
options.series.forEach(function (element) {
|
|
87505
|
+
if (element.data) {
|
|
87506
|
+
var _options$legend$data;
|
|
87507
|
+
|
|
87508
|
+
(_options$legend$data = options.legend.data).push.apply(_options$legend$data, element.data.map(function (item) {
|
|
87509
|
+
return item.name;
|
|
87510
|
+
}));
|
|
87511
|
+
}
|
|
87512
|
+
});
|
|
87513
|
+
}
|
|
87514
|
+
}
|
|
87515
|
+
},
|
|
87516
|
+
configureSeries: function configureSeries(options, dataOptions, parallelShowNumber, dataZoomChanged, extraSeries) {
|
|
87517
|
+
var _this2 = this;
|
|
87518
|
+
|
|
87519
|
+
var dataZoom = options.dataZoom && options.dataZoom[0];
|
|
87520
|
+
var leftRightCount = parallelShowNumber / 2;
|
|
87521
|
+
var baseSpace = 32;
|
|
87522
|
+
var seriesSpace = 0;
|
|
87523
|
+
var seriesSpaceCount = -Math.floor(leftRightCount);
|
|
87524
|
+
var seriesNameTag;
|
|
87525
|
+
var colorIndex = 0;
|
|
87526
|
+
options.series = options.series.map(function (serie, index) {
|
|
87527
|
+
if (parallelShowNumber !== 0) {
|
|
87528
|
+
var serieName = serie.name.substring(serie.name.indexOf('-') + 1);
|
|
87529
|
+
|
|
87530
|
+
if (!seriesNameTag) {
|
|
87531
|
+
seriesNameTag = serieName;
|
|
87532
|
+
seriesSpace = _this2.getSericeSpace(parallelShowNumber, baseSpace, seriesSpaceCount);
|
|
87533
|
+
} else {
|
|
87534
|
+
if (seriesNameTag === serieName) {
|
|
87535
|
+
seriesSpace = _this2.getSericeSpace(parallelShowNumber, baseSpace, seriesSpaceCount);
|
|
87536
|
+
} else {
|
|
87537
|
+
seriesSpaceCount = -Math.floor(leftRightCount);
|
|
87538
|
+
seriesNameTag = serieName;
|
|
87539
|
+
seriesSpace = _this2.getSericeSpace(parallelShowNumber, baseSpace, seriesSpaceCount);
|
|
87540
|
+
colorIndex += 1;
|
|
87541
|
+
}
|
|
87542
|
+
}
|
|
87543
|
+
|
|
87544
|
+
seriesSpaceCount += 1;
|
|
87545
|
+
}
|
|
87546
|
+
|
|
87547
|
+
var label = serie.label && serie.label.normal;
|
|
87548
|
+
|
|
87549
|
+
if (label && !label.smart) {
|
|
87550
|
+
serie.label.normal = _this2._controlLabel(label, serie.maxLabels);
|
|
87551
|
+
}
|
|
87552
|
+
|
|
87553
|
+
if (label && label.show && label.smart) {
|
|
87554
|
+
_this2.handleLabel(label, serie, options, dataZoom, dataZoomChanged);
|
|
87555
|
+
} else if (serie && serie.type !== 'pie' && serie.type !== 'radar') {
|
|
87556
|
+
var colorGroup = (0, _chart.getMultiColorGroup)(_this2.colorGroupsData, _this2.colorNumber);
|
|
87557
|
+
|
|
87558
|
+
if (serie.type === '2.5Bar') {
|
|
87559
|
+
var shape = serie.shape;
|
|
87560
|
+
var defaultColor = serie.itemStyle && serie.itemStyle.color;
|
|
87561
|
+
|
|
87562
|
+
if (['square', 'rectangle'].includes(shape)) {
|
|
87563
|
+
var cubeType = shape;
|
|
87564
|
+
serie.type = 'custom';
|
|
87565
|
+
dataOptions.series[index] && (dataOptions.series[index].type = 'custom');
|
|
87566
|
+
var _this = _this2;
|
|
87567
|
+
serie.renderItem = _this2._squareRectangleRenderItem(seriesSpace, defaultColor, colorGroup, _this, cubeType, colorIndex);
|
|
87568
|
+
} else if (shape === 'cylinder') {
|
|
87569
|
+
_this2.handleCylinder(parallelShowNumber, dataOptions, index, serie, options, defaultColor, colorGroup, extraSeries);
|
|
87570
|
+
}
|
|
87571
|
+
|
|
87572
|
+
delete serie.shape;
|
|
87573
|
+
}
|
|
87574
|
+
}
|
|
87575
|
+
|
|
87576
|
+
return serie;
|
|
87577
|
+
});
|
|
87578
|
+
},
|
|
87579
|
+
handleLabel: function handleLabel(label, serie, options, dataZoom, dataZoomChanged) {
|
|
87580
|
+
label.position = label.position || 'top';
|
|
87581
|
+
var data = serie.data || [];
|
|
87582
|
+
var startDataIndex = 0;
|
|
87583
|
+
var endDataIndex = data.length > 0 ? data.length - 1 : 0;
|
|
87584
|
+
|
|
87585
|
+
if (dataZoom && dataZoom.show !== false) {
|
|
87586
|
+
if (dataZoom.start > dataZoom.end) {
|
|
87587
|
+
var oldStart = dataZoom.start;
|
|
87588
|
+
dataZoom.start = dataZoom.end;
|
|
87589
|
+
dataZoom.end = oldStart;
|
|
87590
|
+
}
|
|
87591
|
+
|
|
87592
|
+
if (dataZoomChanged) {
|
|
87593
|
+
var _ref = this.smChart.chart.getOption().dataZoom[0] || {},
|
|
87594
|
+
startValue = _ref.startValue,
|
|
87595
|
+
endValue = _ref.endValue;
|
|
87596
|
+
|
|
87597
|
+
startDataIndex = startValue;
|
|
87598
|
+
endDataIndex = endValue;
|
|
87599
|
+
options.dataZoom = options.dataZoom.map(function (val) {
|
|
87600
|
+
if (startValue >= 0 && endValue >= 0) {
|
|
87601
|
+
val.startValue = startValue;
|
|
87602
|
+
val.endValue = endValue;
|
|
87603
|
+
delete val.start;
|
|
87604
|
+
delete val.end;
|
|
87605
|
+
return val;
|
|
87606
|
+
}
|
|
87607
|
+
|
|
87608
|
+
return val;
|
|
87609
|
+
});
|
|
87610
|
+
} else {
|
|
87611
|
+
startDataIndex = Math.floor(dataZoom.start / 100 * data.length);
|
|
87612
|
+
endDataIndex = Math.ceil(dataZoom.end / 100 * data.length);
|
|
87613
|
+
}
|
|
87614
|
+
|
|
87615
|
+
data = serie.data.slice(startDataIndex, endDataIndex + 1);
|
|
87616
|
+
}
|
|
87617
|
+
|
|
87618
|
+
label.formatter = function (_ref2) {
|
|
87619
|
+
var dataIndex = _ref2.dataIndex,
|
|
87620
|
+
value = _ref2.value;
|
|
87621
|
+
var result = '';
|
|
87622
|
+
|
|
87623
|
+
if (dataIndex === startDataIndex || dataIndex === endDataIndex || Math.max.apply(null, data) + '' === value + '') {
|
|
87624
|
+
result = (0, _util.getDecimalsFormatterVal)(value, label.decimals);
|
|
87625
|
+
}
|
|
87626
|
+
|
|
87627
|
+
return result;
|
|
87628
|
+
};
|
|
87629
|
+
},
|
|
87630
|
+
handleCylinder: function handleCylinder(parallelShowNumber, dataOptions, index, serie, options, defaultColor, colorGroup, extraSeries) {
|
|
87631
|
+
var _this3 = this;
|
|
87632
|
+
|
|
87633
|
+
serie.type = 'bar';
|
|
87634
|
+
serie.barGap = parallelShowNumber === 0 ? '-100%' : '0';
|
|
87635
|
+
|
|
87636
|
+
if (parallelShowNumber !== 0) {
|
|
87637
|
+
var serieColor = defaultColor || colorGroup[Math.ceil((index + 1) / parallelShowNumber) - 1];
|
|
87638
|
+
|
|
87639
|
+
if (serie.itemStyle) {
|
|
87640
|
+
serie.itemStyle.color = this.setGradientColor(serieColor, '#fff');
|
|
87641
|
+
} else {
|
|
87642
|
+
serie.itemStyle = {};
|
|
87643
|
+
serie.itemStyle.color = this.setGradientColor(serieColor, '#fff');
|
|
87644
|
+
}
|
|
87645
|
+
}
|
|
87646
|
+
|
|
87647
|
+
options.tooltip && options.tooltip.trigger === 'axis' && (options.tooltip.trigger = 'item');
|
|
87648
|
+
dataOptions.series[index] && (dataOptions.series[index].type = 'bar');
|
|
87649
|
+
var colorIndex = parallelShowNumber !== 0 ? Math.ceil((index + 1) / parallelShowNumber) - 1 : index;
|
|
87650
|
+
var cirCleColor = defaultColor || colorGroup[colorIndex];
|
|
87651
|
+
var cirCleColorFnList = [];
|
|
87652
|
+
|
|
87653
|
+
if (typeof cirCleColor === 'string') {
|
|
87654
|
+
cirCleColor = this.setGradientColor(cirCleColor, '#fff');
|
|
87655
|
+
}
|
|
87656
|
+
|
|
87657
|
+
if (this.highlightOptions && this.highlightOptions.length > 0) {
|
|
87658
|
+
var matchDataList = [];
|
|
87659
|
+
this.highlightOptions.forEach(function (item) {
|
|
87660
|
+
if (item.seriesIndex.includes(index)) {
|
|
87661
|
+
var color = item.color || _this3.highlightColor;
|
|
87662
|
+
|
|
87663
|
+
if (typeof color === 'string') {
|
|
87664
|
+
color = _this3.setGradientColor(color, '#fff');
|
|
87665
|
+
}
|
|
87666
|
+
|
|
87667
|
+
matchDataList.push({
|
|
87668
|
+
dataIndex: item.dataIndex,
|
|
87669
|
+
color: color
|
|
87670
|
+
});
|
|
87671
|
+
}
|
|
87672
|
+
});
|
|
87673
|
+
|
|
87674
|
+
if (matchDataList.length > 0) {
|
|
87675
|
+
cirCleColorFnList = ['topCirCleColorFn', 'bottomCirCleColorFn'].map(function () {
|
|
87676
|
+
return function (_ref3) {
|
|
87677
|
+
var dataIndex = _ref3.dataIndex;
|
|
87678
|
+
var matchData = matchDataList.find(function (item) {
|
|
87679
|
+
return item.dataIndex === dataIndex;
|
|
87680
|
+
});
|
|
87681
|
+
return matchData ? matchData.color : cirCleColor;
|
|
87682
|
+
};
|
|
87683
|
+
});
|
|
87684
|
+
}
|
|
87685
|
+
}
|
|
87686
|
+
|
|
87687
|
+
this.handleExtraSeries(parallelShowNumber, dataOptions, index, serie, extraSeries, cirCleColor, cirCleColorFnList);
|
|
87688
|
+
},
|
|
87689
|
+
handleExtraSeries: function handleExtraSeries(parallelShowNumber, dataOptions, index, serie, extraSeries, cirCleColor, cirCleColorFnList) {
|
|
87690
|
+
var baseColumnWidth = parallelShowNumber !== 0 ? 100 / parallelShowNumber + "%" : '100%';
|
|
87691
|
+
var nextSerieDatas = dataOptions.series[index + 1] && dataOptions.series[index + 1].data;
|
|
87692
|
+
var offsetDistance = this.getOffsetDistance(parallelShowNumber, index);
|
|
87693
|
+
var xAxisIndex = parallelShowNumber !== 0 ? Math.ceil((index + 1) / parallelShowNumber) - 1 : 0;
|
|
87694
|
+
serie.xAxisIndex = xAxisIndex;
|
|
87695
|
+
extraSeries.push( // 头部的圆片
|
|
87696
|
+
{
|
|
87697
|
+
name: parallelShowNumber !== 0 ? serie.name : '',
|
|
87698
|
+
type: 'pictorialBar',
|
|
87699
|
+
symbolOffset: parallelShowNumber !== 0 ? [offsetDistance, '-50%'] : [0, -8],
|
|
87700
|
+
xAxisIndex: parallelShowNumber !== 0 ? xAxisIndex : 0,
|
|
87701
|
+
symbolPosition: 'end',
|
|
87702
|
+
z: 12,
|
|
87703
|
+
itemStyle: {
|
|
87704
|
+
normal: {
|
|
87705
|
+
color: cirCleColorFnList[0] || cirCleColor
|
|
87706
|
+
}
|
|
87707
|
+
},
|
|
87708
|
+
data: dataOptions.series[index].data.map(function (item, dataIndex) {
|
|
87709
|
+
if (parallelShowNumber !== 0) {
|
|
87710
|
+
return {
|
|
87711
|
+
value: item,
|
|
87712
|
+
symbolSize: [baseColumnWidth, 15]
|
|
87713
|
+
};
|
|
87714
|
+
} else {
|
|
87715
|
+
return {
|
|
87716
|
+
value: item,
|
|
87717
|
+
symbolSize: !nextSerieDatas || nextSerieDatas[dataIndex] && +item >= +nextSerieDatas[dataIndex] ? [baseColumnWidth, 15] : [0, 15]
|
|
87718
|
+
};
|
|
87719
|
+
}
|
|
87720
|
+
})
|
|
87721
|
+
}, {
|
|
87722
|
+
// 底部的圆片
|
|
87723
|
+
name: parallelShowNumber !== 0 ? serie.name : '',
|
|
87724
|
+
type: 'pictorialBar',
|
|
87725
|
+
xAxisIndex: parallelShowNumber !== 0 ? xAxisIndex : 0,
|
|
87726
|
+
symbolSize: parallelShowNumber !== 0 ? [baseColumnWidth, 10] : [offsetDistance, 10],
|
|
87727
|
+
symbolOffset: parallelShowNumber !== 0 ? [offsetDistance, '50%'] : [0, 5],
|
|
87728
|
+
z: 12,
|
|
87729
|
+
itemStyle: {
|
|
87730
|
+
normal: {
|
|
87731
|
+
color: cirCleColorFnList[1] || cirCleColor
|
|
87732
|
+
}
|
|
87733
|
+
},
|
|
87734
|
+
data: dataOptions.series[index].data
|
|
87735
|
+
});
|
|
87736
|
+
},
|
|
87737
|
+
_handleRadarAxisLabelFormatter: function _handleRadarAxisLabelFormatter(options) {
|
|
87738
|
+
if (typeof options.radar.decimals === 'number') {
|
|
87739
|
+
for (var key in options.radar.indicator) {
|
|
87740
|
+
var item = options.radar.indicator[key];
|
|
87741
|
+
item.text = (0, _util.getDecimalsFormatterVal)(item.text, options.radar.decimals);
|
|
87742
|
+
}
|
|
87743
|
+
|
|
87744
|
+
delete options.radar.decimals;
|
|
87745
|
+
}
|
|
87746
|
+
|
|
87747
|
+
return options;
|
|
87748
|
+
},
|
|
87749
|
+
multipleYField: function multipleYField(optionSeries) {
|
|
87750
|
+
var series = (0, _lodash.default)(optionSeries);
|
|
87751
|
+
var nameList = series.map(function (serie) {
|
|
87752
|
+
if (!serie.name.includes('-')) {
|
|
87753
|
+
return serie.name;
|
|
87754
|
+
}
|
|
87755
|
+
|
|
87756
|
+
var position = serie.name.indexOf('-');
|
|
87757
|
+
var prefix = serie.name.substring(0, position);
|
|
87758
|
+
|
|
87759
|
+
if (isNaN(+prefix)) {
|
|
87760
|
+
return serie.name;
|
|
87761
|
+
}
|
|
87762
|
+
|
|
87763
|
+
return serie.name.substring(position + 1);
|
|
87764
|
+
});
|
|
87765
|
+
return series.length !== new Set(nameList).size;
|
|
87766
|
+
},
|
|
87767
|
+
getParallelShowNumber: function getParallelShowNumber(series) {
|
|
87768
|
+
if (series.length === 0 || !this.multipleYField(series)) {
|
|
87769
|
+
// 0表示不进行并列显示
|
|
87770
|
+
return 0;
|
|
87771
|
+
}
|
|
87772
|
+
|
|
87773
|
+
var parallelShowNumber = 0;
|
|
87774
|
+
var symbolPosition = series[0].name.indexOf('-');
|
|
87775
|
+
var firstSeriesName = series[0].name.substring(symbolPosition + 1);
|
|
87776
|
+
series.forEach(function (option) {
|
|
87777
|
+
var optionName = option.name.substring(symbolPosition + 1);
|
|
87778
|
+
|
|
87779
|
+
if (firstSeriesName === optionName) {
|
|
87780
|
+
parallelShowNumber++;
|
|
87781
|
+
}
|
|
87782
|
+
});
|
|
87783
|
+
return parallelShowNumber;
|
|
87784
|
+
},
|
|
87785
|
+
_initAxisLabel: function _initAxisLabel(axisLabel, decimals, data, visualMap, series) {
|
|
87786
|
+
if (!this.xBar) {
|
|
87787
|
+
return;
|
|
87788
|
+
}
|
|
87789
|
+
|
|
87790
|
+
var sortSeriesIndex = this.datasetOptions.findIndex(function (item) {
|
|
87791
|
+
return item.sort !== 'unsort' && item.rankLabel;
|
|
87792
|
+
});
|
|
87793
|
+
|
|
87794
|
+
if (sortSeriesIndex > -1 && axisLabel && data) {
|
|
87795
|
+
var orderNumLength = data.length.toString().length;
|
|
87796
|
+
|
|
87797
|
+
for (var index = 0, len = data.length, rankIndex = len - 1; index < len; index++, rankIndex--) {
|
|
87798
|
+
var paddedNumber = rankIndex.toString().padStart(orderNumLength, '0');
|
|
87799
|
+
data[index] = "" + paddedNumber + data[index];
|
|
87800
|
+
}
|
|
87801
|
+
|
|
87802
|
+
var firstVisualMap = visualMap && visualMap.find(function (item) {
|
|
87803
|
+
return item.seriesIndex === sortSeriesIndex;
|
|
87804
|
+
});
|
|
87805
|
+
axisLabel.rich = axisLabel.rich || {};
|
|
87806
|
+
axisLabel.rich.default = {
|
|
87807
|
+
backgroundColor: this.getStringColor(this.colorGroup[sortSeriesIndex]),
|
|
87808
|
+
width: 20,
|
|
87809
|
+
height: 20,
|
|
87810
|
+
align: 'center',
|
|
87811
|
+
borderRadius: 2
|
|
87812
|
+
};
|
|
87813
|
+
firstVisualMap && firstVisualMap.pieces.forEach(function (item, index) {
|
|
87814
|
+
axisLabel.rich["color_" + index] = {
|
|
87815
|
+
backgroundColor: item.color,
|
|
87816
|
+
width: 20,
|
|
87817
|
+
height: 20,
|
|
87818
|
+
align: 'center',
|
|
87819
|
+
borderRadius: 2
|
|
87820
|
+
};
|
|
87821
|
+
});
|
|
87822
|
+
var serieData = series && series[sortSeriesIndex].data;
|
|
87823
|
+
|
|
87824
|
+
axisLabel.formatter = function (label, index) {
|
|
87825
|
+
var orderNum = parseInt(label.slice(0, orderNumLength)) + 1;
|
|
87826
|
+
var leftLabel = (0, _util.getDecimalsFormatterVal)(label.slice(orderNumLength), decimals);
|
|
87827
|
+
var labelValue = serieData && +serieData[index];
|
|
87828
|
+
|
|
87829
|
+
if (firstVisualMap) {
|
|
87830
|
+
var matchItemIndex = firstVisualMap.pieces.findIndex(function (item) {
|
|
87831
|
+
var condition = true;
|
|
87832
|
+
|
|
87833
|
+
if (item.min) {
|
|
87834
|
+
condition = condition && labelValue >= item.min;
|
|
87835
|
+
}
|
|
87836
|
+
|
|
87837
|
+
if (item.max) {
|
|
87838
|
+
condition = condition && labelValue <= item.max;
|
|
87839
|
+
}
|
|
87840
|
+
|
|
87841
|
+
if (item.lte) {
|
|
87842
|
+
condition = condition && labelValue <= item.lte;
|
|
87843
|
+
}
|
|
87844
|
+
|
|
87845
|
+
if (item.gte) {
|
|
87846
|
+
condition = condition && labelValue >= item.gte;
|
|
87847
|
+
}
|
|
87848
|
+
|
|
87849
|
+
if (item.lt) {
|
|
87850
|
+
condition = condition && labelValue < item.lt;
|
|
87851
|
+
}
|
|
87852
|
+
|
|
87853
|
+
if (item.gt) {
|
|
87854
|
+
condition = condition && labelValue > item.gt;
|
|
87855
|
+
}
|
|
87856
|
+
|
|
87857
|
+
if (item.value) {
|
|
87858
|
+
condition = condition && labelValue === item.value;
|
|
87859
|
+
}
|
|
87860
|
+
|
|
87861
|
+
return condition;
|
|
87862
|
+
});
|
|
87863
|
+
|
|
87864
|
+
if (matchItemIndex > -1) {
|
|
87865
|
+
return ["{color_" + matchItemIndex + "|" + orderNum + "} " + leftLabel].join('\n');
|
|
87866
|
+
}
|
|
87867
|
+
}
|
|
87868
|
+
|
|
87869
|
+
return ["{default|" + orderNum + "} " + leftLabel].join('\n');
|
|
87870
|
+
};
|
|
87871
|
+
}
|
|
87872
|
+
},
|
|
87873
|
+
_createRingShineSeries: function _createRingShineSeries(series, optionsSeries) {
|
|
87874
|
+
var _this4 = this;
|
|
87875
|
+
|
|
87876
|
+
if (optionsSeries) {
|
|
87877
|
+
this.datasetOptions.forEach(function (datasetOption, index) {
|
|
87878
|
+
var _ref4 = optionsSeries[index] || {},
|
|
87879
|
+
type = _ref4.type,
|
|
87880
|
+
outerGap = _ref4.outerGap,
|
|
87881
|
+
isShine = _ref4.isShine;
|
|
87882
|
+
|
|
87883
|
+
if (type === 'pie' && outerGap >= 0) {
|
|
87884
|
+
var data = series[index].data.map(function (val) {
|
|
87885
|
+
return val.value;
|
|
87886
|
+
});
|
|
87887
|
+
outerGap = outerGap || Math.min.apply(null, data) / 5;
|
|
87888
|
+
series[index].data = _this4._createRingShineDataOption(series[index].data, outerGap, isShine);
|
|
87889
|
+
delete optionsSeries[index].outerGap;
|
|
87890
|
+
delete optionsSeries[index].isShine;
|
|
87891
|
+
}
|
|
87892
|
+
});
|
|
87893
|
+
}
|
|
87894
|
+
|
|
87895
|
+
return series;
|
|
87896
|
+
},
|
|
87897
|
+
_createRingShineDataOption: function _createRingShineDataOption(data, outerGap, isShine) {
|
|
87898
|
+
if (!data) {
|
|
87899
|
+
return;
|
|
87900
|
+
}
|
|
87901
|
+
|
|
87902
|
+
var colors = this._handlerColorGroup(data.length);
|
|
87903
|
+
|
|
87904
|
+
var gapItem = {
|
|
87905
|
+
value: outerGap,
|
|
87906
|
+
name: '',
|
|
87907
|
+
itemStyle: {
|
|
87908
|
+
normal: {
|
|
87909
|
+
label: {
|
|
87910
|
+
show: false
|
|
87911
|
+
},
|
|
87912
|
+
labelLine: {
|
|
87913
|
+
show: false
|
|
87914
|
+
},
|
|
87915
|
+
color: 'rgba(0, 0, 0, 0)',
|
|
87916
|
+
borderColor: 'rgba(0, 0, 0, 0)',
|
|
87917
|
+
borderWidth: 0
|
|
87918
|
+
}
|
|
87919
|
+
}
|
|
87920
|
+
};
|
|
87921
|
+
var result = [];
|
|
87922
|
+
|
|
87923
|
+
for (var i = 0; i < data.length; i++) {
|
|
87924
|
+
var dataItem = {
|
|
87925
|
+
value: data[i].value,
|
|
87926
|
+
name: data[i].name
|
|
87927
|
+
};
|
|
87928
|
+
|
|
87929
|
+
if (isShine) {
|
|
87930
|
+
dataItem.itemStyle = {
|
|
87931
|
+
borderWidth: 5,
|
|
87932
|
+
shadowBlur: 10,
|
|
87933
|
+
color: colors[i],
|
|
87934
|
+
borderColor: colors[i],
|
|
87935
|
+
shadowColor: colors[i]
|
|
87936
|
+
};
|
|
87937
|
+
}
|
|
87938
|
+
|
|
87939
|
+
result.push(dataItem);
|
|
87940
|
+
|
|
87941
|
+
if (data.length > 1) {
|
|
87942
|
+
result.push(gapItem);
|
|
87943
|
+
}
|
|
87944
|
+
}
|
|
87945
|
+
|
|
87946
|
+
return result;
|
|
87947
|
+
},
|
|
87948
|
+
setCylinderXAxis: function setCylinderXAxis(parallelShowNumber, options) {
|
|
87949
|
+
if (parallelShowNumber === 0) {
|
|
87950
|
+
return;
|
|
87951
|
+
}
|
|
87952
|
+
|
|
87953
|
+
var xAixsType = options.xAxis[0] && options.xAxis[0].type;
|
|
87954
|
+
|
|
87955
|
+
for (var i = 1; i <= parallelShowNumber; i++) {
|
|
87956
|
+
options.xAxis.push({
|
|
87957
|
+
type: xAixsType,
|
|
87958
|
+
show: false
|
|
87959
|
+
});
|
|
87960
|
+
}
|
|
87961
|
+
},
|
|
87962
|
+
getOffsetDistance: function getOffsetDistance(parallelShowNumber, index) {
|
|
87963
|
+
if (parallelShowNumber === 0) {
|
|
87964
|
+
return '100%';
|
|
87965
|
+
}
|
|
87966
|
+
|
|
87967
|
+
var distance;
|
|
87968
|
+
|
|
87969
|
+
if (parallelShowNumber % 2) {
|
|
87970
|
+
distance = -100 * Math.floor(parallelShowNumber / 2) + index % parallelShowNumber * 100;
|
|
87971
|
+
return distance + "%";
|
|
87972
|
+
} else {
|
|
87973
|
+
distance = -100 * (Math.floor(parallelShowNumber / 2) - 0.5) + index % parallelShowNumber * 100;
|
|
87974
|
+
}
|
|
87975
|
+
|
|
87976
|
+
return distance + "%";
|
|
87977
|
+
},
|
|
87978
|
+
_squareRectangleRenderItem: function _squareRectangleRenderItem(seriesSpace, defaultColor, colorGroup, _this, cubeType, colorIndex) {
|
|
87979
|
+
return function (params, api) {
|
|
87980
|
+
var location = api.coord([api.value(0), api.value(1)]);
|
|
87981
|
+
var fillColor = defaultColor || colorGroup[colorIndex];
|
|
87982
|
+
|
|
87983
|
+
if (_this.highlightOptions && _this.highlightOptions.length > 0) {
|
|
87984
|
+
var matchData = _this.highlightOptions.find(function (item) {
|
|
87985
|
+
return item.seriesIndex.includes(params.seriesIndex) && item.dataIndex === params.dataIndex;
|
|
87986
|
+
});
|
|
87987
|
+
|
|
87988
|
+
if (matchData && (matchData.color || _this.highlightColor)) {
|
|
87989
|
+
fillColor = matchData.color || _this.highlightColor;
|
|
87990
|
+
}
|
|
87991
|
+
}
|
|
87992
|
+
|
|
87993
|
+
var leftColor, rightColor, topColor;
|
|
87994
|
+
|
|
87995
|
+
if (typeof fillColor === 'object') {
|
|
87996
|
+
var copyLeftColor = (0, _lodash.default)(fillColor);
|
|
87997
|
+
var copyRightColor = (0, _lodash.default)(fillColor);
|
|
87998
|
+
var copyTopColor = (0, _lodash.default)(fillColor);
|
|
87999
|
+
copyLeftColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyLeftColor.colorStops[0].color, 0.4);
|
|
88000
|
+
copyLeftColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyLeftColor.colorStops[1].color, 0.4);
|
|
88001
|
+
copyRightColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyRightColor.colorStops[0].color, 0.7);
|
|
88002
|
+
copyRightColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyRightColor.colorStops[1].color, 0.7);
|
|
88003
|
+
copyTopColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyTopColor.colorStops[0].color, 0.85);
|
|
88004
|
+
copyTopColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyTopColor.colorStops[1].color, 0.85);
|
|
88005
|
+
leftColor = copyLeftColor;
|
|
88006
|
+
rightColor = copyRightColor;
|
|
88007
|
+
topColor = copyTopColor;
|
|
88008
|
+
} else {
|
|
88009
|
+
leftColor = (0, _util.getColorWithOpacity)(fillColor, 0.4);
|
|
88010
|
+
rightColor = (0, _util.getColorWithOpacity)(fillColor, 0.7);
|
|
88011
|
+
topColor = (0, _util.getColorWithOpacity)(fillColor, 0.85);
|
|
88012
|
+
}
|
|
88013
|
+
|
|
88014
|
+
return {
|
|
88015
|
+
type: 'group',
|
|
88016
|
+
children: [{
|
|
88017
|
+
type: "Cube" + cubeType + "Left",
|
|
88018
|
+
shape: {
|
|
88019
|
+
api: api,
|
|
88020
|
+
xValue: api.value(0),
|
|
88021
|
+
yValue: api.value(1),
|
|
88022
|
+
x: location[0] + seriesSpace,
|
|
88023
|
+
y: location[1],
|
|
88024
|
+
bottomYAxis: api.coord([api.value(0), 0])[1]
|
|
88025
|
+
},
|
|
88026
|
+
style: {
|
|
88027
|
+
fill: leftColor
|
|
88028
|
+
}
|
|
88029
|
+
}, {
|
|
88030
|
+
type: "Cube" + cubeType + "Right",
|
|
88031
|
+
shape: {
|
|
88032
|
+
api: api,
|
|
88033
|
+
xValue: api.value(0),
|
|
88034
|
+
yValue: api.value(1),
|
|
88035
|
+
x: location[0] + seriesSpace,
|
|
88036
|
+
y: location[1],
|
|
88037
|
+
bottomYAxis: api.coord([api.value(0), 0])[1]
|
|
88038
|
+
},
|
|
88039
|
+
style: {
|
|
88040
|
+
fill: rightColor
|
|
88041
|
+
}
|
|
88042
|
+
}, {
|
|
88043
|
+
type: "Cube" + cubeType + "Top",
|
|
88044
|
+
shape: {
|
|
88045
|
+
api: api,
|
|
88046
|
+
xValue: api.value(0),
|
|
88047
|
+
yValue: api.value(1),
|
|
88048
|
+
x: location[0] + seriesSpace,
|
|
88049
|
+
y: location[1],
|
|
88050
|
+
bottomYAxis: api.coord([api.value(0), 0])[1]
|
|
88051
|
+
},
|
|
88052
|
+
style: {
|
|
88053
|
+
fill: topColor
|
|
88054
|
+
}
|
|
88055
|
+
}]
|
|
88056
|
+
};
|
|
88057
|
+
};
|
|
88058
|
+
},
|
|
88059
|
+
getSericeSpace: function getSericeSpace(sameYFieldSeriesCount, baseSpace, seriesSpaceCount) {
|
|
88060
|
+
if (sameYFieldSeriesCount % 2 === 0) {
|
|
88061
|
+
return seriesSpaceCount * baseSpace + baseSpace / 2;
|
|
88062
|
+
} else {
|
|
88063
|
+
return seriesSpaceCount * baseSpace;
|
|
88064
|
+
}
|
|
88065
|
+
},
|
|
88066
|
+
getSameYFieldSeriesCount: function getSameYFieldSeriesCount(series) {
|
|
88067
|
+
var firstSeriesName = series[0].name.split('-')[1];
|
|
88068
|
+
var seriesCount = 0;
|
|
88069
|
+
|
|
88070
|
+
for (var _iterator = _createForOfIteratorHelperLoose(series), _step; !(_step = _iterator()).done;) {
|
|
88071
|
+
var serie = _step.value;
|
|
88072
|
+
var serieNname = serie.name.split('-')[1];
|
|
88073
|
+
|
|
88074
|
+
if (firstSeriesName === serieNname) {
|
|
88075
|
+
seriesCount += 1;
|
|
88076
|
+
} else {
|
|
88077
|
+
return seriesCount;
|
|
88078
|
+
}
|
|
88079
|
+
}
|
|
88080
|
+
|
|
88081
|
+
return seriesCount;
|
|
88082
|
+
},
|
|
88083
|
+
_createRingShineHighlight: function _createRingShineHighlight(series, highlightOptions, color) {
|
|
88084
|
+
if (color === void 0) {
|
|
88085
|
+
color = this.highlightColor;
|
|
88086
|
+
}
|
|
88087
|
+
|
|
88088
|
+
series = series || [];
|
|
88089
|
+
series = series.map(function (serie, seriesIndex) {
|
|
88090
|
+
var dataIndexs = highlightOptions.map(function (item) {
|
|
88091
|
+
if (item.seriesIndex && item.seriesIndex.includes(seriesIndex)) {
|
|
88092
|
+
return item.dataIndex;
|
|
88093
|
+
}
|
|
88094
|
+
});
|
|
88095
|
+
var colors = highlightOptions.map(function (item) {
|
|
88096
|
+
if (item.seriesIndex && item.seriesIndex.includes(seriesIndex)) {
|
|
88097
|
+
return item.color || color;
|
|
88098
|
+
}
|
|
88099
|
+
});
|
|
88100
|
+
var serieDatas = serie && serie.data || [];
|
|
88101
|
+
dataIndexs.forEach(function (dataIndex, index) {
|
|
88102
|
+
serieDatas[dataIndex].itemStyle.color = colors[index];
|
|
88103
|
+
serieDatas[dataIndex].itemStyle.borderColor = colors[index];
|
|
88104
|
+
serieDatas[dataIndex].itemStyle.shadowColor = colors[index];
|
|
88105
|
+
});
|
|
88106
|
+
return serie;
|
|
88107
|
+
});
|
|
88108
|
+
return series;
|
|
88109
|
+
},
|
|
88110
|
+
getStringColor: function getStringColor(color) {
|
|
88111
|
+
if (color instanceof Object) {
|
|
88112
|
+
return ((color.colorStops || [])[0] || {}).color;
|
|
88113
|
+
}
|
|
88114
|
+
|
|
88115
|
+
return color;
|
|
88116
|
+
},
|
|
88117
|
+
setGradientColor: function setGradientColor(color, nextColor) {
|
|
88118
|
+
if (typeof color === 'string') {
|
|
88119
|
+
return new this.$options.graphic.LinearGradient(0, 0, 0, 1, [{
|
|
88120
|
+
offset: 0,
|
|
88121
|
+
color: color
|
|
88122
|
+
}, {
|
|
88123
|
+
offset: 1,
|
|
88124
|
+
color: nextColor || color
|
|
88125
|
+
}]);
|
|
88126
|
+
}
|
|
88127
|
+
|
|
88128
|
+
return color;
|
|
88129
|
+
}
|
|
88130
|
+
}
|
|
88131
|
+
};
|
|
88132
|
+
|
|
88133
|
+
/***/ }),
|
|
88134
|
+
|
|
87329
88135
|
/***/ "Vs1/":
|
|
87330
88136
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
87331
88137
|
|
|
@@ -87856,7 +88662,8 @@ var _default = exports.default = {
|
|
|
87856
88662
|
drillLayersNotSupport: 'Drill-down layers are not supported yet!',
|
|
87857
88663
|
mvtNotSupport: 'Vector tile layers is not supported yet!',
|
|
87858
88664
|
mapCreatedFailed: 'Failed to load map!',
|
|
87859
|
-
projectionnotmatch: '{title} does not match the current map projection!'
|
|
88665
|
+
projectionnotmatch: '{title} does not match the current map projection!',
|
|
88666
|
+
xyztilelayernotsupport: '{title} XYZ Tile layer does not match the resolution or origin of the current map!'
|
|
87860
88667
|
},
|
|
87861
88668
|
drillMap: {
|
|
87862
88669
|
goBack: 'Go Back'
|
|
@@ -92214,6 +93021,37 @@ var _default = exports.default = {
|
|
|
92214
93021
|
|
|
92215
93022
|
/***/ }),
|
|
92216
93023
|
|
|
93024
|
+
/***/ "Xp+g":
|
|
93025
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
93026
|
+
|
|
93027
|
+
"use strict";
|
|
93028
|
+
__webpack_require__.r(__webpack_exports__);
|
|
93029
|
+
/* harmony import */ var _ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+581");
|
|
93030
|
+
/* 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__));
|
|
93031
|
+
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("KHd+");
|
|
93032
|
+
var render, staticRenderFns
|
|
93033
|
+
|
|
93034
|
+
|
|
93035
|
+
|
|
93036
|
+
|
|
93037
|
+
/* normalize component */
|
|
93038
|
+
|
|
93039
|
+
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(
|
|
93040
|
+
_ChartHandleMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
93041
|
+
render,
|
|
93042
|
+
staticRenderFns,
|
|
93043
|
+
false,
|
|
93044
|
+
null,
|
|
93045
|
+
null,
|
|
93046
|
+
null
|
|
93047
|
+
|
|
93048
|
+
)
|
|
93049
|
+
|
|
93050
|
+
component.options.__file = "ChartHandleMixin.vue"
|
|
93051
|
+
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
|
|
93052
|
+
|
|
93053
|
+
/***/ }),
|
|
93054
|
+
|
|
92217
93055
|
/***/ "Xvvz":
|
|
92218
93056
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92219
93057
|
|
|
@@ -105789,6 +106627,7 @@ exports.getColorWithOpacity = getColorWithOpacity;
|
|
|
105789
106627
|
exports.getDarkenColor = getDarkenColor;
|
|
105790
106628
|
exports.getDataType = getDataType;
|
|
105791
106629
|
exports.getDateTime = getDateTime;
|
|
106630
|
+
exports.getDecimalsFormatterVal = getDecimalsFormatterVal;
|
|
105792
106631
|
exports.getDerivedColorsByTextColor = getDerivedColorsByTextColor;
|
|
105793
106632
|
exports.getFeatureCenter = getFeatureCenter;
|
|
105794
106633
|
exports.getValueCaseInsensitive = getValueCaseInsensitive;
|
|
@@ -106114,6 +106953,14 @@ var statisticFunctions = exports.statisticFunctions = {
|
|
|
106114
106953
|
}
|
|
106115
106954
|
};
|
|
106116
106955
|
|
|
106956
|
+
function getDecimalsFormatterVal(val, decimals) {
|
|
106957
|
+
if (!Number.isFinite(+val)) {
|
|
106958
|
+
return val;
|
|
106959
|
+
}
|
|
106960
|
+
|
|
106961
|
+
return decimals === -1 || typeof decimals !== 'number' ? val : Number(val).toFixed(decimals);
|
|
106962
|
+
}
|
|
106963
|
+
|
|
106117
106964
|
/***/ }),
|
|
106118
106965
|
|
|
106119
106966
|
/***/ "eCvj":
|
|
@@ -125505,13 +126352,11 @@ var _vueEcharts = _interopRequireDefault(__webpack_require__("Zni2"));
|
|
|
125505
126352
|
|
|
125506
126353
|
var _lodash = _interopRequireDefault(__webpack_require__("9csQ"));
|
|
125507
126354
|
|
|
125508
|
-
var _lodash2 = _interopRequireDefault(__webpack_require__("
|
|
125509
|
-
|
|
125510
|
-
var _lodash3 = _interopRequireDefault(__webpack_require__("XaGS"));
|
|
126355
|
+
var _lodash2 = _interopRequireDefault(__webpack_require__("XaGS"));
|
|
125511
126356
|
|
|
125512
|
-
var
|
|
126357
|
+
var _lodash3 = _interopRequireDefault(__webpack_require__("9/5/"));
|
|
125513
126358
|
|
|
125514
|
-
var
|
|
126359
|
+
var _lodash4 = _interopRequireDefault(__webpack_require__("zT9C"));
|
|
125515
126360
|
|
|
125516
126361
|
var _Card = _interopRequireDefault(__webpack_require__("tnDp"));
|
|
125517
126362
|
|
|
@@ -125533,11 +126378,8 @@ var _index = _interopRequireDefault(__webpack_require__("NQEM"));
|
|
|
125533
126378
|
|
|
125534
126379
|
var _resizeDetector = __webpack_require__("QG5D");
|
|
125535
126380
|
|
|
125536
|
-
|
|
126381
|
+
var _ChartHandleMixin = _interopRequireDefault(__webpack_require__("Xp+g"));
|
|
125537
126382
|
|
|
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
126383
|
//
|
|
125542
126384
|
//
|
|
125543
126385
|
//
|
|
@@ -125569,8 +126411,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
125569
126411
|
//
|
|
125570
126412
|
//
|
|
125571
126413
|
//
|
|
125572
|
-
|
|
125573
|
-
|
|
126414
|
+
//
|
|
125574
126415
|
// 枚举事件类型
|
|
125575
126416
|
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
126417
|
|
|
@@ -125579,7 +126420,7 @@ var _default2 = exports.default = {
|
|
|
125579
126420
|
'v-chart': _vueEcharts.default,
|
|
125580
126421
|
TablePopup: _TablePopup.default
|
|
125581
126422
|
},
|
|
125582
|
-
mixins: [_Theme.default, _Card.default, _Timer.default],
|
|
126423
|
+
mixins: [_Theme.default, _Card.default, _Timer.default, _ChartHandleMixin.default],
|
|
125583
126424
|
props: {
|
|
125584
126425
|
iconClass: {
|
|
125585
126426
|
type: String,
|
|
@@ -125679,7 +126520,7 @@ var _default2 = exports.default = {
|
|
|
125679
126520
|
};
|
|
125680
126521
|
},
|
|
125681
126522
|
parseOptions: function parseOptions() {
|
|
125682
|
-
var
|
|
126523
|
+
var _this = this;
|
|
125683
126524
|
|
|
125684
126525
|
if (!this.options.series) {
|
|
125685
126526
|
return this.options;
|
|
@@ -125701,8 +126542,8 @@ var _default2 = exports.default = {
|
|
|
125701
126542
|
|
|
125702
126543
|
var series = this.options.series.map(function (serie) {
|
|
125703
126544
|
if (serie.label) {
|
|
125704
|
-
var cloneSerie = (0,
|
|
125705
|
-
cloneSerie.label.normal =
|
|
126545
|
+
var cloneSerie = (0, _lodash4.default)(serie);
|
|
126546
|
+
cloneSerie.label.normal = _this._controlLabel(cloneSerie.label.normal, cloneSerie.maxLabels);
|
|
125706
126547
|
return cloneSerie;
|
|
125707
126548
|
}
|
|
125708
126549
|
|
|
@@ -125738,17 +126579,17 @@ var _default2 = exports.default = {
|
|
|
125738
126579
|
this.chartTheme = null;
|
|
125739
126580
|
},
|
|
125740
126581
|
colorGroupsData: function colorGroupsData(newVal, oldVal) {
|
|
125741
|
-
if (!(0,
|
|
126582
|
+
if (!(0, _lodash2.default)(newVal, oldVal)) {
|
|
125742
126583
|
this._setChartTheme();
|
|
125743
126584
|
}
|
|
125744
126585
|
},
|
|
125745
126586
|
textColorsData: function textColorsData(newVal, oldVal) {
|
|
125746
|
-
if (!(0,
|
|
126587
|
+
if (!(0, _lodash2.default)(newVal, oldVal)) {
|
|
125747
126588
|
this._setChartTheme();
|
|
125748
126589
|
}
|
|
125749
126590
|
},
|
|
125750
126591
|
getBackground: function getBackground(newVal, oldVal) {
|
|
125751
|
-
if (!(0,
|
|
126592
|
+
if (!(0, _lodash2.default)(newVal, oldVal)) {
|
|
125752
126593
|
this._setChartTheme();
|
|
125753
126594
|
}
|
|
125754
126595
|
},
|
|
@@ -125761,7 +126602,7 @@ var _default2 = exports.default = {
|
|
|
125761
126602
|
},
|
|
125762
126603
|
datasetOptions: {
|
|
125763
126604
|
handler: function handler(newVal, oldVal) {
|
|
125764
|
-
if (!(0,
|
|
126605
|
+
if (!(0, _lodash2.default)(newVal, oldVal)) {
|
|
125765
126606
|
this._setChartTheme();
|
|
125766
126607
|
|
|
125767
126608
|
this.registerShape();
|
|
@@ -125861,10 +126702,10 @@ var _default2 = exports.default = {
|
|
|
125861
126702
|
},
|
|
125862
126703
|
methods: {
|
|
125863
126704
|
_initAutoResize: function _initAutoResize() {
|
|
125864
|
-
var
|
|
126705
|
+
var _this2 = this;
|
|
125865
126706
|
|
|
125866
|
-
this.__resizeHandler = (0,
|
|
125867
|
-
|
|
126707
|
+
this.__resizeHandler = (0, _lodash3.default)(function () {
|
|
126708
|
+
_this2.resize();
|
|
125868
126709
|
}, 100, {
|
|
125869
126710
|
leading: true
|
|
125870
126711
|
});
|
|
@@ -125875,124 +126716,16 @@ var _default2 = exports.default = {
|
|
|
125875
126716
|
}
|
|
125876
126717
|
},
|
|
125877
126718
|
_initDataZoom: function _initDataZoom() {
|
|
125878
|
-
var
|
|
126719
|
+
var _this3 = this;
|
|
125879
126720
|
|
|
125880
|
-
this.dataZoomHandler = (0,
|
|
125881
|
-
|
|
126721
|
+
this.dataZoomHandler = (0, _lodash3.default)(function () {
|
|
126722
|
+
_this3._dataZoomChanged();
|
|
125882
126723
|
}, 500, {
|
|
125883
126724
|
leading: true
|
|
125884
126725
|
});
|
|
125885
126726
|
},
|
|
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
126727
|
setItemStyleColor: function setItemStyleColor(isSet, series, highlightOptions, color) {
|
|
125995
|
-
var
|
|
126728
|
+
var _this4 = this;
|
|
125996
126729
|
|
|
125997
126730
|
if (isSet === void 0) {
|
|
125998
126731
|
isSet = true;
|
|
@@ -126006,7 +126739,7 @@ var _default2 = exports.default = {
|
|
|
126006
126739
|
color = this.highlightColor;
|
|
126007
126740
|
}
|
|
126008
126741
|
|
|
126009
|
-
series = series || (0,
|
|
126742
|
+
series = series || (0, _lodash4.default)(this.echartOptions && this.echartOptions.series) || [];
|
|
126010
126743
|
series.forEach(function (serie, seriesIndex) {
|
|
126011
126744
|
var dataIndexs = highlightOptions.map(function (item) {
|
|
126012
126745
|
if (item.seriesIndex && item.seriesIndex.includes(seriesIndex)) {
|
|
@@ -126018,7 +126751,7 @@ var _default2 = exports.default = {
|
|
|
126018
126751
|
return item.color || color;
|
|
126019
126752
|
}
|
|
126020
126753
|
});
|
|
126021
|
-
var serieColor =
|
|
126754
|
+
var serieColor = _this4.options.series && _this4.options.series[seriesIndex] && _this4.options.series[seriesIndex].itemStyle && _this4.options.series[seriesIndex].itemStyle.color;
|
|
126022
126755
|
serie.itemStyle = serie.itemStyle || {
|
|
126023
126756
|
color: ''
|
|
126024
126757
|
};
|
|
@@ -126030,7 +126763,7 @@ var _default2 = exports.default = {
|
|
|
126030
126763
|
if (index > -1) {
|
|
126031
126764
|
return colors[index];
|
|
126032
126765
|
} else if (serie.type === 'pie') {
|
|
126033
|
-
var colorGroup =
|
|
126766
|
+
var colorGroup = _this4._handlerColorGroup(serie.data.length);
|
|
126034
126767
|
|
|
126035
126768
|
return colorGroup[dataIndex];
|
|
126036
126769
|
} else {
|
|
@@ -126053,7 +126786,7 @@ var _default2 = exports.default = {
|
|
|
126053
126786
|
}
|
|
126054
126787
|
},
|
|
126055
126788
|
setPieAutoPlay: function setPieAutoPlay(echartsNode) {
|
|
126056
|
-
var
|
|
126789
|
+
var _this5 = this;
|
|
126057
126790
|
|
|
126058
126791
|
var i = -1;
|
|
126059
126792
|
this.pieAutoPlay = setInterval(function () {
|
|
@@ -126064,7 +126797,7 @@ var _default2 = exports.default = {
|
|
|
126064
126797
|
});
|
|
126065
126798
|
i++;
|
|
126066
126799
|
|
|
126067
|
-
if (i >=
|
|
126800
|
+
if (i >= _this5._chartOptions.legend.data.length) {
|
|
126068
126801
|
i = 0;
|
|
126069
126802
|
}
|
|
126070
126803
|
|
|
@@ -126087,21 +126820,21 @@ var _default2 = exports.default = {
|
|
|
126087
126820
|
}
|
|
126088
126821
|
},
|
|
126089
126822
|
timing: function timing() {
|
|
126090
|
-
var
|
|
126823
|
+
var _this6 = this;
|
|
126091
126824
|
|
|
126092
126825
|
this.echartsDataService && this.echartsDataService.getDataOption(this.dataset, this.xBar).then(function (options) {
|
|
126093
|
-
|
|
126826
|
+
_this6.hideLoading(); // 缓存dataSeriesCache,请求后格式化成echart的数据
|
|
126094
126827
|
|
|
126095
126828
|
|
|
126096
|
-
|
|
126097
|
-
|
|
126829
|
+
_this6.dataSeriesCache = Object.assign({}, options);
|
|
126830
|
+
_this6.datasetChange = false; // 设置echartOptions
|
|
126098
126831
|
|
|
126099
|
-
|
|
126832
|
+
_this6.echartOptions = _this6._optionsHandler(_this6.options, options);
|
|
126100
126833
|
});
|
|
126101
126834
|
},
|
|
126102
126835
|
// 请求数据,设置echartOptions
|
|
126103
126836
|
_setEchartOptions: function _setEchartOptions(dataset, datasetOptions, echartOptions) {
|
|
126104
|
-
var
|
|
126837
|
+
var _this7 = this;
|
|
126105
126838
|
|
|
126106
126839
|
this.echartsDataService = null;
|
|
126107
126840
|
this.dataSeriesCache = null;
|
|
@@ -126118,615 +126851,14 @@ var _default2 = exports.default = {
|
|
|
126118
126851
|
|
|
126119
126852
|
this.echartsDataService = new _EchartsDataService.default(dataset, datasetOptions);
|
|
126120
126853
|
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);
|
|
126854
|
+
_this7.hideLoading(); // 缓存dataSeriesCache,请求后格式化成echart的数据
|
|
126696
126855
|
|
|
126697
|
-
if (data.length > 1) {
|
|
126698
|
-
result.push(gapItem);
|
|
126699
|
-
}
|
|
126700
|
-
}
|
|
126701
126856
|
|
|
126702
|
-
|
|
126703
|
-
|
|
126704
|
-
_createRingShineHighlight: function _createRingShineHighlight(series, highlightOptions, color) {
|
|
126705
|
-
if (color === void 0) {
|
|
126706
|
-
color = this.highlightColor;
|
|
126707
|
-
}
|
|
126857
|
+
_this7.dataSeriesCache = Object.assign({}, options);
|
|
126858
|
+
_this7.datasetChange = false; // 设置echartOptions
|
|
126708
126859
|
|
|
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;
|
|
126860
|
+
_this7.echartOptions = _this7._optionsHandler(echartOptions, options);
|
|
126728
126861
|
});
|
|
126729
|
-
return series;
|
|
126730
126862
|
},
|
|
126731
126863
|
_handlerColorGroup: function _handlerColorGroup(serielDataLength) {
|
|
126732
126864
|
if (typeof this.colorGroupsData[0] === 'object') {
|
|
@@ -126738,18 +126870,23 @@ var _default2 = exports.default = {
|
|
|
126738
126870
|
// 控制label显示条数
|
|
126739
126871
|
_controlLabel: function _controlLabel(normalLabel, maxLabels) {
|
|
126740
126872
|
if (normalLabel && normalLabel.show && maxLabels) {
|
|
126741
|
-
var endNormalLabel = (0,
|
|
126873
|
+
var endNormalLabel = (0, _lodash4.default)(normalLabel);
|
|
126742
126874
|
var formatMode;
|
|
126743
126875
|
|
|
126744
126876
|
if (endNormalLabel.formatter && typeof endNormalLabel.formatter === 'string') {
|
|
126745
126877
|
formatMode = endNormalLabel.formatter;
|
|
126746
|
-
}
|
|
126747
|
-
|
|
126748
|
-
|
|
126749
|
-
|
|
126750
|
-
|
|
126751
|
-
|
|
126752
|
-
|
|
126878
|
+
} else if (endNormalLabel.originFormatter) {
|
|
126879
|
+
formatMode = endNormalLabel.originFormatter;
|
|
126880
|
+
}
|
|
126881
|
+
|
|
126882
|
+
endNormalLabel.formatter = function (_ref2) {
|
|
126883
|
+
var dataIndex = _ref2.dataIndex,
|
|
126884
|
+
value = _ref2.value,
|
|
126885
|
+
name = _ref2.name,
|
|
126886
|
+
percent = _ref2.percent;
|
|
126887
|
+
name = (0, _util.getDecimalsFormatterVal)(name, normalLabel.xFieldDecimals);
|
|
126888
|
+
value = (0, _util.getDecimalsFormatterVal)(value, normalLabel.decimals);
|
|
126889
|
+
percent = (0, _util.getDecimalsFormatterVal)(percent, normalLabel.decimals);
|
|
126753
126890
|
var FORMATTER_MAP = {
|
|
126754
126891
|
'{b}: {c}': name + ": " + value,
|
|
126755
126892
|
'{b}': "" + name,
|
|
@@ -126928,7 +127065,7 @@ var _default2 = exports.default = {
|
|
|
126928
127065
|
}
|
|
126929
127066
|
},
|
|
126930
127067
|
showDetailInfo: function showDetailInfo(feature) {
|
|
126931
|
-
var
|
|
127068
|
+
var _this8 = this;
|
|
126932
127069
|
|
|
126933
127070
|
var coordinates = ((feature || {}).geometry || {}).coordinates;
|
|
126934
127071
|
var hasCoordinates = coordinates && !!coordinates.length;
|
|
@@ -126941,8 +127078,8 @@ var _default2 = exports.default = {
|
|
|
126941
127078
|
var propsData = this.generateTableData(properties);
|
|
126942
127079
|
this.tablePopupProps = (0, _extends2.default)({}, propsData);
|
|
126943
127080
|
this.$nextTick(function () {
|
|
126944
|
-
|
|
126945
|
-
return (0, _util.setPopupArrowStyle)(
|
|
127081
|
+
_this8.viewModel.setPopupContent(_coordinates, _this8.$refs.chartTablePopup.$el, function () {
|
|
127082
|
+
return (0, _util.setPopupArrowStyle)(_this8.tablePopupBgData);
|
|
126946
127083
|
});
|
|
126947
127084
|
});
|
|
126948
127085
|
} else {
|
|
@@ -126995,13 +127132,13 @@ var _default2 = exports.default = {
|
|
|
126995
127132
|
}
|
|
126996
127133
|
},
|
|
126997
127134
|
registerShape: function registerShape() {
|
|
126998
|
-
var
|
|
127135
|
+
var _this9 = this;
|
|
126999
127136
|
|
|
127000
127137
|
this.datasetOptions && this.options.series && this.datasetOptions.forEach(function (item, index) {
|
|
127001
|
-
var graphicIntance =
|
|
127138
|
+
var graphicIntance = _this9.$options.graphic;
|
|
127002
127139
|
|
|
127003
127140
|
if (item.seriesType === '2.5Bar') {
|
|
127004
|
-
var cubeType =
|
|
127141
|
+
var cubeType = _this9.options.series[index].shape;
|
|
127005
127142
|
|
|
127006
127143
|
if (graphicIntance.getShapeClass("Cube" + cubeType + "Left")) {
|
|
127007
127144
|
return;
|
|
@@ -127139,14 +127276,14 @@ var _default2 = exports.default = {
|
|
|
127139
127276
|
};
|
|
127140
127277
|
},
|
|
127141
127278
|
spinPoint: function spinPoint(angle, spinAngle, effectColor, radius) {
|
|
127142
|
-
var
|
|
127279
|
+
var _this10 = this;
|
|
127143
127280
|
|
|
127144
127281
|
return function (params, api) {
|
|
127145
127282
|
var x0 = api.getWidth() / 2;
|
|
127146
127283
|
var y0 = api.getHeight() / 2;
|
|
127147
127284
|
var r = Math.min(api.getWidth(), api.getHeight()) / 2 * radius;
|
|
127148
127285
|
|
|
127149
|
-
var point =
|
|
127286
|
+
var point = _this10.getCirlPoint(x0, y0, r, angle + spinAngle);
|
|
127150
127287
|
|
|
127151
127288
|
return {
|
|
127152
127289
|
type: 'circle',
|
|
@@ -127205,19 +127342,19 @@ var _default2 = exports.default = {
|
|
|
127205
127342
|
}
|
|
127206
127343
|
},
|
|
127207
127344
|
startEffect: function startEffect() {
|
|
127208
|
-
var
|
|
127345
|
+
var _this11 = this;
|
|
127209
127346
|
|
|
127210
127347
|
var angle = 0;
|
|
127211
127348
|
this.startSpin = setInterval(function () {
|
|
127212
|
-
if (!
|
|
127349
|
+
if (!_this11.options.series) {
|
|
127213
127350
|
return;
|
|
127214
127351
|
}
|
|
127215
127352
|
|
|
127216
|
-
if (
|
|
127217
|
-
|
|
127353
|
+
if (_this11.options.series[0].customType === 'customRingsSeries') {
|
|
127354
|
+
_this11.customSeries = [];
|
|
127218
127355
|
angle += 3;
|
|
127219
127356
|
|
|
127220
|
-
|
|
127357
|
+
_this11.addEffect(angle);
|
|
127221
127358
|
}
|
|
127222
127359
|
}, 100);
|
|
127223
127360
|
},
|
|
@@ -153302,25 +153439,6 @@ function isIndex(value, length) {
|
|
|
153302
153439
|
module.exports = isIndex;
|
|
153303
153440
|
|
|
153304
153441
|
|
|
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
153442
|
/***/ }),
|
|
153325
153443
|
|
|
153326
153444
|
/***/ "wOTH":
|
|
@@ -162223,13 +162341,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
162223
162341
|
exports.getProjection = getProjection;
|
|
162224
162342
|
exports.registerProjection = registerProjection;
|
|
162225
162343
|
exports.toEpsgCode = toEpsgCode;
|
|
162344
|
+
exports.transformCoodinates = transformCoodinates;
|
|
162226
162345
|
|
|
162227
162346
|
var _util = __webpack_require__("e7LN");
|
|
162228
162347
|
|
|
162229
162348
|
var _proj = _interopRequireDefault(__webpack_require__("p5/s"));
|
|
162230
162349
|
|
|
162231
|
-
function defineProjection(epsgCode, projection) {
|
|
162232
|
-
if (_proj.default.defs(epsgCode)) {
|
|
162350
|
+
function defineProjection(epsgCode, projection, isCover) {
|
|
162351
|
+
if (_proj.default.defs(epsgCode) && !isCover) {
|
|
162233
162352
|
return;
|
|
162234
162353
|
}
|
|
162235
162354
|
|
|
@@ -162241,18 +162360,18 @@ function defineProjection(epsgCode, projection) {
|
|
|
162241
162360
|
_proj.default.defs(epsgCode, projection);
|
|
162242
162361
|
}
|
|
162243
162362
|
|
|
162244
|
-
function registerProjection(epsgKey, epsgValue) {
|
|
162363
|
+
function registerProjection(epsgKey, epsgValue, isCover) {
|
|
162245
162364
|
if ((0, _util.getDataType)(arguments[0]) === '[object Object]' && arguments.length === 1) {
|
|
162246
162365
|
var projections = arguments[0];
|
|
162247
162366
|
|
|
162248
162367
|
for (var epsgCode in projections) {
|
|
162249
|
-
defineProjection(epsgCode, projections[epsgCode]);
|
|
162368
|
+
defineProjection(epsgCode, projections[epsgCode], isCover);
|
|
162250
162369
|
}
|
|
162251
162370
|
|
|
162252
162371
|
return;
|
|
162253
162372
|
}
|
|
162254
162373
|
|
|
162255
|
-
defineProjection(epsgKey, epsgValue);
|
|
162374
|
+
defineProjection(epsgKey, epsgValue, isCover);
|
|
162256
162375
|
}
|
|
162257
162376
|
|
|
162258
162377
|
function getProjection(epsgKey) {
|
|
@@ -162288,6 +162407,20 @@ function toEpsgCode(wkt) {
|
|
|
162288
162407
|
}
|
|
162289
162408
|
}
|
|
162290
162409
|
|
|
162410
|
+
function transformCoodinates(_ref) {
|
|
162411
|
+
var coordinates = _ref.coordinates,
|
|
162412
|
+
sourceProjection = _ref.sourceProjection,
|
|
162413
|
+
_ref$destProjection = _ref.destProjection,
|
|
162414
|
+
destProjection = _ref$destProjection === void 0 ? 'EPSG:4326' : _ref$destProjection;
|
|
162415
|
+
|
|
162416
|
+
try {
|
|
162417
|
+
return (0, _proj.default)(sourceProjection, destProjection, coordinates);
|
|
162418
|
+
} catch (error) {
|
|
162419
|
+
var errorMsg = error + " is not defined";
|
|
162420
|
+
throw errorMsg;
|
|
162421
|
+
}
|
|
162422
|
+
}
|
|
162423
|
+
|
|
162291
162424
|
/***/ }),
|
|
162292
162425
|
|
|
162293
162426
|
/***/ "ymVN":
|