@fmdevui/fm-dev 1.0.115 → 1.0.116
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/es/core/index.d.ts +1 -0
- package/es/core/plugins/index.d.ts +1 -0
- package/es/index.mjs +3 -0
- package/es/packages/core/hook/useChart.mjs +2 -0
- package/es/packages/core/index.mjs +4 -0
- package/es/packages/core/plugins/index.mjs +3 -0
- package/index.js +1526 -162
- package/index.min.js +60 -59
- package/index.min.mjs +60 -59
- package/index.mjs +1524 -162
- package/lib/core/index.d.ts +1 -0
- package/lib/core/plugins/index.d.ts +1 -0
- package/lib/index.js +4 -0
- package/lib/packages/core/hook/useChart.js +2 -0
- package/lib/packages/core/index.js +5 -0
- package/lib/packages/core/plugins/index.js +9 -0
- package/package.json +1 -1
- /package/es/{make-installer.css → defaults.css} +0 -0
- /package/lib/{index.css → make-installer.css} +0 -0
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
1
|
+
/*! fm-dev v1.0.116 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('http2'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'http2', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
|
|
5
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.FmPlus = {}, global.Vue, global.crypto, global.require$$0, global.require$$1, global.require$$2, global.http2, global.util, global.stream, global.require$$4, global.zlib, global.ElementPlus));
|
|
6
|
-
})(this, (function (exports, vue, crypto, require$$0, require$$1, require$$2, http2, util, stream, require$$4, zlib, elementPlus) { 'use strict';
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.FmPlus = {}, global.Vue, global.crypto, global.require$$0, global.require$$1, global.require$$2, global.http2, global.util$2, global.stream, global.require$$4, global.zlib, global.ElementPlus));
|
|
6
|
+
})(this, (function (exports, vue, crypto, require$$0, require$$1, require$$2, http2, util$2, stream, require$$4, zlib, elementPlus) { 'use strict';
|
|
7
7
|
|
|
8
8
|
const _hoisted_1$8 = { class: "fm-transfer-panel" };
|
|
9
9
|
const _hoisted_2$5 = { class: "fm-transfer-panel__header" };
|
|
@@ -5415,7 +5415,7 @@
|
|
|
5415
5415
|
|
|
5416
5416
|
const BOUNDARY_ALPHABET = platform$1.ALPHABET.ALPHA_DIGIT + '-_';
|
|
5417
5417
|
|
|
5418
|
-
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder();
|
|
5418
|
+
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util$2.TextEncoder();
|
|
5419
5419
|
|
|
5420
5420
|
const CRLF = '\r\n';
|
|
5421
5421
|
const CRLF_BYTES = textEncoder.encode(CRLF);
|
|
@@ -5810,7 +5810,7 @@
|
|
|
5810
5810
|
|
|
5811
5811
|
for (let i = 0; i < len; i++) {
|
|
5812
5812
|
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
5813
|
-
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
|
|
5813
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util$2.isDeepStrictEqual(sessionOptions, options)) {
|
|
5814
5814
|
return sessionHandle;
|
|
5815
5815
|
}
|
|
5816
5816
|
}
|
|
@@ -6237,7 +6237,7 @@
|
|
|
6237
6237
|
|
|
6238
6238
|
if (!headers.hasContentLength()) {
|
|
6239
6239
|
try {
|
|
6240
|
-
const knownLength = await util.promisify(data.getLength).call(data);
|
|
6240
|
+
const knownLength = await util$2.promisify(data.getLength).call(data);
|
|
6241
6241
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
6242
6242
|
/*eslint no-empty:0*/
|
|
6243
6243
|
} catch (e) {
|
|
@@ -9032,14 +9032,14 @@
|
|
|
9032
9032
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
9033
9033
|
}
|
|
9034
9034
|
|
|
9035
|
-
var core$
|
|
9035
|
+
var core$2 = {exports: {}};
|
|
9036
9036
|
|
|
9037
|
-
var core = core$
|
|
9037
|
+
var core$1 = core$2.exports;
|
|
9038
9038
|
|
|
9039
9039
|
var hasRequiredCore;
|
|
9040
9040
|
|
|
9041
9041
|
function requireCore () {
|
|
9042
|
-
if (hasRequiredCore) return core$
|
|
9042
|
+
if (hasRequiredCore) return core$2.exports;
|
|
9043
9043
|
hasRequiredCore = 1;
|
|
9044
9044
|
(function (module, exports) {
|
|
9045
9045
|
(function (root, factory) {
|
|
@@ -9047,7 +9047,7 @@
|
|
|
9047
9047
|
// CommonJS
|
|
9048
9048
|
module.exports = factory();
|
|
9049
9049
|
}
|
|
9050
|
-
}(core, function () {
|
|
9050
|
+
}(core$1, function () {
|
|
9051
9051
|
|
|
9052
9052
|
/*globals window, global, require*/
|
|
9053
9053
|
|
|
@@ -9841,8 +9841,8 @@
|
|
|
9841
9841
|
return CryptoJS;
|
|
9842
9842
|
|
|
9843
9843
|
}));
|
|
9844
|
-
} (core$
|
|
9845
|
-
return core$
|
|
9844
|
+
} (core$2));
|
|
9845
|
+
return core$2.exports;
|
|
9846
9846
|
}
|
|
9847
9847
|
|
|
9848
9848
|
var x64Core$1 = {exports: {}};
|
|
@@ -17585,7 +17585,7 @@
|
|
|
17585
17585
|
}
|
|
17586
17586
|
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
|
17587
17587
|
/* eslint-disable */
|
|
17588
|
-
function format$
|
|
17588
|
+
function format$3(message, ...args) {
|
|
17589
17589
|
if (args.length === 1 && isObject$5(args[0])) {
|
|
17590
17590
|
args = args[0];
|
|
17591
17591
|
}
|
|
@@ -17880,7 +17880,7 @@
|
|
|
17880
17880
|
function createCompileError(code, loc, options = {}) {
|
|
17881
17881
|
const { domain, messages, args } = options;
|
|
17882
17882
|
const msg = (process.env.NODE_ENV !== 'production')
|
|
17883
|
-
? format$
|
|
17883
|
+
? format$3((messages || errorMessages$2)[code] || '', ...(args || []))
|
|
17884
17884
|
: code;
|
|
17885
17885
|
const error = new SyntaxError(String(msg));
|
|
17886
17886
|
error.code = code;
|
|
@@ -19414,7 +19414,7 @@
|
|
|
19414
19414
|
return new Error(`unhandled node type: ${type}`);
|
|
19415
19415
|
}
|
|
19416
19416
|
|
|
19417
|
-
function format$
|
|
19417
|
+
function format$2(ast) {
|
|
19418
19418
|
const msg = (ctx) => formatParts(ctx, ast);
|
|
19419
19419
|
return msg;
|
|
19420
19420
|
}
|
|
@@ -19497,7 +19497,7 @@
|
|
|
19497
19497
|
const WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;
|
|
19498
19498
|
function checkHtmlMessage(source, warnHtmlMessage) {
|
|
19499
19499
|
if (warnHtmlMessage && detectHtmlTag(source)) {
|
|
19500
|
-
warn$1(format$
|
|
19500
|
+
warn$1(format$3(WARN_MESSAGE, { source }));
|
|
19501
19501
|
}
|
|
19502
19502
|
}
|
|
19503
19503
|
const defaultOnCacheKey = (message) => message;
|
|
@@ -19536,7 +19536,7 @@
|
|
|
19536
19536
|
jit: true
|
|
19537
19537
|
});
|
|
19538
19538
|
// compose message function from AST
|
|
19539
|
-
const msg = format$
|
|
19539
|
+
const msg = format$2(ast);
|
|
19540
19540
|
// if occurred compile error, don't cache
|
|
19541
19541
|
return !detectError
|
|
19542
19542
|
? (compileCache[cacheKey] = msg)
|
|
@@ -19556,10 +19556,10 @@
|
|
|
19556
19556
|
}
|
|
19557
19557
|
// compose message function from message (AST)
|
|
19558
19558
|
return (compileCache[cacheKey] =
|
|
19559
|
-
format$
|
|
19559
|
+
format$2(message));
|
|
19560
19560
|
}
|
|
19561
19561
|
else {
|
|
19562
|
-
return format$
|
|
19562
|
+
return format$2(message);
|
|
19563
19563
|
}
|
|
19564
19564
|
}
|
|
19565
19565
|
}
|
|
@@ -20055,7 +20055,7 @@
|
|
|
20055
20055
|
[CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`
|
|
20056
20056
|
};
|
|
20057
20057
|
function getWarnMessage$1(code, ...args) {
|
|
20058
|
-
return format$
|
|
20058
|
+
return format$3(warnMessages$1[code], ...args);
|
|
20059
20059
|
}
|
|
20060
20060
|
|
|
20061
20061
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -20498,7 +20498,7 @@
|
|
|
20498
20498
|
}
|
|
20499
20499
|
|
|
20500
20500
|
// implementation of `number` function
|
|
20501
|
-
function number(context, ...args) {
|
|
20501
|
+
function number$1(context, ...args) {
|
|
20502
20502
|
const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
|
|
20503
20503
|
const { __numberFormatters } = context;
|
|
20504
20504
|
if ((process.env.NODE_ENV !== 'production') && !Availabilities.numberFormat) {
|
|
@@ -21478,7 +21478,7 @@
|
|
|
21478
21478
|
[I18nWarnCodes.DUPLICATE_USE_I18N_CALLING]: "Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."
|
|
21479
21479
|
};
|
|
21480
21480
|
function getWarnMessage(code, ...args) {
|
|
21481
|
-
return format$
|
|
21481
|
+
return format$3(warnMessages[code], ...args);
|
|
21482
21482
|
}
|
|
21483
21483
|
|
|
21484
21484
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -21930,7 +21930,7 @@
|
|
|
21930
21930
|
}
|
|
21931
21931
|
// n
|
|
21932
21932
|
function n(...args) {
|
|
21933
|
-
return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString$2(val) || isArray$4(val));
|
|
21933
|
+
return wrapWithDeps(context => Reflect.apply(number$1, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString$2(val) || isArray$4(val));
|
|
21934
21934
|
}
|
|
21935
21935
|
// for custom processor
|
|
21936
21936
|
function normalize(values) {
|
|
@@ -21961,7 +21961,7 @@
|
|
|
21961
21961
|
}
|
|
21962
21962
|
// numberParts, using for `i18n-n` component
|
|
21963
21963
|
function numberParts(...args) {
|
|
21964
|
-
return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => root[NumberPartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString$2(val) || isArray$4(val));
|
|
21964
|
+
return wrapWithDeps(context => Reflect.apply(number$1, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => root[NumberPartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString$2(val) || isArray$4(val));
|
|
21965
21965
|
}
|
|
21966
21966
|
// datetimeParts, using for `i18n-d` component
|
|
21967
21967
|
function datetimeParts(...args) {
|
|
@@ -31794,7 +31794,7 @@
|
|
|
31794
31794
|
return rect;
|
|
31795
31795
|
}
|
|
31796
31796
|
var range;
|
|
31797
|
-
function getTextRect(node) {
|
|
31797
|
+
function getTextRect$1(node) {
|
|
31798
31798
|
if (!range)
|
|
31799
31799
|
range = document.createRange();
|
|
31800
31800
|
range.selectNode(node);
|
|
@@ -31814,7 +31814,7 @@
|
|
|
31814
31814
|
if (el.nodeType === 1 || el.getBoundingClientRect)
|
|
31815
31815
|
childRect = el.getBoundingClientRect();
|
|
31816
31816
|
else if (el.nodeType === 3 && el.data.trim())
|
|
31817
|
-
childRect = getTextRect(el);
|
|
31817
|
+
childRect = getTextRect$1(el);
|
|
31818
31818
|
}
|
|
31819
31819
|
if (childRect)
|
|
31820
31820
|
mergeRects(rect, childRect);
|
|
@@ -42928,6 +42928,13 @@
|
|
|
42928
42928
|
return image;
|
|
42929
42929
|
}
|
|
42930
42930
|
};
|
|
42931
|
+
function setPlatformAPI(newPlatformApis) {
|
|
42932
|
+
for (var key in platformApi) {
|
|
42933
|
+
if (newPlatformApis[key]) {
|
|
42934
|
+
platformApi[key] = newPlatformApis[key];
|
|
42935
|
+
}
|
|
42936
|
+
}
|
|
42937
|
+
}
|
|
42931
42938
|
|
|
42932
42939
|
var BUILTIN_OBJECT = reduce([
|
|
42933
42940
|
'Function',
|
|
@@ -43073,6 +43080,7 @@
|
|
|
43073
43080
|
}
|
|
43074
43081
|
return target;
|
|
43075
43082
|
}
|
|
43083
|
+
var createCanvas = platformApi.createCanvas;
|
|
43076
43084
|
function indexOf(array, value) {
|
|
43077
43085
|
if (array) {
|
|
43078
43086
|
if (array.indexOf) {
|
|
@@ -43467,6 +43475,62 @@
|
|
|
43467
43475
|
}
|
|
43468
43476
|
function noop() { }
|
|
43469
43477
|
var RADIAN_TO_DEGREE = 180 / Math.PI;
|
|
43478
|
+
var EPSILON$4 = Number.EPSILON || Math.pow(2, -52);
|
|
43479
|
+
|
|
43480
|
+
var util$1 = /*#__PURE__*/Object.freeze({
|
|
43481
|
+
__proto__: null,
|
|
43482
|
+
EPSILON: EPSILON$4,
|
|
43483
|
+
HashMap: HashMap,
|
|
43484
|
+
RADIAN_TO_DEGREE: RADIAN_TO_DEGREE,
|
|
43485
|
+
assert: assert,
|
|
43486
|
+
bind: bind$1,
|
|
43487
|
+
clone: clone$3,
|
|
43488
|
+
concatArray: concatArray,
|
|
43489
|
+
createCanvas: createCanvas,
|
|
43490
|
+
createHashMap: createHashMap,
|
|
43491
|
+
createObject: createObject,
|
|
43492
|
+
curry: curry$1,
|
|
43493
|
+
defaults: defaults,
|
|
43494
|
+
disableUserSelect: disableUserSelect,
|
|
43495
|
+
each: each$c,
|
|
43496
|
+
eqNaN: eqNaN,
|
|
43497
|
+
extend: extend,
|
|
43498
|
+
filter: filter,
|
|
43499
|
+
find: find,
|
|
43500
|
+
guid: guid,
|
|
43501
|
+
hasOwn: hasOwn,
|
|
43502
|
+
indexOf: indexOf,
|
|
43503
|
+
inherits: inherits,
|
|
43504
|
+
isArray: isArray$2,
|
|
43505
|
+
isArrayLike: isArrayLike$1,
|
|
43506
|
+
isBuiltInObject: isBuiltInObject,
|
|
43507
|
+
isDom: isDom,
|
|
43508
|
+
isFunction: isFunction$1,
|
|
43509
|
+
isGradientObject: isGradientObject,
|
|
43510
|
+
isImagePatternObject: isImagePatternObject,
|
|
43511
|
+
isNumber: isNumber,
|
|
43512
|
+
isObject: isObject$4,
|
|
43513
|
+
isPrimitive: isPrimitive,
|
|
43514
|
+
isRegExp: isRegExp,
|
|
43515
|
+
isString: isString,
|
|
43516
|
+
isStringSafe: isStringSafe,
|
|
43517
|
+
isTypedArray: isTypedArray$1,
|
|
43518
|
+
keys: keys,
|
|
43519
|
+
logError: logError,
|
|
43520
|
+
map: map$1,
|
|
43521
|
+
merge: merge$1,
|
|
43522
|
+
mergeAll: mergeAll,
|
|
43523
|
+
mixin: mixin,
|
|
43524
|
+
noop: noop,
|
|
43525
|
+
normalizeCssArray: normalizeCssArray$1,
|
|
43526
|
+
reduce: reduce,
|
|
43527
|
+
retrieve: retrieve,
|
|
43528
|
+
retrieve2: retrieve2,
|
|
43529
|
+
retrieve3: retrieve3,
|
|
43530
|
+
setAsPrimitive: setAsPrimitive,
|
|
43531
|
+
slice: slice,
|
|
43532
|
+
trim: trim$1
|
|
43533
|
+
});
|
|
43470
43534
|
|
|
43471
43535
|
function create$1(x, y) {
|
|
43472
43536
|
if (x == null) {
|
|
@@ -43508,9 +43572,24 @@
|
|
|
43508
43572
|
function len(v) {
|
|
43509
43573
|
return Math.sqrt(lenSquare(v));
|
|
43510
43574
|
}
|
|
43575
|
+
var length = len;
|
|
43511
43576
|
function lenSquare(v) {
|
|
43512
43577
|
return v[0] * v[0] + v[1] * v[1];
|
|
43513
43578
|
}
|
|
43579
|
+
var lengthSquare = lenSquare;
|
|
43580
|
+
function mul$1(out, v1, v2) {
|
|
43581
|
+
out[0] = v1[0] * v2[0];
|
|
43582
|
+
out[1] = v1[1] * v2[1];
|
|
43583
|
+
return out;
|
|
43584
|
+
}
|
|
43585
|
+
function div(out, v1, v2) {
|
|
43586
|
+
out[0] = v1[0] / v2[0];
|
|
43587
|
+
out[1] = v1[1] / v2[1];
|
|
43588
|
+
return out;
|
|
43589
|
+
}
|
|
43590
|
+
function dot(v1, v2) {
|
|
43591
|
+
return v1[0] * v2[0] + v1[1] * v2[1];
|
|
43592
|
+
}
|
|
43514
43593
|
function scale$2(out, v, s) {
|
|
43515
43594
|
out[0] = v[0] * s;
|
|
43516
43595
|
out[1] = v[1] * s;
|
|
@@ -43538,6 +43617,11 @@
|
|
|
43538
43617
|
+ (v1[1] - v2[1]) * (v1[1] - v2[1]);
|
|
43539
43618
|
}
|
|
43540
43619
|
var distSquare = distanceSquare;
|
|
43620
|
+
function negate(out, v) {
|
|
43621
|
+
out[0] = -v[0];
|
|
43622
|
+
out[1] = -v[1];
|
|
43623
|
+
return out;
|
|
43624
|
+
}
|
|
43541
43625
|
function lerp$1(out, v1, v2, t) {
|
|
43542
43626
|
out[0] = v1[0] + t * (v2[0] - v1[0]);
|
|
43543
43627
|
out[1] = v1[1] + t * (v2[1] - v1[1]);
|
|
@@ -43561,6 +43645,35 @@
|
|
|
43561
43645
|
return out;
|
|
43562
43646
|
}
|
|
43563
43647
|
|
|
43648
|
+
var vector = /*#__PURE__*/Object.freeze({
|
|
43649
|
+
__proto__: null,
|
|
43650
|
+
add: add,
|
|
43651
|
+
applyTransform: applyTransform$1,
|
|
43652
|
+
clone: clone$2,
|
|
43653
|
+
copy: copy$1,
|
|
43654
|
+
create: create$1,
|
|
43655
|
+
dist: dist$1,
|
|
43656
|
+
distSquare: distSquare,
|
|
43657
|
+
distance: distance,
|
|
43658
|
+
distanceSquare: distanceSquare,
|
|
43659
|
+
div: div,
|
|
43660
|
+
dot: dot,
|
|
43661
|
+
len: len,
|
|
43662
|
+
lenSquare: lenSquare,
|
|
43663
|
+
length: length,
|
|
43664
|
+
lengthSquare: lengthSquare,
|
|
43665
|
+
lerp: lerp$1,
|
|
43666
|
+
max: max$1,
|
|
43667
|
+
min: min$1,
|
|
43668
|
+
mul: mul$1,
|
|
43669
|
+
negate: negate,
|
|
43670
|
+
normalize: normalize$1,
|
|
43671
|
+
scale: scale$2,
|
|
43672
|
+
scaleAndAdd: scaleAndAdd,
|
|
43673
|
+
set: set$1,
|
|
43674
|
+
sub: sub
|
|
43675
|
+
});
|
|
43676
|
+
|
|
43564
43677
|
var Param = (function () {
|
|
43565
43678
|
function Param(target, e) {
|
|
43566
43679
|
this.target = target;
|
|
@@ -44243,6 +44356,19 @@
|
|
|
44243
44356
|
return b;
|
|
44244
44357
|
}
|
|
44245
44358
|
|
|
44359
|
+
var matrix = /*#__PURE__*/Object.freeze({
|
|
44360
|
+
__proto__: null,
|
|
44361
|
+
clone: clone$1,
|
|
44362
|
+
copy: copy,
|
|
44363
|
+
create: create,
|
|
44364
|
+
identity: identity$1,
|
|
44365
|
+
invert: invert,
|
|
44366
|
+
mul: mul,
|
|
44367
|
+
rotate: rotate,
|
|
44368
|
+
scale: scale$1,
|
|
44369
|
+
translate: translate
|
|
44370
|
+
});
|
|
44371
|
+
|
|
44246
44372
|
var Point = (function () {
|
|
44247
44373
|
function Point(x, y) {
|
|
44248
44374
|
this.x = x || 0;
|
|
@@ -46058,6 +46184,10 @@
|
|
|
46058
46184
|
}
|
|
46059
46185
|
}
|
|
46060
46186
|
}
|
|
46187
|
+
if (out) {
|
|
46188
|
+
out[0] = cubicAt(x0, x1, x2, x3, t);
|
|
46189
|
+
out[1] = cubicAt(y0, y1, y2, y3, t);
|
|
46190
|
+
}
|
|
46061
46191
|
return mathSqrt$3(d);
|
|
46062
46192
|
}
|
|
46063
46193
|
function cubicLength(x0, y0, x1, y1, x2, y2, x3, y3, iteration) {
|
|
@@ -46181,6 +46311,10 @@
|
|
|
46181
46311
|
}
|
|
46182
46312
|
}
|
|
46183
46313
|
}
|
|
46314
|
+
if (out) {
|
|
46315
|
+
out[0] = quadraticAt$1(x0, x1, x2, t);
|
|
46316
|
+
out[1] = quadraticAt$1(y0, y1, y2, t);
|
|
46317
|
+
}
|
|
46184
46318
|
return mathSqrt$3(d);
|
|
46185
46319
|
}
|
|
46186
46320
|
function quadraticLength(x0, y0, x1, y1, x2, y2, iteration) {
|
|
@@ -46690,9 +46824,12 @@
|
|
|
46690
46824
|
var colorArr = parse(color);
|
|
46691
46825
|
if (colorArr) {
|
|
46692
46826
|
for (var i = 0; i < 3; i++) {
|
|
46693
|
-
{
|
|
46827
|
+
if (level < 0) {
|
|
46694
46828
|
colorArr[i] = colorArr[i] * (1 - level) | 0;
|
|
46695
46829
|
}
|
|
46830
|
+
else {
|
|
46831
|
+
colorArr[i] = ((255 - colorArr[i]) * level + colorArr[i]) | 0;
|
|
46832
|
+
}
|
|
46696
46833
|
if (colorArr[i] > 255) {
|
|
46697
46834
|
colorArr[i] = 255;
|
|
46698
46835
|
}
|
|
@@ -46703,6 +46840,12 @@
|
|
|
46703
46840
|
return stringify(colorArr, colorArr.length === 4 ? 'rgba' : 'rgb');
|
|
46704
46841
|
}
|
|
46705
46842
|
}
|
|
46843
|
+
function toHex(color) {
|
|
46844
|
+
var colorArr = parse(color);
|
|
46845
|
+
if (colorArr) {
|
|
46846
|
+
return ((1 << 24) + (colorArr[0] << 16) + (colorArr[1] << 8) + (+colorArr[2])).toString(16).slice(1);
|
|
46847
|
+
}
|
|
46848
|
+
}
|
|
46706
46849
|
function fastLerp(normalizedValue, colors, out) {
|
|
46707
46850
|
if (!(colors && colors.length)
|
|
46708
46851
|
|| !(normalizedValue >= 0 && normalizedValue <= 1)) {
|
|
@@ -46721,6 +46864,7 @@
|
|
|
46721
46864
|
out[3] = clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv));
|
|
46722
46865
|
return out;
|
|
46723
46866
|
}
|
|
46867
|
+
var fastMapToColor = fastLerp;
|
|
46724
46868
|
function lerp(normalizedValue, colors, fullOutput) {
|
|
46725
46869
|
if (!(colors && colors.length)
|
|
46726
46870
|
|| !(normalizedValue >= 0 && normalizedValue <= 1)) {
|
|
@@ -46747,6 +46891,7 @@
|
|
|
46747
46891
|
}
|
|
46748
46892
|
: color;
|
|
46749
46893
|
}
|
|
46894
|
+
var mapToColor = lerp;
|
|
46750
46895
|
function modifyHSL(color, h, s, l) {
|
|
46751
46896
|
var colorArr = parse(color);
|
|
46752
46897
|
if (color) {
|
|
@@ -46781,6 +46926,13 @@
|
|
|
46781
46926
|
+ (1 - arr[3]) * backgroundLum
|
|
46782
46927
|
: 0;
|
|
46783
46928
|
}
|
|
46929
|
+
function random() {
|
|
46930
|
+
return stringify([
|
|
46931
|
+
Math.round(Math.random() * 255),
|
|
46932
|
+
Math.round(Math.random() * 255),
|
|
46933
|
+
Math.round(Math.random() * 255)
|
|
46934
|
+
], 'rgb');
|
|
46935
|
+
}
|
|
46784
46936
|
var liftedColorCache = new LRU(100);
|
|
46785
46937
|
function liftColor(color) {
|
|
46786
46938
|
if (isString(color)) {
|
|
@@ -46802,6 +46954,25 @@
|
|
|
46802
46954
|
return color;
|
|
46803
46955
|
}
|
|
46804
46956
|
|
|
46957
|
+
var color$2 = /*#__PURE__*/Object.freeze({
|
|
46958
|
+
__proto__: null,
|
|
46959
|
+
fastLerp: fastLerp,
|
|
46960
|
+
fastMapToColor: fastMapToColor,
|
|
46961
|
+
lerp: lerp,
|
|
46962
|
+
lift: lift,
|
|
46963
|
+
liftColor: liftColor,
|
|
46964
|
+
lum: lum,
|
|
46965
|
+
mapToColor: mapToColor,
|
|
46966
|
+
modifyAlpha: modifyAlpha,
|
|
46967
|
+
modifyHSL: modifyHSL,
|
|
46968
|
+
parse: parse,
|
|
46969
|
+
parseCssFloat: parseCssFloat,
|
|
46970
|
+
parseCssInt: parseCssInt,
|
|
46971
|
+
random: random,
|
|
46972
|
+
stringify: stringify,
|
|
46973
|
+
toHex: toHex
|
|
46974
|
+
});
|
|
46975
|
+
|
|
46805
46976
|
function isLinearGradient(val) {
|
|
46806
46977
|
return val.type === 'linear';
|
|
46807
46978
|
}
|
|
@@ -49977,9 +50148,45 @@
|
|
|
49977
50148
|
instances$1[zr.id] = zr;
|
|
49978
50149
|
return zr;
|
|
49979
50150
|
}
|
|
50151
|
+
function dispose$1(zr) {
|
|
50152
|
+
zr.dispose();
|
|
50153
|
+
}
|
|
50154
|
+
function disposeAll() {
|
|
50155
|
+
for (var key in instances$1) {
|
|
50156
|
+
if (instances$1.hasOwnProperty(key)) {
|
|
50157
|
+
instances$1[key].dispose();
|
|
50158
|
+
}
|
|
50159
|
+
}
|
|
50160
|
+
instances$1 = {};
|
|
50161
|
+
}
|
|
50162
|
+
function getInstance(id) {
|
|
50163
|
+
return instances$1[id];
|
|
50164
|
+
}
|
|
49980
50165
|
function registerPainter(name, Ctor) {
|
|
49981
50166
|
painterCtors[name] = Ctor;
|
|
49982
50167
|
}
|
|
50168
|
+
var ssrDataGetter;
|
|
50169
|
+
function getElementSSRData(el) {
|
|
50170
|
+
if (typeof ssrDataGetter === 'function') {
|
|
50171
|
+
return ssrDataGetter(el);
|
|
50172
|
+
}
|
|
50173
|
+
}
|
|
50174
|
+
function registerSSRDataGetter(getter) {
|
|
50175
|
+
ssrDataGetter = getter;
|
|
50176
|
+
}
|
|
50177
|
+
var version$2 = '6.0.0';
|
|
50178
|
+
|
|
50179
|
+
var zrender = /*#__PURE__*/Object.freeze({
|
|
50180
|
+
__proto__: null,
|
|
50181
|
+
dispose: dispose$1,
|
|
50182
|
+
disposeAll: disposeAll,
|
|
50183
|
+
getElementSSRData: getElementSSRData,
|
|
50184
|
+
getInstance: getInstance,
|
|
50185
|
+
init: init$1,
|
|
50186
|
+
registerPainter: registerPainter,
|
|
50187
|
+
registerSSRDataGetter: registerSSRDataGetter,
|
|
50188
|
+
version: version$2
|
|
50189
|
+
});
|
|
49983
50190
|
|
|
49984
50191
|
var RADIAN_EPSILON = 1e-4;
|
|
49985
50192
|
// Although chrome already enlarge this number to 100 for `toFixed`, but
|
|
@@ -50154,6 +50361,24 @@
|
|
|
50154
50361
|
var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20);
|
|
50155
50362
|
return !isFinite(precision) ? 20 : precision;
|
|
50156
50363
|
}
|
|
50364
|
+
/**
|
|
50365
|
+
* Get a data of given precision, assuring the sum of percentages
|
|
50366
|
+
* in valueList is 1.
|
|
50367
|
+
* The largest remainder method is used.
|
|
50368
|
+
* https://en.wikipedia.org/wiki/Largest_remainder_method
|
|
50369
|
+
*
|
|
50370
|
+
* @param valueList a list of all data
|
|
50371
|
+
* @param idx index of the data to be processed in valueList
|
|
50372
|
+
* @param precision integer number showing digits of precision
|
|
50373
|
+
* @return percent ranging from 0 to 100
|
|
50374
|
+
*/
|
|
50375
|
+
function getPercentWithPrecision(valueList, idx, precision) {
|
|
50376
|
+
if (!valueList[idx]) {
|
|
50377
|
+
return 0;
|
|
50378
|
+
}
|
|
50379
|
+
var seats = getPercentSeats(valueList, precision);
|
|
50380
|
+
return seats[idx] || 0;
|
|
50381
|
+
}
|
|
50157
50382
|
/**
|
|
50158
50383
|
* Get a data of given precision, assuring the sum of percentages
|
|
50159
50384
|
* in valueList is 1.
|
|
@@ -50218,6 +50443,8 @@
|
|
|
50218
50443
|
// // PENDING: support more?
|
|
50219
50444
|
return maxPrecision > ROUND_SUPPORTED_PRECISION_MAX ? sum : round$2(sum, maxPrecision);
|
|
50220
50445
|
}
|
|
50446
|
+
// Number.MAX_SAFE_INTEGER, ie do not support.
|
|
50447
|
+
var MAX_SAFE_INTEGER$2 = 9007199254740991;
|
|
50221
50448
|
/**
|
|
50222
50449
|
* To 0 - 2 * PI, considering negative radian.
|
|
50223
50450
|
*/
|
|
@@ -50336,7 +50563,7 @@
|
|
|
50336
50563
|
var exp10 = Math.pow(10, exponent);
|
|
50337
50564
|
var f = val / exp10; // 1 <= f < 10
|
|
50338
50565
|
var nf;
|
|
50339
|
-
{
|
|
50566
|
+
if (round) {
|
|
50340
50567
|
if (f < 1.5) {
|
|
50341
50568
|
nf = 1;
|
|
50342
50569
|
} else if (f < 2.5) {
|
|
@@ -50348,12 +50575,37 @@
|
|
|
50348
50575
|
} else {
|
|
50349
50576
|
nf = 10;
|
|
50350
50577
|
}
|
|
50578
|
+
} else {
|
|
50579
|
+
if (f < 1) {
|
|
50580
|
+
nf = 1;
|
|
50581
|
+
} else if (f < 2) {
|
|
50582
|
+
nf = 2;
|
|
50583
|
+
} else if (f < 3) {
|
|
50584
|
+
nf = 3;
|
|
50585
|
+
} else if (f < 5) {
|
|
50586
|
+
nf = 5;
|
|
50587
|
+
} else {
|
|
50588
|
+
nf = 10;
|
|
50589
|
+
}
|
|
50351
50590
|
}
|
|
50352
50591
|
val = nf * exp10;
|
|
50353
50592
|
// Fix 3 * 0.1 === 0.30000000000000004 issue (see IEEE 754).
|
|
50354
50593
|
// 20 is the uppper bound of toFixed.
|
|
50355
50594
|
return exponent >= -20 ? +val.toFixed(exponent < 0 ? -exponent : 0) : val;
|
|
50356
50595
|
}
|
|
50596
|
+
/**
|
|
50597
|
+
* This code was copied from "d3.js"
|
|
50598
|
+
* <https://github.com/d3/d3/blob/9cc9a875e636a1dcf36cc1e07bdf77e1ad6e2c74/src/arrays/quantile.js>.
|
|
50599
|
+
* See the license statement at the head of this file.
|
|
50600
|
+
* @param ascArr
|
|
50601
|
+
*/
|
|
50602
|
+
function quantile(ascArr, p) {
|
|
50603
|
+
var H = (ascArr.length - 1) * p + 1;
|
|
50604
|
+
var h = Math.floor(H);
|
|
50605
|
+
var v = +ascArr[h - 1];
|
|
50606
|
+
var e = H - h;
|
|
50607
|
+
return e ? v + e * (ascArr[h] - v) : v;
|
|
50608
|
+
}
|
|
50357
50609
|
/**
|
|
50358
50610
|
* Order intervals asc, and split them when overlap.
|
|
50359
50611
|
* expect(numberUtil.reformIntervals([
|
|
@@ -51605,6 +51857,11 @@
|
|
|
51605
51857
|
}
|
|
51606
51858
|
|
|
51607
51859
|
var STYLE_REG = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
|
|
51860
|
+
function truncateText(text, containerWidth, font, ellipsis, options) {
|
|
51861
|
+
var out = {};
|
|
51862
|
+
truncateText2(out, text, containerWidth, font, ellipsis, options);
|
|
51863
|
+
return out.text;
|
|
51864
|
+
}
|
|
51608
51865
|
function truncateText2(out, text, containerWidth, font, ellipsis, options) {
|
|
51609
51866
|
if (!containerWidth) {
|
|
51610
51867
|
out.text = '';
|
|
@@ -52470,7 +52727,7 @@
|
|
|
52470
52727
|
var mathMax$7 = Math.max;
|
|
52471
52728
|
var mathSin$3 = Math.sin;
|
|
52472
52729
|
var mathCos$3 = Math.cos;
|
|
52473
|
-
var PI2$
|
|
52730
|
+
var PI2$7 = Math.PI * 2;
|
|
52474
52731
|
var start = create$1();
|
|
52475
52732
|
var end = create$1();
|
|
52476
52733
|
var extremity = create$1();
|
|
@@ -52547,7 +52804,7 @@
|
|
|
52547
52804
|
var vec2Min = min$1;
|
|
52548
52805
|
var vec2Max = max$1;
|
|
52549
52806
|
var diff = Math.abs(startAngle - endAngle);
|
|
52550
|
-
if (diff % PI2$
|
|
52807
|
+
if (diff % PI2$7 < 1e-4 && diff > 1e-4) {
|
|
52551
52808
|
min[0] = x - rx;
|
|
52552
52809
|
min[1] = y - ry;
|
|
52553
52810
|
max[0] = x + rx;
|
|
@@ -52560,19 +52817,19 @@
|
|
|
52560
52817
|
end[1] = mathSin$3(endAngle) * ry + y;
|
|
52561
52818
|
vec2Min(min, start, end);
|
|
52562
52819
|
vec2Max(max, start, end);
|
|
52563
|
-
startAngle = startAngle % (PI2$
|
|
52820
|
+
startAngle = startAngle % (PI2$7);
|
|
52564
52821
|
if (startAngle < 0) {
|
|
52565
|
-
startAngle = startAngle + PI2$
|
|
52822
|
+
startAngle = startAngle + PI2$7;
|
|
52566
52823
|
}
|
|
52567
|
-
endAngle = endAngle % (PI2$
|
|
52824
|
+
endAngle = endAngle % (PI2$7);
|
|
52568
52825
|
if (endAngle < 0) {
|
|
52569
|
-
endAngle = endAngle + PI2$
|
|
52826
|
+
endAngle = endAngle + PI2$7;
|
|
52570
52827
|
}
|
|
52571
52828
|
if (startAngle > endAngle && !anticlockwise) {
|
|
52572
|
-
endAngle += PI2$
|
|
52829
|
+
endAngle += PI2$7;
|
|
52573
52830
|
}
|
|
52574
52831
|
else if (startAngle < endAngle && anticlockwise) {
|
|
52575
|
-
startAngle += PI2$
|
|
52832
|
+
startAngle += PI2$7;
|
|
52576
52833
|
}
|
|
52577
52834
|
if (anticlockwise) {
|
|
52578
52835
|
var tmp = endAngle;
|
|
@@ -52589,7 +52846,7 @@
|
|
|
52589
52846
|
}
|
|
52590
52847
|
}
|
|
52591
52848
|
|
|
52592
|
-
var CMD$
|
|
52849
|
+
var CMD$3 = {
|
|
52593
52850
|
M: 1,
|
|
52594
52851
|
L: 2,
|
|
52595
52852
|
C: 3,
|
|
@@ -52610,7 +52867,7 @@
|
|
|
52610
52867
|
var mathSin$2 = Math.sin;
|
|
52611
52868
|
var mathAbs$3 = Math.abs;
|
|
52612
52869
|
var PI$6 = Math.PI;
|
|
52613
|
-
var PI2$
|
|
52870
|
+
var PI2$6 = PI$6 * 2;
|
|
52614
52871
|
var hasTypedArray = typeof Float32Array !== 'undefined';
|
|
52615
52872
|
var tmpAngles = [];
|
|
52616
52873
|
function modPI2(radian) {
|
|
@@ -52620,22 +52877,22 @@
|
|
|
52620
52877
|
function normalizeArcAngles(angles, anticlockwise) {
|
|
52621
52878
|
var newStartAngle = modPI2(angles[0]);
|
|
52622
52879
|
if (newStartAngle < 0) {
|
|
52623
|
-
newStartAngle += PI2$
|
|
52880
|
+
newStartAngle += PI2$6;
|
|
52624
52881
|
}
|
|
52625
52882
|
var delta = newStartAngle - angles[0];
|
|
52626
52883
|
var newEndAngle = angles[1];
|
|
52627
52884
|
newEndAngle += delta;
|
|
52628
|
-
if (!anticlockwise && newEndAngle - newStartAngle >= PI2$
|
|
52629
|
-
newEndAngle = newStartAngle + PI2$
|
|
52885
|
+
if (!anticlockwise && newEndAngle - newStartAngle >= PI2$6) {
|
|
52886
|
+
newEndAngle = newStartAngle + PI2$6;
|
|
52630
52887
|
}
|
|
52631
|
-
else if (anticlockwise && newStartAngle - newEndAngle >= PI2$
|
|
52632
|
-
newEndAngle = newStartAngle - PI2$
|
|
52888
|
+
else if (anticlockwise && newStartAngle - newEndAngle >= PI2$6) {
|
|
52889
|
+
newEndAngle = newStartAngle - PI2$6;
|
|
52633
52890
|
}
|
|
52634
52891
|
else if (!anticlockwise && newStartAngle > newEndAngle) {
|
|
52635
|
-
newEndAngle = newStartAngle + (PI2$
|
|
52892
|
+
newEndAngle = newStartAngle + (PI2$6 - modPI2(newStartAngle - newEndAngle));
|
|
52636
52893
|
}
|
|
52637
52894
|
else if (anticlockwise && newStartAngle < newEndAngle) {
|
|
52638
|
-
newEndAngle = newStartAngle - (PI2$
|
|
52895
|
+
newEndAngle = newStartAngle - (PI2$6 - modPI2(newEndAngle - newStartAngle));
|
|
52639
52896
|
}
|
|
52640
52897
|
angles[0] = newStartAngle;
|
|
52641
52898
|
angles[1] = newEndAngle;
|
|
@@ -52694,7 +52951,7 @@
|
|
|
52694
52951
|
};
|
|
52695
52952
|
PathProxy.prototype.moveTo = function (x, y) {
|
|
52696
52953
|
this._drawPendingPt();
|
|
52697
|
-
this.addData(CMD$
|
|
52954
|
+
this.addData(CMD$3.M, x, y);
|
|
52698
52955
|
this._ctx && this._ctx.moveTo(x, y);
|
|
52699
52956
|
this._x0 = x;
|
|
52700
52957
|
this._y0 = y;
|
|
@@ -52706,7 +52963,7 @@
|
|
|
52706
52963
|
var dx = mathAbs$3(x - this._xi);
|
|
52707
52964
|
var dy = mathAbs$3(y - this._yi);
|
|
52708
52965
|
var exceedUnit = dx > this._ux || dy > this._uy;
|
|
52709
|
-
this.addData(CMD$
|
|
52966
|
+
this.addData(CMD$3.L, x, y);
|
|
52710
52967
|
if (this._ctx && exceedUnit) {
|
|
52711
52968
|
this._ctx.lineTo(x, y);
|
|
52712
52969
|
}
|
|
@@ -52727,7 +52984,7 @@
|
|
|
52727
52984
|
};
|
|
52728
52985
|
PathProxy.prototype.bezierCurveTo = function (x1, y1, x2, y2, x3, y3) {
|
|
52729
52986
|
this._drawPendingPt();
|
|
52730
|
-
this.addData(CMD$
|
|
52987
|
+
this.addData(CMD$3.C, x1, y1, x2, y2, x3, y3);
|
|
52731
52988
|
if (this._ctx) {
|
|
52732
52989
|
this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3);
|
|
52733
52990
|
}
|
|
@@ -52737,7 +52994,7 @@
|
|
|
52737
52994
|
};
|
|
52738
52995
|
PathProxy.prototype.quadraticCurveTo = function (x1, y1, x2, y2) {
|
|
52739
52996
|
this._drawPendingPt();
|
|
52740
|
-
this.addData(CMD$
|
|
52997
|
+
this.addData(CMD$3.Q, x1, y1, x2, y2);
|
|
52741
52998
|
if (this._ctx) {
|
|
52742
52999
|
this._ctx.quadraticCurveTo(x1, y1, x2, y2);
|
|
52743
53000
|
}
|
|
@@ -52753,7 +53010,7 @@
|
|
|
52753
53010
|
startAngle = tmpAngles[0];
|
|
52754
53011
|
endAngle = tmpAngles[1];
|
|
52755
53012
|
var delta = endAngle - startAngle;
|
|
52756
|
-
this.addData(CMD$
|
|
53013
|
+
this.addData(CMD$3.A, cx, cy, r, r, startAngle, delta, 0, anticlockwise ? 0 : 1);
|
|
52757
53014
|
this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise);
|
|
52758
53015
|
this._xi = mathCos$2(endAngle) * r + cx;
|
|
52759
53016
|
this._yi = mathSin$2(endAngle) * r + cy;
|
|
@@ -52769,12 +53026,12 @@
|
|
|
52769
53026
|
PathProxy.prototype.rect = function (x, y, w, h) {
|
|
52770
53027
|
this._drawPendingPt();
|
|
52771
53028
|
this._ctx && this._ctx.rect(x, y, w, h);
|
|
52772
|
-
this.addData(CMD$
|
|
53029
|
+
this.addData(CMD$3.R, x, y, w, h);
|
|
52773
53030
|
return this;
|
|
52774
53031
|
};
|
|
52775
53032
|
PathProxy.prototype.closePath = function () {
|
|
52776
53033
|
this._drawPendingPt();
|
|
52777
|
-
this.addData(CMD$
|
|
53034
|
+
this.addData(CMD$3.Z);
|
|
52778
53035
|
var ctx = this._ctx;
|
|
52779
53036
|
var x0 = this._x0;
|
|
52780
53037
|
var y0 = this._y0;
|
|
@@ -52899,7 +53156,7 @@
|
|
|
52899
53156
|
y0 = yi;
|
|
52900
53157
|
}
|
|
52901
53158
|
switch (cmd) {
|
|
52902
|
-
case CMD$
|
|
53159
|
+
case CMD$3.M:
|
|
52903
53160
|
xi = x0 = data[i++];
|
|
52904
53161
|
yi = y0 = data[i++];
|
|
52905
53162
|
min2[0] = x0;
|
|
@@ -52907,22 +53164,22 @@
|
|
|
52907
53164
|
max2[0] = x0;
|
|
52908
53165
|
max2[1] = y0;
|
|
52909
53166
|
break;
|
|
52910
|
-
case CMD$
|
|
53167
|
+
case CMD$3.L:
|
|
52911
53168
|
fromLine(xi, yi, data[i], data[i + 1], min2, max2);
|
|
52912
53169
|
xi = data[i++];
|
|
52913
53170
|
yi = data[i++];
|
|
52914
53171
|
break;
|
|
52915
|
-
case CMD$
|
|
53172
|
+
case CMD$3.C:
|
|
52916
53173
|
fromCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], min2, max2);
|
|
52917
53174
|
xi = data[i++];
|
|
52918
53175
|
yi = data[i++];
|
|
52919
53176
|
break;
|
|
52920
|
-
case CMD$
|
|
53177
|
+
case CMD$3.Q:
|
|
52921
53178
|
fromQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], min2, max2);
|
|
52922
53179
|
xi = data[i++];
|
|
52923
53180
|
yi = data[i++];
|
|
52924
53181
|
break;
|
|
52925
|
-
case CMD$
|
|
53182
|
+
case CMD$3.A:
|
|
52926
53183
|
var cx = data[i++];
|
|
52927
53184
|
var cy = data[i++];
|
|
52928
53185
|
var rx = data[i++];
|
|
@@ -52939,14 +53196,14 @@
|
|
|
52939
53196
|
xi = mathCos$2(endAngle) * rx + cx;
|
|
52940
53197
|
yi = mathSin$2(endAngle) * ry + cy;
|
|
52941
53198
|
break;
|
|
52942
|
-
case CMD$
|
|
53199
|
+
case CMD$3.R:
|
|
52943
53200
|
x0 = xi = data[i++];
|
|
52944
53201
|
y0 = yi = data[i++];
|
|
52945
53202
|
var width = data[i++];
|
|
52946
53203
|
var height = data[i++];
|
|
52947
53204
|
fromLine(x0, y0, x0 + width, y0 + height, min2, max2);
|
|
52948
53205
|
break;
|
|
52949
|
-
case CMD$
|
|
53206
|
+
case CMD$3.Z:
|
|
52950
53207
|
xi = x0;
|
|
52951
53208
|
yi = y0;
|
|
52952
53209
|
break;
|
|
@@ -52985,11 +53242,11 @@
|
|
|
52985
53242
|
}
|
|
52986
53243
|
var l = -1;
|
|
52987
53244
|
switch (cmd) {
|
|
52988
|
-
case CMD$
|
|
53245
|
+
case CMD$3.M:
|
|
52989
53246
|
xi = x0 = data[i++];
|
|
52990
53247
|
yi = y0 = data[i++];
|
|
52991
53248
|
break;
|
|
52992
|
-
case CMD$
|
|
53249
|
+
case CMD$3.L: {
|
|
52993
53250
|
var x2 = data[i++];
|
|
52994
53251
|
var y2 = data[i++];
|
|
52995
53252
|
var dx = x2 - xi;
|
|
@@ -53001,7 +53258,7 @@
|
|
|
53001
53258
|
}
|
|
53002
53259
|
break;
|
|
53003
53260
|
}
|
|
53004
|
-
case CMD$
|
|
53261
|
+
case CMD$3.C: {
|
|
53005
53262
|
var x1 = data[i++];
|
|
53006
53263
|
var y1 = data[i++];
|
|
53007
53264
|
var x2 = data[i++];
|
|
@@ -53013,7 +53270,7 @@
|
|
|
53013
53270
|
yi = y3;
|
|
53014
53271
|
break;
|
|
53015
53272
|
}
|
|
53016
|
-
case CMD$
|
|
53273
|
+
case CMD$3.Q: {
|
|
53017
53274
|
var x1 = data[i++];
|
|
53018
53275
|
var y1 = data[i++];
|
|
53019
53276
|
var x2 = data[i++];
|
|
@@ -53023,7 +53280,7 @@
|
|
|
53023
53280
|
yi = y2;
|
|
53024
53281
|
break;
|
|
53025
53282
|
}
|
|
53026
|
-
case CMD$
|
|
53283
|
+
case CMD$3.A:
|
|
53027
53284
|
var cx = data[i++];
|
|
53028
53285
|
var cy = data[i++];
|
|
53029
53286
|
var rx = data[i++];
|
|
@@ -53036,11 +53293,11 @@
|
|
|
53036
53293
|
x0 = mathCos$2(startAngle) * rx + cx;
|
|
53037
53294
|
y0 = mathSin$2(startAngle) * ry + cy;
|
|
53038
53295
|
}
|
|
53039
|
-
l = mathMax$6(rx, ry) * mathMin$6(PI2$
|
|
53296
|
+
l = mathMax$6(rx, ry) * mathMin$6(PI2$6, Math.abs(delta));
|
|
53040
53297
|
xi = mathCos$2(endAngle) * rx + cx;
|
|
53041
53298
|
yi = mathSin$2(endAngle) * ry + cy;
|
|
53042
53299
|
break;
|
|
53043
|
-
case CMD$
|
|
53300
|
+
case CMD$3.R: {
|
|
53044
53301
|
x0 = xi = data[i++];
|
|
53045
53302
|
y0 = yi = data[i++];
|
|
53046
53303
|
var width = data[i++];
|
|
@@ -53048,7 +53305,7 @@
|
|
|
53048
53305
|
l = width * 2 + height * 2;
|
|
53049
53306
|
break;
|
|
53050
53307
|
}
|
|
53051
|
-
case CMD$
|
|
53308
|
+
case CMD$3.Z: {
|
|
53052
53309
|
var dx = x0 - xi;
|
|
53053
53310
|
var dy = y0 - yi;
|
|
53054
53311
|
l = Math.sqrt(dx * dx + dy * dy);
|
|
@@ -53105,17 +53362,17 @@
|
|
|
53105
53362
|
x0 = xi;
|
|
53106
53363
|
y0 = yi;
|
|
53107
53364
|
}
|
|
53108
|
-
if (cmd !== CMD$
|
|
53365
|
+
if (cmd !== CMD$3.L && pendingPtDist > 0) {
|
|
53109
53366
|
ctx.lineTo(pendingPtX, pendingPtY);
|
|
53110
53367
|
pendingPtDist = 0;
|
|
53111
53368
|
}
|
|
53112
53369
|
switch (cmd) {
|
|
53113
|
-
case CMD$
|
|
53370
|
+
case CMD$3.M:
|
|
53114
53371
|
x0 = xi = d[i++];
|
|
53115
53372
|
y0 = yi = d[i++];
|
|
53116
53373
|
ctx.moveTo(xi, yi);
|
|
53117
53374
|
break;
|
|
53118
|
-
case CMD$
|
|
53375
|
+
case CMD$3.L: {
|
|
53119
53376
|
x = d[i++];
|
|
53120
53377
|
y = d[i++];
|
|
53121
53378
|
var dx = mathAbs$3(x - xi);
|
|
@@ -53145,7 +53402,7 @@
|
|
|
53145
53402
|
}
|
|
53146
53403
|
break;
|
|
53147
53404
|
}
|
|
53148
|
-
case CMD$
|
|
53405
|
+
case CMD$3.C: {
|
|
53149
53406
|
var x1 = d[i++];
|
|
53150
53407
|
var y1 = d[i++];
|
|
53151
53408
|
var x2 = d[i++];
|
|
@@ -53168,7 +53425,7 @@
|
|
|
53168
53425
|
yi = y3;
|
|
53169
53426
|
break;
|
|
53170
53427
|
}
|
|
53171
|
-
case CMD$
|
|
53428
|
+
case CMD$3.Q: {
|
|
53172
53429
|
var x1 = d[i++];
|
|
53173
53430
|
var y1 = d[i++];
|
|
53174
53431
|
var x2 = d[i++];
|
|
@@ -53189,7 +53446,7 @@
|
|
|
53189
53446
|
yi = y2;
|
|
53190
53447
|
break;
|
|
53191
53448
|
}
|
|
53192
|
-
case CMD$
|
|
53449
|
+
case CMD$3.A:
|
|
53193
53450
|
var cx = d[i++];
|
|
53194
53451
|
var cy = d[i++];
|
|
53195
53452
|
var rx = d[i++];
|
|
@@ -53226,7 +53483,7 @@
|
|
|
53226
53483
|
xi = mathCos$2(endAngle) * rx + cx;
|
|
53227
53484
|
yi = mathSin$2(endAngle) * ry + cy;
|
|
53228
53485
|
break;
|
|
53229
|
-
case CMD$
|
|
53486
|
+
case CMD$3.R:
|
|
53230
53487
|
x0 = xi = d[i];
|
|
53231
53488
|
y0 = yi = d[i + 1];
|
|
53232
53489
|
x = d[i++];
|
|
@@ -53257,7 +53514,7 @@
|
|
|
53257
53514
|
}
|
|
53258
53515
|
ctx.rect(x, y, width, height);
|
|
53259
53516
|
break;
|
|
53260
|
-
case CMD$
|
|
53517
|
+
case CMD$3.Z:
|
|
53261
53518
|
if (drawPart) {
|
|
53262
53519
|
var l = pathSegLen[segCount++];
|
|
53263
53520
|
if (accumLength + l > displayedLength) {
|
|
@@ -53284,7 +53541,7 @@
|
|
|
53284
53541
|
PathProxy.prototype.canSave = function () {
|
|
53285
53542
|
return !!this._saveData;
|
|
53286
53543
|
};
|
|
53287
|
-
PathProxy.CMD = CMD$
|
|
53544
|
+
PathProxy.CMD = CMD$3;
|
|
53288
53545
|
PathProxy.initDefaultProps = (function () {
|
|
53289
53546
|
var proto = PathProxy.prototype;
|
|
53290
53547
|
proto._saveData = true;
|
|
@@ -53332,7 +53589,7 @@
|
|
|
53332
53589
|
|| (x < x0 - _l && x < x1 - _l && x < x2 - _l && x < x3 - _l)) {
|
|
53333
53590
|
return false;
|
|
53334
53591
|
}
|
|
53335
|
-
var d = cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y);
|
|
53592
|
+
var d = cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, null);
|
|
53336
53593
|
return d <= _l / 2;
|
|
53337
53594
|
}
|
|
53338
53595
|
|
|
@@ -53347,20 +53604,20 @@
|
|
|
53347
53604
|
|| (x < x0 - _l && x < x1 - _l && x < x2 - _l)) {
|
|
53348
53605
|
return false;
|
|
53349
53606
|
}
|
|
53350
|
-
var d = quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y);
|
|
53607
|
+
var d = quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, null);
|
|
53351
53608
|
return d <= _l / 2;
|
|
53352
53609
|
}
|
|
53353
53610
|
|
|
53354
|
-
var PI2$
|
|
53611
|
+
var PI2$5 = Math.PI * 2;
|
|
53355
53612
|
function normalizeRadian(angle) {
|
|
53356
|
-
angle %= PI2$
|
|
53613
|
+
angle %= PI2$5;
|
|
53357
53614
|
if (angle < 0) {
|
|
53358
|
-
angle += PI2$
|
|
53615
|
+
angle += PI2$5;
|
|
53359
53616
|
}
|
|
53360
53617
|
return angle;
|
|
53361
53618
|
}
|
|
53362
53619
|
|
|
53363
|
-
var PI2$
|
|
53620
|
+
var PI2$4 = Math.PI * 2;
|
|
53364
53621
|
function containStroke$1(cx, cy, r, startAngle, endAngle, anticlockwise, lineWidth, x, y) {
|
|
53365
53622
|
if (lineWidth === 0) {
|
|
53366
53623
|
return false;
|
|
@@ -53372,7 +53629,7 @@
|
|
|
53372
53629
|
if ((d - _l > r) || (d + _l < r)) {
|
|
53373
53630
|
return false;
|
|
53374
53631
|
}
|
|
53375
|
-
if (Math.abs(startAngle - endAngle) % PI2$
|
|
53632
|
+
if (Math.abs(startAngle - endAngle) % PI2$4 < 1e-4) {
|
|
53376
53633
|
return true;
|
|
53377
53634
|
}
|
|
53378
53635
|
if (anticlockwise) {
|
|
@@ -53385,14 +53642,14 @@
|
|
|
53385
53642
|
endAngle = normalizeRadian(endAngle);
|
|
53386
53643
|
}
|
|
53387
53644
|
if (startAngle > endAngle) {
|
|
53388
|
-
endAngle += PI2$
|
|
53645
|
+
endAngle += PI2$4;
|
|
53389
53646
|
}
|
|
53390
53647
|
var angle = Math.atan2(y, x);
|
|
53391
53648
|
if (angle < 0) {
|
|
53392
|
-
angle += PI2$
|
|
53649
|
+
angle += PI2$4;
|
|
53393
53650
|
}
|
|
53394
53651
|
return (angle >= startAngle && angle <= endAngle)
|
|
53395
|
-
|| (angle + PI2$
|
|
53652
|
+
|| (angle + PI2$4 >= startAngle && angle + PI2$4 <= endAngle);
|
|
53396
53653
|
}
|
|
53397
53654
|
|
|
53398
53655
|
function windingLine(x0, y0, x1, y1, x, y) {
|
|
@@ -53411,8 +53668,8 @@
|
|
|
53411
53668
|
return x_ === x ? Infinity : x_ > x ? dir : 0;
|
|
53412
53669
|
}
|
|
53413
53670
|
|
|
53414
|
-
var CMD$
|
|
53415
|
-
var PI2$
|
|
53671
|
+
var CMD$2 = PathProxy.CMD;
|
|
53672
|
+
var PI2$3 = Math.PI * 2;
|
|
53416
53673
|
var EPSILON$1 = 1e-4;
|
|
53417
53674
|
function isAroundEqual$1(a, b) {
|
|
53418
53675
|
return Math.abs(a - b) < EPSILON$1;
|
|
@@ -53529,9 +53786,9 @@
|
|
|
53529
53786
|
if (dTheta < 1e-4) {
|
|
53530
53787
|
return 0;
|
|
53531
53788
|
}
|
|
53532
|
-
if (dTheta >= PI2$
|
|
53789
|
+
if (dTheta >= PI2$3 - 1e-4) {
|
|
53533
53790
|
startAngle = 0;
|
|
53534
|
-
endAngle = PI2$
|
|
53791
|
+
endAngle = PI2$3;
|
|
53535
53792
|
var dir = anticlockwise ? 1 : -1;
|
|
53536
53793
|
if (x >= roots[0] + cx && x <= roots[1] + cx) {
|
|
53537
53794
|
return dir;
|
|
@@ -53546,8 +53803,8 @@
|
|
|
53546
53803
|
endAngle = tmp_1;
|
|
53547
53804
|
}
|
|
53548
53805
|
if (startAngle < 0) {
|
|
53549
|
-
startAngle += PI2$
|
|
53550
|
-
endAngle += PI2$
|
|
53806
|
+
startAngle += PI2$3;
|
|
53807
|
+
endAngle += PI2$3;
|
|
53551
53808
|
}
|
|
53552
53809
|
var w = 0;
|
|
53553
53810
|
for (var i = 0; i < 2; i++) {
|
|
@@ -53556,10 +53813,10 @@
|
|
|
53556
53813
|
var angle = Math.atan2(y, x_);
|
|
53557
53814
|
var dir = anticlockwise ? 1 : -1;
|
|
53558
53815
|
if (angle < 0) {
|
|
53559
|
-
angle = PI2$
|
|
53816
|
+
angle = PI2$3 + angle;
|
|
53560
53817
|
}
|
|
53561
53818
|
if ((angle >= startAngle && angle <= endAngle)
|
|
53562
|
-
|| (angle + PI2$
|
|
53819
|
+
|| (angle + PI2$3 >= startAngle && angle + PI2$3 <= endAngle)) {
|
|
53563
53820
|
if (angle > Math.PI / 2 && angle < Math.PI * 1.5) {
|
|
53564
53821
|
dir = -dir;
|
|
53565
53822
|
}
|
|
@@ -53582,7 +53839,7 @@
|
|
|
53582
53839
|
for (var i = 0; i < len;) {
|
|
53583
53840
|
var cmd = data[i++];
|
|
53584
53841
|
var isFirst = i === 1;
|
|
53585
|
-
if (cmd === CMD$
|
|
53842
|
+
if (cmd === CMD$2.M && i > 1) {
|
|
53586
53843
|
if (!isStroke) {
|
|
53587
53844
|
w += windingLine(xi, yi, x0, y0, x, y);
|
|
53588
53845
|
}
|
|
@@ -53594,13 +53851,13 @@
|
|
|
53594
53851
|
y0 = yi;
|
|
53595
53852
|
}
|
|
53596
53853
|
switch (cmd) {
|
|
53597
|
-
case CMD$
|
|
53854
|
+
case CMD$2.M:
|
|
53598
53855
|
x0 = data[i++];
|
|
53599
53856
|
y0 = data[i++];
|
|
53600
53857
|
xi = x0;
|
|
53601
53858
|
yi = y0;
|
|
53602
53859
|
break;
|
|
53603
|
-
case CMD$
|
|
53860
|
+
case CMD$2.L:
|
|
53604
53861
|
if (isStroke) {
|
|
53605
53862
|
if (containStroke$4(xi, yi, data[i], data[i + 1], lineWidth, x, y)) {
|
|
53606
53863
|
return true;
|
|
@@ -53612,7 +53869,7 @@
|
|
|
53612
53869
|
xi = data[i++];
|
|
53613
53870
|
yi = data[i++];
|
|
53614
53871
|
break;
|
|
53615
|
-
case CMD$
|
|
53872
|
+
case CMD$2.C:
|
|
53616
53873
|
if (isStroke) {
|
|
53617
53874
|
if (containStroke$3(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) {
|
|
53618
53875
|
return true;
|
|
@@ -53624,7 +53881,7 @@
|
|
|
53624
53881
|
xi = data[i++];
|
|
53625
53882
|
yi = data[i++];
|
|
53626
53883
|
break;
|
|
53627
|
-
case CMD$
|
|
53884
|
+
case CMD$2.Q:
|
|
53628
53885
|
if (isStroke) {
|
|
53629
53886
|
if (containStroke$2(xi, yi, data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) {
|
|
53630
53887
|
return true;
|
|
@@ -53636,7 +53893,7 @@
|
|
|
53636
53893
|
xi = data[i++];
|
|
53637
53894
|
yi = data[i++];
|
|
53638
53895
|
break;
|
|
53639
|
-
case CMD$
|
|
53896
|
+
case CMD$2.A:
|
|
53640
53897
|
var cx = data[i++];
|
|
53641
53898
|
var cy = data[i++];
|
|
53642
53899
|
var rx = data[i++];
|
|
@@ -53666,7 +53923,7 @@
|
|
|
53666
53923
|
xi = Math.cos(theta + dTheta) * rx + cx;
|
|
53667
53924
|
yi = Math.sin(theta + dTheta) * ry + cy;
|
|
53668
53925
|
break;
|
|
53669
|
-
case CMD$
|
|
53926
|
+
case CMD$2.R:
|
|
53670
53927
|
x0 = xi = data[i++];
|
|
53671
53928
|
y0 = yi = data[i++];
|
|
53672
53929
|
var width = data[i++];
|
|
@@ -53686,7 +53943,7 @@
|
|
|
53686
53943
|
w += windingLine(x0, y1, x0, y0, x, y);
|
|
53687
53944
|
}
|
|
53688
53945
|
break;
|
|
53689
|
-
case CMD$
|
|
53946
|
+
case CMD$2.Z:
|
|
53690
53947
|
if (isStroke) {
|
|
53691
53948
|
if (containStroke$4(xi, yi, x0, y0, lineWidth, x, y)) {
|
|
53692
53949
|
return true;
|
|
@@ -55605,7 +55862,7 @@
|
|
|
55605
55862
|
store.selectStroke = selectState.style && selectState.style.stroke || null;
|
|
55606
55863
|
}
|
|
55607
55864
|
|
|
55608
|
-
var CMD = PathProxy.CMD;
|
|
55865
|
+
var CMD$1 = PathProxy.CMD;
|
|
55609
55866
|
var points$2 = [[], [], []];
|
|
55610
55867
|
var mathSqrt$2 = Math.sqrt;
|
|
55611
55868
|
var mathAtan2 = Math.atan2;
|
|
@@ -55621,12 +55878,12 @@
|
|
|
55621
55878
|
var j;
|
|
55622
55879
|
var k;
|
|
55623
55880
|
var p;
|
|
55624
|
-
var M = CMD.M;
|
|
55625
|
-
var C = CMD.C;
|
|
55626
|
-
var L = CMD.L;
|
|
55627
|
-
var R = CMD.R;
|
|
55628
|
-
var A = CMD.A;
|
|
55629
|
-
var Q = CMD.Q;
|
|
55881
|
+
var M = CMD$1.M;
|
|
55882
|
+
var C = CMD$1.C;
|
|
55883
|
+
var L = CMD$1.L;
|
|
55884
|
+
var R = CMD$1.R;
|
|
55885
|
+
var A = CMD$1.A;
|
|
55886
|
+
var Q = CMD$1.Q;
|
|
55630
55887
|
for (i = 0, j = 0; i < len;) {
|
|
55631
55888
|
cmd = data[i++];
|
|
55632
55889
|
j = i;
|
|
@@ -56089,7 +56346,7 @@
|
|
|
56089
56346
|
Ellipse.prototype.type = 'ellipse';
|
|
56090
56347
|
|
|
56091
56348
|
var PI$4 = Math.PI;
|
|
56092
|
-
var PI2$
|
|
56349
|
+
var PI2$2 = PI$4 * 2;
|
|
56093
56350
|
var mathSin = Math.sin;
|
|
56094
56351
|
var mathCos = Math.cos;
|
|
56095
56352
|
var mathACos = Math.acos;
|
|
@@ -56200,12 +56457,12 @@
|
|
|
56200
56457
|
var cx = shape.cx, cy = shape.cy;
|
|
56201
56458
|
var clockwise = !!shape.clockwise;
|
|
56202
56459
|
var arc = mathAbs$2(endAngle - startAngle);
|
|
56203
|
-
var mod = arc > PI2$
|
|
56460
|
+
var mod = arc > PI2$2 && arc % PI2$2;
|
|
56204
56461
|
mod > e && (arc = mod);
|
|
56205
56462
|
if (!(radius > e)) {
|
|
56206
56463
|
ctx.moveTo(cx, cy);
|
|
56207
56464
|
}
|
|
56208
|
-
else if (arc > PI2$
|
|
56465
|
+
else if (arc > PI2$2 - e) {
|
|
56209
56466
|
ctx.moveTo(cx + radius * mathCos(startAngle), cy + radius * mathSin(startAngle));
|
|
56210
56467
|
ctx.arc(cx, cy, radius, startAngle, endAngle, !clockwise);
|
|
56211
56468
|
if (innerRadius > e) {
|
|
@@ -58013,7 +58270,7 @@
|
|
|
58013
58270
|
var labelStatesTexts = getLabelText(opt, labelStatesModels);
|
|
58014
58271
|
var normalModel = labelStatesModels.normal;
|
|
58015
58272
|
var showNormal = !!normalModel.getShallow('show');
|
|
58016
|
-
var normalStyle = createTextStyle(normalModel, stateSpecified && stateSpecified.normal, opt, false, !isSetOnText);
|
|
58273
|
+
var normalStyle = createTextStyle$1(normalModel, stateSpecified && stateSpecified.normal, opt, false, !isSetOnText);
|
|
58017
58274
|
normalStyle.text = labelStatesTexts.normal;
|
|
58018
58275
|
if (!isSetOnText) {
|
|
58019
58276
|
// Always create new
|
|
@@ -58028,7 +58285,7 @@
|
|
|
58028
58285
|
if (stateShow !== showNormal) {
|
|
58029
58286
|
stateObj.ignore = !stateShow;
|
|
58030
58287
|
}
|
|
58031
|
-
stateObj.style = createTextStyle(stateModel, stateSpecified && stateSpecified[stateName], opt, true, !isSetOnText);
|
|
58288
|
+
stateObj.style = createTextStyle$1(stateModel, stateSpecified && stateSpecified[stateName], opt, true, !isSetOnText);
|
|
58032
58289
|
stateObj.style.text = labelStatesTexts[stateName];
|
|
58033
58290
|
if (!isSetOnText) {
|
|
58034
58291
|
var targetElEmphasisState = targetEl.ensureState(stateName);
|
|
@@ -58077,7 +58334,7 @@
|
|
|
58077
58334
|
/**
|
|
58078
58335
|
* Set basic textStyle properties.
|
|
58079
58336
|
*/
|
|
58080
|
-
function createTextStyle(textStyleModel, specifiedTextStyle,
|
|
58337
|
+
function createTextStyle$1(textStyleModel, specifiedTextStyle,
|
|
58081
58338
|
// Fixed style in the code. Can't be set by model.
|
|
58082
58339
|
opt, isNotNormal, isAttached // If text is attached on an element. If so, auto color will handling in zrender.
|
|
58083
58340
|
) {
|
|
@@ -59295,7 +59552,7 @@
|
|
|
59295
59552
|
return 'second';
|
|
59296
59553
|
}
|
|
59297
59554
|
}
|
|
59298
|
-
function format(
|
|
59555
|
+
function format$1(
|
|
59299
59556
|
// Note: The result based on `isUTC` are totally different, which can not be just simply
|
|
59300
59557
|
// substituted by the result without `isUTC`. So we make the param `isUTC` mandatory.
|
|
59301
59558
|
time, template, isUTC, lang) {
|
|
@@ -59346,7 +59603,7 @@
|
|
|
59346
59603
|
template = formatter[unit][unit][0];
|
|
59347
59604
|
}
|
|
59348
59605
|
}
|
|
59349
|
-
return format(new Date(tick.value), template, isUTC, lang);
|
|
59606
|
+
return format$1(new Date(tick.value), template, isUTC, lang);
|
|
59350
59607
|
}
|
|
59351
59608
|
function getUnitFromValue(value, isUTC) {
|
|
59352
59609
|
var date = parseDate(value);
|
|
@@ -59477,6 +59734,22 @@
|
|
|
59477
59734
|
return isUTC ? 'setUTCMilliseconds' : 'setMilliseconds';
|
|
59478
59735
|
}
|
|
59479
59736
|
|
|
59737
|
+
function getTextRect(text, font, align, verticalAlign, padding, rich, truncate, lineHeight) {
|
|
59738
|
+
var textEl = new ZRText({
|
|
59739
|
+
style: {
|
|
59740
|
+
text: text,
|
|
59741
|
+
font: font,
|
|
59742
|
+
align: align,
|
|
59743
|
+
verticalAlign: verticalAlign,
|
|
59744
|
+
padding: padding,
|
|
59745
|
+
rich: rich,
|
|
59746
|
+
overflow: truncate ? 'truncate' : null,
|
|
59747
|
+
lineHeight: lineHeight
|
|
59748
|
+
}
|
|
59749
|
+
});
|
|
59750
|
+
return textEl.getBoundingRect();
|
|
59751
|
+
}
|
|
59752
|
+
|
|
59480
59753
|
/**
|
|
59481
59754
|
* Add a comma each three digit.
|
|
59482
59755
|
*/
|
|
@@ -59517,7 +59790,7 @@
|
|
|
59517
59790
|
if (isTypeTime || isValueDate) {
|
|
59518
59791
|
var date = isTypeTime ? parseDate(value) : value;
|
|
59519
59792
|
if (!isNaN(+date)) {
|
|
59520
|
-
return format(date, USER_READABLE_DEFUALT_TIME_PATTERN, useUTC);
|
|
59793
|
+
return format$1(date, USER_READABLE_DEFUALT_TIME_PATTERN, useUTC);
|
|
59521
59794
|
} else if (isValueDate) {
|
|
59522
59795
|
return '-';
|
|
59523
59796
|
}
|
|
@@ -59607,6 +59880,43 @@
|
|
|
59607
59880
|
};
|
|
59608
59881
|
}
|
|
59609
59882
|
}
|
|
59883
|
+
/**
|
|
59884
|
+
* @deprecated Use `time/format` instead.
|
|
59885
|
+
* ISO Date format
|
|
59886
|
+
* @param {string} tpl
|
|
59887
|
+
* @param {number} value
|
|
59888
|
+
* @param {boolean} [isUTC=false] Default in local time.
|
|
59889
|
+
* see `module:echarts/scale/Time`
|
|
59890
|
+
* and `module:echarts/util/number#parseDate`.
|
|
59891
|
+
* @inner
|
|
59892
|
+
*/
|
|
59893
|
+
function formatTime(tpl, value, isUTC) {
|
|
59894
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
59895
|
+
deprecateReplaceLog('echarts.format.formatTime', 'echarts.time.format');
|
|
59896
|
+
}
|
|
59897
|
+
if (tpl === 'week' || tpl === 'month' || tpl === 'quarter' || tpl === 'half-year' || tpl === 'year') {
|
|
59898
|
+
tpl = 'MM-dd\nyyyy';
|
|
59899
|
+
}
|
|
59900
|
+
var date = parseDate(value);
|
|
59901
|
+
var getUTC = isUTC ? 'getUTC' : 'get';
|
|
59902
|
+
var y = date[getUTC + 'FullYear']();
|
|
59903
|
+
var M = date[getUTC + 'Month']() + 1;
|
|
59904
|
+
var d = date[getUTC + 'Date']();
|
|
59905
|
+
var h = date[getUTC + 'Hours']();
|
|
59906
|
+
var m = date[getUTC + 'Minutes']();
|
|
59907
|
+
var s = date[getUTC + 'Seconds']();
|
|
59908
|
+
var S = date[getUTC + 'Milliseconds']();
|
|
59909
|
+
tpl = tpl.replace('MM', pad(M, 2)).replace('M', M).replace('yyyy', y).replace('yy', pad(y % 100 + '', 2)).replace('dd', pad(d, 2)).replace('d', d).replace('hh', pad(h, 2)).replace('h', h).replace('mm', pad(m, 2)).replace('m', m).replace('ss', pad(s, 2)).replace('s', s).replace('SSS', pad(S, 3));
|
|
59910
|
+
return tpl;
|
|
59911
|
+
}
|
|
59912
|
+
/**
|
|
59913
|
+
* Capital first
|
|
59914
|
+
* @param {string} str
|
|
59915
|
+
* @return {string}
|
|
59916
|
+
*/
|
|
59917
|
+
function capitalFirst(str) {
|
|
59918
|
+
return str ? str.charAt(0).toUpperCase() + str.substr(1) : str;
|
|
59919
|
+
}
|
|
59610
59920
|
/**
|
|
59611
59921
|
* @return Never be null/undefined.
|
|
59612
59922
|
*/
|
|
@@ -62725,7 +63035,7 @@
|
|
|
62725
63035
|
// See <module:echarts/stream/Scheduler#performDataProcessorTasks>
|
|
62726
63036
|
// (2) Only register once when import repeatedly.
|
|
62727
63037
|
// Should be executed after series is filtered and before stack calculation.
|
|
62728
|
-
function dataStack(ecModel) {
|
|
63038
|
+
function dataStack$1(ecModel) {
|
|
62729
63039
|
var stackInfoMap = createHashMap();
|
|
62730
63040
|
ecModel.eachSeries(function (seriesModel) {
|
|
62731
63041
|
var stack = seriesModel.get('stack');
|
|
@@ -69764,13 +70074,17 @@
|
|
|
69764
70074
|
* under the License.
|
|
69765
70075
|
*/
|
|
69766
70076
|
var customRenderers = {};
|
|
69767
|
-
function registerCustomSeries(type, renderItem) {
|
|
70077
|
+
function registerCustomSeries$1(type, renderItem) {
|
|
69768
70078
|
customRenderers[type] = renderItem;
|
|
69769
70079
|
}
|
|
69770
70080
|
function getCustomSeries(type) {
|
|
69771
70081
|
return customRenderers[type];
|
|
69772
70082
|
}
|
|
69773
70083
|
|
|
70084
|
+
var version$1 = '6.0.0';
|
|
70085
|
+
var dependencies = {
|
|
70086
|
+
zrender: '6.0.0'
|
|
70087
|
+
};
|
|
69774
70088
|
var TEST_FRAME_REMAIN_TIME = 1;
|
|
69775
70089
|
var PRIORITY_PROCESSOR_SERIES_FILTER = 800;
|
|
69776
70090
|
// Some data processors depends on the stack result dimension (to calculate data extent).
|
|
@@ -69919,7 +70233,20 @@
|
|
|
69919
70233
|
defaultUseDirtyRect = retrieve2(root.__ECHARTS__DEFAULT__USE_DIRTY_RECT__, defaultUseDirtyRect);
|
|
69920
70234
|
}
|
|
69921
70235
|
}
|
|
69922
|
-
if (opts.ssr)
|
|
70236
|
+
if (opts.ssr) {
|
|
70237
|
+
registerSSRDataGetter(function (el) {
|
|
70238
|
+
var ecData = getECData(el);
|
|
70239
|
+
var dataIndex = ecData.dataIndex;
|
|
70240
|
+
if (dataIndex == null) {
|
|
70241
|
+
return;
|
|
70242
|
+
}
|
|
70243
|
+
var hashMap = createHashMap();
|
|
70244
|
+
hashMap.set('series_index', ecData.seriesIndex);
|
|
70245
|
+
hashMap.set('data_index', dataIndex);
|
|
70246
|
+
ecData.ssrType && hashMap.set('ssr_type', ecData.ssrType);
|
|
70247
|
+
return hashMap;
|
|
70248
|
+
});
|
|
70249
|
+
}
|
|
69923
70250
|
var zr = _this._zr = init$1(dom, {
|
|
69924
70251
|
renderer: opts.renderer || defaultRenderer,
|
|
69925
70252
|
devicePixelRatio: opts.devicePixelRatio,
|
|
@@ -71673,6 +72000,7 @@
|
|
|
71673
72000
|
var instances = {};
|
|
71674
72001
|
var connectedGroups = {};
|
|
71675
72002
|
var idBase = +new Date() - 0;
|
|
72003
|
+
var groupIdBase = +new Date() - 0;
|
|
71676
72004
|
var DOM_ATTRIBUTE_KEY = '_echarts_instance_';
|
|
71677
72005
|
/**
|
|
71678
72006
|
* @param opts.devicePixelRatio Use window.devicePixelRatio by default
|
|
@@ -71685,7 +72013,8 @@
|
|
|
71685
72013
|
* @param opts.useDirtyRect Enable dirty rectangle rendering or not.
|
|
71686
72014
|
*/
|
|
71687
72015
|
function init(dom, theme, opts) {
|
|
71688
|
-
|
|
72016
|
+
var isClient = !(opts && opts.ssr);
|
|
72017
|
+
if (isClient) {
|
|
71689
72018
|
if (process.env.NODE_ENV !== 'production') {
|
|
71690
72019
|
if (!dom) {
|
|
71691
72020
|
throw new Error('Initialize failed: invalid dom.');
|
|
@@ -71699,7 +72028,7 @@
|
|
|
71699
72028
|
return existInstance;
|
|
71700
72029
|
}
|
|
71701
72030
|
if (process.env.NODE_ENV !== 'production') {
|
|
71702
|
-
if (isDom(dom) && dom.nodeName.toUpperCase() !== 'CANVAS' && (!dom.clientWidth && (!opts) || !dom.clientHeight && (!opts))) {
|
|
72031
|
+
if (isDom(dom) && dom.nodeName.toUpperCase() !== 'CANVAS' && (!dom.clientWidth && (!opts || opts.width == null) || !dom.clientHeight && (!opts || opts.height == null))) {
|
|
71703
72032
|
warn('Can\'t get DOM width or height. Please check ' + 'dom.clientWidth and dom.clientHeight. They should not be 0.' + 'For example, you may need to call this in the callback ' + 'of window.onload.');
|
|
71704
72033
|
}
|
|
71705
72034
|
}
|
|
@@ -71707,14 +72036,75 @@
|
|
|
71707
72036
|
var chart = new ECharts(dom, theme, opts);
|
|
71708
72037
|
chart.id = 'ec_' + idBase++;
|
|
71709
72038
|
instances[chart.id] = chart;
|
|
71710
|
-
setAttribute(dom, DOM_ATTRIBUTE_KEY, chart.id);
|
|
72039
|
+
isClient && setAttribute(dom, DOM_ATTRIBUTE_KEY, chart.id);
|
|
71711
72040
|
enableConnect(chart);
|
|
71712
72041
|
lifecycle.trigger('afterinit', chart);
|
|
71713
72042
|
return chart;
|
|
71714
72043
|
}
|
|
72044
|
+
/**
|
|
72045
|
+
* @usage
|
|
72046
|
+
* (A)
|
|
72047
|
+
* ```js
|
|
72048
|
+
* let chart1 = echarts.init(dom1);
|
|
72049
|
+
* let chart2 = echarts.init(dom2);
|
|
72050
|
+
* chart1.group = 'xxx';
|
|
72051
|
+
* chart2.group = 'xxx';
|
|
72052
|
+
* echarts.connect('xxx');
|
|
72053
|
+
* ```
|
|
72054
|
+
* (B)
|
|
72055
|
+
* ```js
|
|
72056
|
+
* let chart1 = echarts.init(dom1);
|
|
72057
|
+
* let chart2 = echarts.init(dom2);
|
|
72058
|
+
* echarts.connect('xxx', [chart1, chart2]);
|
|
72059
|
+
* ```
|
|
72060
|
+
*/
|
|
72061
|
+
function connect(groupId) {
|
|
72062
|
+
// Is array of charts
|
|
72063
|
+
if (isArray$2(groupId)) {
|
|
72064
|
+
var charts = groupId;
|
|
72065
|
+
groupId = null;
|
|
72066
|
+
// If any chart has group
|
|
72067
|
+
each$c(charts, function (chart) {
|
|
72068
|
+
if (chart.group != null) {
|
|
72069
|
+
groupId = chart.group;
|
|
72070
|
+
}
|
|
72071
|
+
});
|
|
72072
|
+
groupId = groupId || 'g_' + groupIdBase++;
|
|
72073
|
+
each$c(charts, function (chart) {
|
|
72074
|
+
chart.group = groupId;
|
|
72075
|
+
});
|
|
72076
|
+
}
|
|
72077
|
+
connectedGroups[groupId] = true;
|
|
72078
|
+
return groupId;
|
|
72079
|
+
}
|
|
72080
|
+
function disconnect(groupId) {
|
|
72081
|
+
connectedGroups[groupId] = false;
|
|
72082
|
+
}
|
|
72083
|
+
/**
|
|
72084
|
+
* Alias and backward compatibility
|
|
72085
|
+
* @deprecated
|
|
72086
|
+
*/
|
|
72087
|
+
var disConnect = disconnect;
|
|
72088
|
+
/**
|
|
72089
|
+
* Dispose a chart instance
|
|
72090
|
+
*/
|
|
72091
|
+
function dispose(chart) {
|
|
72092
|
+
if (isString(chart)) {
|
|
72093
|
+
chart = instances[chart];
|
|
72094
|
+
} else if (!(chart instanceof ECharts)) {
|
|
72095
|
+
// Try to treat as dom
|
|
72096
|
+
chart = getInstanceByDom(chart);
|
|
72097
|
+
}
|
|
72098
|
+
if (chart instanceof ECharts && !chart.isDisposed()) {
|
|
72099
|
+
chart.dispose();
|
|
72100
|
+
}
|
|
72101
|
+
}
|
|
71715
72102
|
function getInstanceByDom(dom) {
|
|
71716
72103
|
return instances[getAttribute(dom, DOM_ATTRIBUTE_KEY)];
|
|
71717
72104
|
}
|
|
72105
|
+
function getInstanceById(key) {
|
|
72106
|
+
return instances[key];
|
|
72107
|
+
}
|
|
71718
72108
|
/**
|
|
71719
72109
|
* Register theme
|
|
71720
72110
|
*/
|
|
@@ -71810,6 +72200,20 @@
|
|
|
71810
72200
|
function registerCoordinateSystem(type, coordSysCreator) {
|
|
71811
72201
|
CoordinateSystemManager.register(type, coordSysCreator);
|
|
71812
72202
|
}
|
|
72203
|
+
/**
|
|
72204
|
+
* Get dimensions of specified coordinate system.
|
|
72205
|
+
* @param {string} type
|
|
72206
|
+
* @return {Array.<string|Object>}
|
|
72207
|
+
*/
|
|
72208
|
+
function getCoordinateSystemDimensions(type) {
|
|
72209
|
+
var coordSysCreator = CoordinateSystemManager.get(type);
|
|
72210
|
+
if (coordSysCreator) {
|
|
72211
|
+
return coordSysCreator.getDimensionsInfo ? coordSysCreator.getDimensionsInfo() : coordSysCreator.dimensions.slice();
|
|
72212
|
+
}
|
|
72213
|
+
}
|
|
72214
|
+
function registerCustomSeries(seriesType, renderItem) {
|
|
72215
|
+
registerCustomSeries$1(seriesType, renderItem);
|
|
72216
|
+
}
|
|
71813
72217
|
function registerLayout(priority, layoutTask) {
|
|
71814
72218
|
normalizeRegister(visualFuncs, priority, layoutTask, PRIORITY_VISUAL_LAYOUT, 'layout');
|
|
71815
72219
|
}
|
|
@@ -71844,6 +72248,30 @@
|
|
|
71844
72248
|
function registerLoading(name, loadingFx) {
|
|
71845
72249
|
loadingEffects[name] = loadingFx;
|
|
71846
72250
|
}
|
|
72251
|
+
/**
|
|
72252
|
+
* ZRender need a canvas context to do measureText.
|
|
72253
|
+
* But in node environment canvas may be created by node-canvas.
|
|
72254
|
+
* So we need to specify how to create a canvas instead of using document.createElement('canvas')
|
|
72255
|
+
*
|
|
72256
|
+
*
|
|
72257
|
+
* @deprecated use setPlatformAPI({ createCanvas }) instead.
|
|
72258
|
+
*
|
|
72259
|
+
* @example
|
|
72260
|
+
* let Canvas = require('canvas');
|
|
72261
|
+
* let echarts = require('echarts');
|
|
72262
|
+
* echarts.setCanvasCreator(function () {
|
|
72263
|
+
* // Small size is enough.
|
|
72264
|
+
* return new Canvas(32, 32);
|
|
72265
|
+
* });
|
|
72266
|
+
*/
|
|
72267
|
+
function setCanvasCreator(creator) {
|
|
72268
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
72269
|
+
deprecateLog('setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead.');
|
|
72270
|
+
}
|
|
72271
|
+
setPlatformAPI({
|
|
72272
|
+
createCanvas: creator
|
|
72273
|
+
});
|
|
72274
|
+
}
|
|
71847
72275
|
/**
|
|
71848
72276
|
* The parameters and usage: see `geoSourceManager.registerMap`.
|
|
71849
72277
|
* Compatible with previous `echarts.registerMap`.
|
|
@@ -71852,6 +72280,10 @@
|
|
|
71852
72280
|
var registerMap = getImpl('registerMap');
|
|
71853
72281
|
registerMap && registerMap(mapName, geoJson, specialAreas);
|
|
71854
72282
|
}
|
|
72283
|
+
function getMap(mapName) {
|
|
72284
|
+
var getMap = getImpl('getMap');
|
|
72285
|
+
return getMap && getMap(mapName);
|
|
72286
|
+
}
|
|
71855
72287
|
var registerTransform = registerExternalTransform;
|
|
71856
72288
|
/**
|
|
71857
72289
|
* Globa dispatchAction to a specified chart instance.
|
|
@@ -71874,7 +72306,7 @@
|
|
|
71874
72306
|
registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataSymbolTask);
|
|
71875
72307
|
registerVisual(PRIORITY_VISUAL_DECAL, decalVisual);
|
|
71876
72308
|
registerPreprocessor(globalBackwardCompat);
|
|
71877
|
-
registerProcessor(PRIORITY_PROCESSOR_DATASTACK, dataStack);
|
|
72309
|
+
registerProcessor(PRIORITY_PROCESSOR_DATASTACK, dataStack$1);
|
|
71878
72310
|
registerLoading('default', defaultLoading);
|
|
71879
72311
|
// Default actions
|
|
71880
72312
|
registerAction({
|
|
@@ -71923,6 +72355,9 @@
|
|
|
71923
72355
|
// the default theme after changing to other themes.
|
|
71924
72356
|
registerTheme('default', {});
|
|
71925
72357
|
registerTheme('dark', theme);
|
|
72358
|
+
// For backward compatibility, where the namespace `dataTool` will
|
|
72359
|
+
// be mounted on `echarts` is the extension `dataTool` is imported.
|
|
72360
|
+
var dataTool = {};
|
|
71926
72361
|
|
|
71927
72362
|
/*
|
|
71928
72363
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
@@ -73454,6 +73889,12 @@
|
|
|
73454
73889
|
return SeriesData;
|
|
73455
73890
|
}();
|
|
73456
73891
|
|
|
73892
|
+
/**
|
|
73893
|
+
* For outside usage compat (like echarts-gl are using it).
|
|
73894
|
+
*/
|
|
73895
|
+
function createDimensions(source, opt) {
|
|
73896
|
+
return prepareSeriesDataSchema(source, opt).dimensions;
|
|
73897
|
+
}
|
|
73457
73898
|
/**
|
|
73458
73899
|
* This method builds the relationship between:
|
|
73459
73900
|
* + "what the coord sys or series requires (see `coordDimensions`)",
|
|
@@ -74128,7 +74569,7 @@
|
|
|
74128
74569
|
*/
|
|
74129
74570
|
function intervalScaleNiceTicks(extent, spanWithBreaks, splitNumber, minInterval, maxInterval) {
|
|
74130
74571
|
var result = {};
|
|
74131
|
-
var interval = result.interval = nice(spanWithBreaks / splitNumber);
|
|
74572
|
+
var interval = result.interval = nice(spanWithBreaks / splitNumber, true);
|
|
74132
74573
|
if (minInterval != null && interval < minInterval) {
|
|
74133
74574
|
interval = result.interval = minInterval;
|
|
74134
74575
|
}
|
|
@@ -75307,7 +75748,7 @@
|
|
|
75307
75748
|
*/
|
|
75308
75749
|
TimeScale.prototype.getLabel = function (tick) {
|
|
75309
75750
|
var useUTC = this.getSetting('useUTC');
|
|
75310
|
-
return format(tick.value, fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))] || fullLeveledFormatter.second, useUTC, this.getSetting('locale'));
|
|
75751
|
+
return format$1(tick.value, fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))] || fullLeveledFormatter.second, useUTC, this.getSetting('locale'));
|
|
75311
75752
|
};
|
|
75312
75753
|
TimeScale.prototype.getFormattedLabel = function (tick, idx, labelFormatter) {
|
|
75313
75754
|
var isUTC = this.getSetting('useUTC');
|
|
@@ -75528,7 +75969,7 @@
|
|
|
75528
75969
|
return approxInterval > 30 ? 30 : approxInterval > 20 ? 20 : approxInterval > 15 ? 15 : approxInterval > 10 ? 10 : approxInterval > 5 ? 5 : approxInterval > 2 ? 2 : 1;
|
|
75529
75970
|
}
|
|
75530
75971
|
function getMillisecondsInterval(approxInterval) {
|
|
75531
|
-
return nice(approxInterval);
|
|
75972
|
+
return nice(approxInterval, true);
|
|
75532
75973
|
}
|
|
75533
75974
|
// e.g., if the input unit is 'day', start calculate ticks from the first day of
|
|
75534
75975
|
// that month to make ticks "nice".
|
|
@@ -76403,6 +76844,73 @@
|
|
|
76403
76844
|
return AxisModelCommonMixin;
|
|
76404
76845
|
}();
|
|
76405
76846
|
|
|
76847
|
+
/**
|
|
76848
|
+
* Create a multi dimension List structure from seriesModel.
|
|
76849
|
+
*/
|
|
76850
|
+
function createList$2(seriesModel) {
|
|
76851
|
+
return createSeriesData(null, seriesModel);
|
|
76852
|
+
}
|
|
76853
|
+
var dataStack = {
|
|
76854
|
+
isDimensionStacked: isDimensionStacked,
|
|
76855
|
+
enableDataStack: enableDataStack,
|
|
76856
|
+
getStackedDimension: getStackedDimension
|
|
76857
|
+
};
|
|
76858
|
+
/**
|
|
76859
|
+
* Create scale
|
|
76860
|
+
* @param {Array.<number>} dataExtent
|
|
76861
|
+
* @param {Object|module:echarts/Model} option If `optoin.type`
|
|
76862
|
+
* is secified, it can only be `'value'` currently.
|
|
76863
|
+
*/
|
|
76864
|
+
function createScale(dataExtent, option) {
|
|
76865
|
+
var axisModel = option;
|
|
76866
|
+
if (!(option instanceof Model)) {
|
|
76867
|
+
axisModel = new Model(option);
|
|
76868
|
+
// FIXME
|
|
76869
|
+
// Currently AxisModelCommonMixin has nothing to do with the
|
|
76870
|
+
// the requirements of `axisHelper.createScaleByModel`. For
|
|
76871
|
+
// example the methods `getCategories` and `getOrdinalMeta`
|
|
76872
|
+
// are required for `'category'` axis, and ecModel is required
|
|
76873
|
+
// for `'time'` axis. But occasionally echarts-gl happened
|
|
76874
|
+
// to only use `'value'` axis.
|
|
76875
|
+
// zrUtil.mixin(axisModel, AxisModelCommonMixin);
|
|
76876
|
+
}
|
|
76877
|
+
var scale = createScaleByModel$1(axisModel);
|
|
76878
|
+
scale.setExtent(dataExtent[0], dataExtent[1]);
|
|
76879
|
+
niceScaleExtent(scale, axisModel);
|
|
76880
|
+
return scale;
|
|
76881
|
+
}
|
|
76882
|
+
/**
|
|
76883
|
+
* Mixin common methods to axis model,
|
|
76884
|
+
*
|
|
76885
|
+
* Include methods
|
|
76886
|
+
* `getFormattedLabels() => Array.<string>`
|
|
76887
|
+
* `getCategories() => Array.<string>`
|
|
76888
|
+
* `getMin(origin: boolean) => number`
|
|
76889
|
+
* `getMax(origin: boolean) => number`
|
|
76890
|
+
* `getNeedCrossZero() => boolean`
|
|
76891
|
+
*/
|
|
76892
|
+
function mixinAxisModelCommonMethods(Model) {
|
|
76893
|
+
mixin(Model, AxisModelCommonMixin);
|
|
76894
|
+
}
|
|
76895
|
+
function createTextStyle(textStyleModel, opts) {
|
|
76896
|
+
opts = opts || {};
|
|
76897
|
+
return createTextStyle$1(textStyleModel, null, null, opts.state !== 'normal');
|
|
76898
|
+
}
|
|
76899
|
+
|
|
76900
|
+
var helper = /*#__PURE__*/Object.freeze({
|
|
76901
|
+
__proto__: null,
|
|
76902
|
+
createDimensions: createDimensions,
|
|
76903
|
+
createList: createList$2,
|
|
76904
|
+
createScale: createScale,
|
|
76905
|
+
createSymbol: createSymbol$1,
|
|
76906
|
+
createTextStyle: createTextStyle,
|
|
76907
|
+
dataStack: dataStack,
|
|
76908
|
+
enableHoverEmphasis: enableHoverEmphasis,
|
|
76909
|
+
getECData: getECData,
|
|
76910
|
+
getLayoutRect: getLayoutRect,
|
|
76911
|
+
mixinAxisModelCommonMethods: mixinAxisModelCommonMethods
|
|
76912
|
+
});
|
|
76913
|
+
|
|
76406
76914
|
var extensions = [];
|
|
76407
76915
|
var extensionRegisters = {
|
|
76408
76916
|
registerPreprocessor: registerPreprocessor,
|
|
@@ -76437,7 +76945,7 @@
|
|
|
76437
76945
|
ChartView.registerClass(ChartViewClass);
|
|
76438
76946
|
},
|
|
76439
76947
|
registerCustomSeries: function (seriesType, renderItem) {
|
|
76440
|
-
registerCustomSeries(seriesType, renderItem);
|
|
76948
|
+
registerCustomSeries$1(seriesType, renderItem);
|
|
76441
76949
|
},
|
|
76442
76950
|
registerSubTypeDefaulter: function (componentType, defaulter) {
|
|
76443
76951
|
ComponentModel.registerSubTypeDefaulter(componentType, defaulter);
|
|
@@ -76820,6 +77328,36 @@
|
|
|
76820
77328
|
});
|
|
76821
77329
|
}
|
|
76822
77330
|
|
|
77331
|
+
var number = /*#__PURE__*/Object.freeze({
|
|
77332
|
+
__proto__: null,
|
|
77333
|
+
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$2,
|
|
77334
|
+
asc: asc$2,
|
|
77335
|
+
getPercentWithPrecision: getPercentWithPrecision,
|
|
77336
|
+
getPixelPrecision: getPixelPrecision,
|
|
77337
|
+
getPrecision: getPrecision,
|
|
77338
|
+
getPrecisionSafe: getPrecisionSafe,
|
|
77339
|
+
isNumeric: isNumeric,
|
|
77340
|
+
isRadianAroundZero: isRadianAroundZero,
|
|
77341
|
+
linearMap: linearMap$2,
|
|
77342
|
+
nice: nice,
|
|
77343
|
+
numericToNumber: numericToNumber,
|
|
77344
|
+
parseDate: parseDate,
|
|
77345
|
+
parsePercent: parsePercent,
|
|
77346
|
+
quantile: quantile,
|
|
77347
|
+
quantity: quantity,
|
|
77348
|
+
quantityExponent: quantityExponent,
|
|
77349
|
+
reformIntervals: reformIntervals,
|
|
77350
|
+
remRadian: remRadian,
|
|
77351
|
+
round: round$2
|
|
77352
|
+
});
|
|
77353
|
+
|
|
77354
|
+
var time = /*#__PURE__*/Object.freeze({
|
|
77355
|
+
__proto__: null,
|
|
77356
|
+
format: format$1,
|
|
77357
|
+
parse: parseDate,
|
|
77358
|
+
roundTime: roundTime
|
|
77359
|
+
});
|
|
77360
|
+
|
|
76823
77361
|
var graphic$1 = /*#__PURE__*/Object.freeze({
|
|
76824
77362
|
__proto__: null,
|
|
76825
77363
|
Arc: Arc,
|
|
@@ -76856,6 +77394,40 @@
|
|
|
76856
77394
|
updateProps: updateProps$1
|
|
76857
77395
|
});
|
|
76858
77396
|
|
|
77397
|
+
var format = /*#__PURE__*/Object.freeze({
|
|
77398
|
+
__proto__: null,
|
|
77399
|
+
addCommas: addCommas,
|
|
77400
|
+
capitalFirst: capitalFirst,
|
|
77401
|
+
encodeHTML: encodeHTML,
|
|
77402
|
+
formatTime: formatTime,
|
|
77403
|
+
formatTpl: formatTpl,
|
|
77404
|
+
getTextRect: getTextRect,
|
|
77405
|
+
getTooltipMarker: getTooltipMarker,
|
|
77406
|
+
normalizeCssArray: normalizeCssArray,
|
|
77407
|
+
toCamelCase: toCamelCase,
|
|
77408
|
+
truncateText: truncateText
|
|
77409
|
+
});
|
|
77410
|
+
|
|
77411
|
+
var util = /*#__PURE__*/Object.freeze({
|
|
77412
|
+
__proto__: null,
|
|
77413
|
+
bind: bind$1,
|
|
77414
|
+
clone: clone$3,
|
|
77415
|
+
curry: curry$1,
|
|
77416
|
+
defaults: defaults,
|
|
77417
|
+
each: each$c,
|
|
77418
|
+
extend: extend,
|
|
77419
|
+
filter: filter,
|
|
77420
|
+
indexOf: indexOf,
|
|
77421
|
+
inherits: inherits,
|
|
77422
|
+
isArray: isArray$2,
|
|
77423
|
+
isFunction: isFunction$1,
|
|
77424
|
+
isObject: isObject$4,
|
|
77425
|
+
isString: isString,
|
|
77426
|
+
map: map$1,
|
|
77427
|
+
merge: merge$1,
|
|
77428
|
+
reduce: reduce
|
|
77429
|
+
});
|
|
77430
|
+
|
|
76859
77431
|
var modelInner = makeInner();
|
|
76860
77432
|
var axisInner = makeInner();
|
|
76861
77433
|
var AxisTickLabelComputingKind = {
|
|
@@ -77497,6 +78069,110 @@
|
|
|
77497
78069
|
}
|
|
77498
78070
|
}
|
|
77499
78071
|
|
|
78072
|
+
// --------------------- Deprecated Extension Methods ---------------------
|
|
78073
|
+
// Should use `ComponentModel.extend` or `class XXXX extend ComponentModel` to create class.
|
|
78074
|
+
// Then use `registerComponentModel` in `install` parameter when `use` this extension. For example:
|
|
78075
|
+
// class Bar3DModel extends ComponentModel {}
|
|
78076
|
+
// export function install(registers) { registers.registerComponentModel(Bar3DModel); }
|
|
78077
|
+
// echarts.use(install);
|
|
78078
|
+
function extendComponentModel(proto) {
|
|
78079
|
+
var Model = ComponentModel.extend(proto);
|
|
78080
|
+
ComponentModel.registerClass(Model);
|
|
78081
|
+
return Model;
|
|
78082
|
+
}
|
|
78083
|
+
function extendComponentView(proto) {
|
|
78084
|
+
var View = ComponentView.extend(proto);
|
|
78085
|
+
ComponentView.registerClass(View);
|
|
78086
|
+
return View;
|
|
78087
|
+
}
|
|
78088
|
+
function extendSeriesModel(proto) {
|
|
78089
|
+
var Model = SeriesModel.extend(proto);
|
|
78090
|
+
SeriesModel.registerClass(Model);
|
|
78091
|
+
return Model;
|
|
78092
|
+
}
|
|
78093
|
+
function extendChartView(proto) {
|
|
78094
|
+
var View = ChartView.extend(proto);
|
|
78095
|
+
ChartView.registerClass(View);
|
|
78096
|
+
return View;
|
|
78097
|
+
}
|
|
78098
|
+
|
|
78099
|
+
var PI2$1 = Math.PI * 2;
|
|
78100
|
+
var CMD = PathProxy.CMD;
|
|
78101
|
+
var DEFAULT_SEARCH_SPACE = ['top', 'right', 'bottom', 'left'];
|
|
78102
|
+
function getCandidateAnchor(pos, distance, rect, outPt, outDir) {
|
|
78103
|
+
var width = rect.width;
|
|
78104
|
+
var height = rect.height;
|
|
78105
|
+
switch (pos) {
|
|
78106
|
+
case 'top':
|
|
78107
|
+
outPt.set(rect.x + width / 2, rect.y - distance);
|
|
78108
|
+
outDir.set(0, -1);
|
|
78109
|
+
break;
|
|
78110
|
+
case 'bottom':
|
|
78111
|
+
outPt.set(rect.x + width / 2, rect.y + height + distance);
|
|
78112
|
+
outDir.set(0, 1);
|
|
78113
|
+
break;
|
|
78114
|
+
case 'left':
|
|
78115
|
+
outPt.set(rect.x - distance, rect.y + height / 2);
|
|
78116
|
+
outDir.set(-1, 0);
|
|
78117
|
+
break;
|
|
78118
|
+
case 'right':
|
|
78119
|
+
outPt.set(rect.x + width + distance, rect.y + height / 2);
|
|
78120
|
+
outDir.set(1, 0);
|
|
78121
|
+
break;
|
|
78122
|
+
}
|
|
78123
|
+
}
|
|
78124
|
+
function projectPointToArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y, out) {
|
|
78125
|
+
x -= cx;
|
|
78126
|
+
y -= cy;
|
|
78127
|
+
var d = Math.sqrt(x * x + y * y);
|
|
78128
|
+
x /= d;
|
|
78129
|
+
y /= d;
|
|
78130
|
+
// Intersect point.
|
|
78131
|
+
var ox = x * r + cx;
|
|
78132
|
+
var oy = y * r + cy;
|
|
78133
|
+
if (Math.abs(startAngle - endAngle) % PI2$1 < 1e-4) {
|
|
78134
|
+
// Is a circle
|
|
78135
|
+
out[0] = ox;
|
|
78136
|
+
out[1] = oy;
|
|
78137
|
+
return d - r;
|
|
78138
|
+
}
|
|
78139
|
+
if (anticlockwise) {
|
|
78140
|
+
var tmp = startAngle;
|
|
78141
|
+
startAngle = normalizeRadian(endAngle);
|
|
78142
|
+
endAngle = normalizeRadian(tmp);
|
|
78143
|
+
} else {
|
|
78144
|
+
startAngle = normalizeRadian(startAngle);
|
|
78145
|
+
endAngle = normalizeRadian(endAngle);
|
|
78146
|
+
}
|
|
78147
|
+
if (startAngle > endAngle) {
|
|
78148
|
+
endAngle += PI2$1;
|
|
78149
|
+
}
|
|
78150
|
+
var angle = Math.atan2(y, x);
|
|
78151
|
+
if (angle < 0) {
|
|
78152
|
+
angle += PI2$1;
|
|
78153
|
+
}
|
|
78154
|
+
if (angle >= startAngle && angle <= endAngle || angle + PI2$1 >= startAngle && angle + PI2$1 <= endAngle) {
|
|
78155
|
+
// Project point is on the arc.
|
|
78156
|
+
out[0] = ox;
|
|
78157
|
+
out[1] = oy;
|
|
78158
|
+
return d - r;
|
|
78159
|
+
}
|
|
78160
|
+
var x1 = r * Math.cos(startAngle) + cx;
|
|
78161
|
+
var y1 = r * Math.sin(startAngle) + cy;
|
|
78162
|
+
var x2 = r * Math.cos(endAngle) + cx;
|
|
78163
|
+
var y2 = r * Math.sin(endAngle) + cy;
|
|
78164
|
+
var d1 = (x1 - x) * (x1 - x) + (y1 - y) * (y1 - y);
|
|
78165
|
+
var d2 = (x2 - x) * (x2 - x) + (y2 - y) * (y2 - y);
|
|
78166
|
+
if (d1 < d2) {
|
|
78167
|
+
out[0] = x1;
|
|
78168
|
+
out[1] = y1;
|
|
78169
|
+
return Math.sqrt(d1);
|
|
78170
|
+
} else {
|
|
78171
|
+
out[0] = x2;
|
|
78172
|
+
out[1] = y2;
|
|
78173
|
+
return Math.sqrt(d2);
|
|
78174
|
+
}
|
|
78175
|
+
}
|
|
77500
78176
|
function projectPointToLine(x1, y1, x2, y2, x, y, out, limitToEnds) {
|
|
77501
78177
|
var dx = x - x1;
|
|
77502
78178
|
var dy = y - y1;
|
|
@@ -77508,17 +78184,189 @@
|
|
|
77508
78184
|
// dot product
|
|
77509
78185
|
var projectedLen = dx * dx1 + dy * dy1;
|
|
77510
78186
|
var t = projectedLen / lineLen;
|
|
78187
|
+
if (limitToEnds) {
|
|
78188
|
+
t = Math.min(Math.max(t, 0), 1);
|
|
78189
|
+
}
|
|
77511
78190
|
t *= lineLen;
|
|
77512
78191
|
var ox = out[0] = x1 + t * dx1;
|
|
77513
78192
|
var oy = out[1] = y1 + t * dy1;
|
|
77514
78193
|
return Math.sqrt((ox - x) * (ox - x) + (oy - y) * (oy - y));
|
|
77515
78194
|
}
|
|
78195
|
+
function projectPointToRect(x1, y1, width, height, x, y, out) {
|
|
78196
|
+
if (width < 0) {
|
|
78197
|
+
x1 = x1 + width;
|
|
78198
|
+
width = -width;
|
|
78199
|
+
}
|
|
78200
|
+
if (height < 0) {
|
|
78201
|
+
y1 = y1 + height;
|
|
78202
|
+
height = -height;
|
|
78203
|
+
}
|
|
78204
|
+
var x2 = x1 + width;
|
|
78205
|
+
var y2 = y1 + height;
|
|
78206
|
+
var ox = out[0] = Math.min(Math.max(x, x1), x2);
|
|
78207
|
+
var oy = out[1] = Math.min(Math.max(y, y1), y2);
|
|
78208
|
+
return Math.sqrt((ox - x) * (ox - x) + (oy - y) * (oy - y));
|
|
78209
|
+
}
|
|
78210
|
+
var tmpPt = [];
|
|
78211
|
+
function nearestPointOnRect(pt, rect, out) {
|
|
78212
|
+
var dist = projectPointToRect(rect.x, rect.y, rect.width, rect.height, pt.x, pt.y, tmpPt);
|
|
78213
|
+
out.set(tmpPt[0], tmpPt[1]);
|
|
78214
|
+
return dist;
|
|
78215
|
+
}
|
|
78216
|
+
/**
|
|
78217
|
+
* Calculate min distance corresponding point.
|
|
78218
|
+
* This method won't evaluate if point is in the path.
|
|
78219
|
+
*/
|
|
78220
|
+
function nearestPointOnPath(pt, path, out) {
|
|
78221
|
+
var xi = 0;
|
|
78222
|
+
var yi = 0;
|
|
78223
|
+
var x0 = 0;
|
|
78224
|
+
var y0 = 0;
|
|
78225
|
+
var x1;
|
|
78226
|
+
var y1;
|
|
78227
|
+
var minDist = Infinity;
|
|
78228
|
+
var data = path.data;
|
|
78229
|
+
var x = pt.x;
|
|
78230
|
+
var y = pt.y;
|
|
78231
|
+
for (var i = 0; i < data.length;) {
|
|
78232
|
+
var cmd = data[i++];
|
|
78233
|
+
if (i === 1) {
|
|
78234
|
+
xi = data[i];
|
|
78235
|
+
yi = data[i + 1];
|
|
78236
|
+
x0 = xi;
|
|
78237
|
+
y0 = yi;
|
|
78238
|
+
}
|
|
78239
|
+
var d = minDist;
|
|
78240
|
+
switch (cmd) {
|
|
78241
|
+
case CMD.M:
|
|
78242
|
+
// moveTo 命令重新创建一个新的 subpath, 并且更新新的起点
|
|
78243
|
+
// 在 closePath 的时候使用
|
|
78244
|
+
x0 = data[i++];
|
|
78245
|
+
y0 = data[i++];
|
|
78246
|
+
xi = x0;
|
|
78247
|
+
yi = y0;
|
|
78248
|
+
break;
|
|
78249
|
+
case CMD.L:
|
|
78250
|
+
d = projectPointToLine(xi, yi, data[i], data[i + 1], x, y, tmpPt, true);
|
|
78251
|
+
xi = data[i++];
|
|
78252
|
+
yi = data[i++];
|
|
78253
|
+
break;
|
|
78254
|
+
case CMD.C:
|
|
78255
|
+
d = cubicProjectPoint(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], x, y, tmpPt);
|
|
78256
|
+
xi = data[i++];
|
|
78257
|
+
yi = data[i++];
|
|
78258
|
+
break;
|
|
78259
|
+
case CMD.Q:
|
|
78260
|
+
d = quadraticProjectPoint(xi, yi, data[i++], data[i++], data[i], data[i + 1], x, y, tmpPt);
|
|
78261
|
+
xi = data[i++];
|
|
78262
|
+
yi = data[i++];
|
|
78263
|
+
break;
|
|
78264
|
+
case CMD.A:
|
|
78265
|
+
// TODO Arc 判断的开销比较大
|
|
78266
|
+
var cx = data[i++];
|
|
78267
|
+
var cy = data[i++];
|
|
78268
|
+
var rx = data[i++];
|
|
78269
|
+
var ry = data[i++];
|
|
78270
|
+
var theta = data[i++];
|
|
78271
|
+
var dTheta = data[i++];
|
|
78272
|
+
// TODO Arc 旋转
|
|
78273
|
+
i += 1;
|
|
78274
|
+
var anticlockwise = !!(1 - data[i++]);
|
|
78275
|
+
x1 = Math.cos(theta) * rx + cx;
|
|
78276
|
+
y1 = Math.sin(theta) * ry + cy;
|
|
78277
|
+
// 不是直接使用 arc 命令
|
|
78278
|
+
if (i <= 1) {
|
|
78279
|
+
// 第一个命令起点还未定义
|
|
78280
|
+
x0 = x1;
|
|
78281
|
+
y0 = y1;
|
|
78282
|
+
}
|
|
78283
|
+
// zr 使用scale来模拟椭圆, 这里也对x做一定的缩放
|
|
78284
|
+
var _x = (x - cx) * ry / rx + cx;
|
|
78285
|
+
d = projectPointToArc(cx, cy, ry, theta, theta + dTheta, anticlockwise, _x, y, tmpPt);
|
|
78286
|
+
xi = Math.cos(theta + dTheta) * rx + cx;
|
|
78287
|
+
yi = Math.sin(theta + dTheta) * ry + cy;
|
|
78288
|
+
break;
|
|
78289
|
+
case CMD.R:
|
|
78290
|
+
x0 = xi = data[i++];
|
|
78291
|
+
y0 = yi = data[i++];
|
|
78292
|
+
var width = data[i++];
|
|
78293
|
+
var height = data[i++];
|
|
78294
|
+
d = projectPointToRect(x0, y0, width, height, x, y, tmpPt);
|
|
78295
|
+
break;
|
|
78296
|
+
case CMD.Z:
|
|
78297
|
+
d = projectPointToLine(xi, yi, x0, y0, x, y, tmpPt, true);
|
|
78298
|
+
xi = x0;
|
|
78299
|
+
yi = y0;
|
|
78300
|
+
break;
|
|
78301
|
+
}
|
|
78302
|
+
if (d < minDist) {
|
|
78303
|
+
minDist = d;
|
|
78304
|
+
out.set(tmpPt[0], tmpPt[1]);
|
|
78305
|
+
}
|
|
78306
|
+
}
|
|
78307
|
+
return minDist;
|
|
78308
|
+
}
|
|
77516
78309
|
// Temporal variable for intermediate usage.
|
|
77517
78310
|
var pt0 = new Point();
|
|
77518
78311
|
var pt1 = new Point();
|
|
77519
78312
|
var pt2 = new Point();
|
|
77520
78313
|
var dir = new Point();
|
|
77521
78314
|
var dir2 = new Point();
|
|
78315
|
+
/**
|
|
78316
|
+
* Calculate a proper guide line based on the label position and graphic element definition
|
|
78317
|
+
* @param label
|
|
78318
|
+
* @param labelRect
|
|
78319
|
+
* @param target
|
|
78320
|
+
* @param targetRect
|
|
78321
|
+
*/
|
|
78322
|
+
function updateLabelLinePoints(target, labelLineModel) {
|
|
78323
|
+
if (!target) {
|
|
78324
|
+
return;
|
|
78325
|
+
}
|
|
78326
|
+
var labelLine = target.getTextGuideLine();
|
|
78327
|
+
var label = target.getTextContent();
|
|
78328
|
+
// Needs to create text guide in each charts.
|
|
78329
|
+
if (!(label && labelLine)) {
|
|
78330
|
+
return;
|
|
78331
|
+
}
|
|
78332
|
+
var labelGuideConfig = target.textGuideLineConfig || {};
|
|
78333
|
+
var points = [[0, 0], [0, 0], [0, 0]];
|
|
78334
|
+
var searchSpace = labelGuideConfig.candidates || DEFAULT_SEARCH_SPACE;
|
|
78335
|
+
var labelRect = label.getBoundingRect().clone();
|
|
78336
|
+
labelRect.applyTransform(label.getComputedTransform());
|
|
78337
|
+
var minDist = Infinity;
|
|
78338
|
+
var anchorPoint = labelGuideConfig.anchor;
|
|
78339
|
+
var targetTransform = target.getComputedTransform();
|
|
78340
|
+
var targetInversedTransform = targetTransform && invert([], targetTransform);
|
|
78341
|
+
var len = labelLineModel.get('length2') || 0;
|
|
78342
|
+
if (anchorPoint) {
|
|
78343
|
+
pt2.copy(anchorPoint);
|
|
78344
|
+
}
|
|
78345
|
+
for (var i = 0; i < searchSpace.length; i++) {
|
|
78346
|
+
var candidate = searchSpace[i];
|
|
78347
|
+
getCandidateAnchor(candidate, 0, labelRect, pt0, dir);
|
|
78348
|
+
Point.scaleAndAdd(pt1, pt0, dir, len);
|
|
78349
|
+
// Transform to target coord space.
|
|
78350
|
+
pt1.transform(targetInversedTransform);
|
|
78351
|
+
// Note: getBoundingRect will ensure the `path` being created.
|
|
78352
|
+
var boundingRect = target.getBoundingRect();
|
|
78353
|
+
var dist = anchorPoint ? anchorPoint.distance(pt1) : target instanceof Path ? nearestPointOnPath(pt1, target.path, pt2) : nearestPointOnRect(pt1, boundingRect, pt2);
|
|
78354
|
+
// TODO pt2 is in the path
|
|
78355
|
+
if (dist < minDist) {
|
|
78356
|
+
minDist = dist;
|
|
78357
|
+
// Transform back to global space.
|
|
78358
|
+
pt1.transform(targetTransform);
|
|
78359
|
+
pt2.transform(targetTransform);
|
|
78360
|
+
pt2.toArray(points[0]);
|
|
78361
|
+
pt1.toArray(points[1]);
|
|
78362
|
+
pt0.toArray(points[2]);
|
|
78363
|
+
}
|
|
78364
|
+
}
|
|
78365
|
+
limitTurnAngle(points, labelLineModel.get('minTurnAngle'));
|
|
78366
|
+
labelLine.setShape({
|
|
78367
|
+
points: points
|
|
78368
|
+
});
|
|
78369
|
+
}
|
|
77522
78370
|
// Temporal variable for the limitTurnAngle function
|
|
77523
78371
|
var tmpArr = [];
|
|
77524
78372
|
var tmpProjPoint = new Point();
|
|
@@ -77553,7 +78401,7 @@
|
|
|
77553
78401
|
if (minTurnAngleCos < angleCos) {
|
|
77554
78402
|
// Smaller than minTurnAngle
|
|
77555
78403
|
// Calculate project point of pt0 on pt1-pt2
|
|
77556
|
-
var d = projectPointToLine(pt1.x, pt1.y, pt2.x, pt2.y, pt0.x, pt0.y, tmpArr);
|
|
78404
|
+
var d = projectPointToLine(pt1.x, pt1.y, pt2.x, pt2.y, pt0.x, pt0.y, tmpArr, false);
|
|
77557
78405
|
tmpProjPoint.fromArray(tmpArr);
|
|
77558
78406
|
// Calculate new projected length with limited minTurnAngle and get the new connect point
|
|
77559
78407
|
tmpProjPoint.scaleAndAdd(dir2, d / Math.tan(Math.PI - minTurnAngle));
|
|
@@ -77595,7 +78443,7 @@
|
|
|
77595
78443
|
var maxSurfaceAngleCos = Math.cos(maxSurfaceAngle);
|
|
77596
78444
|
if (angleCos < maxSurfaceAngleCos) {
|
|
77597
78445
|
// Calculate project point of pt0 on pt1-pt2
|
|
77598
|
-
var d = projectPointToLine(pt1.x, pt1.y, pt2.x, pt2.y, pt0.x, pt0.y, tmpArr);
|
|
78446
|
+
var d = projectPointToLine(pt1.x, pt1.y, pt2.x, pt2.y, pt0.x, pt0.y, tmpArr, false);
|
|
77599
78447
|
tmpProjPoint.fromArray(tmpArr);
|
|
77600
78448
|
var HALF_PI = Math.PI / 2;
|
|
77601
78449
|
var angle2 = Math.acos(dir2.dot(surfaceNormal));
|
|
@@ -78048,6 +78896,19 @@
|
|
|
78048
78896
|
}
|
|
78049
78897
|
return adjusted;
|
|
78050
78898
|
}
|
|
78899
|
+
/**
|
|
78900
|
+
* @see `SavedLabelAttr` in `LabelManager.ts`
|
|
78901
|
+
* @see `hideOverlap`
|
|
78902
|
+
*/
|
|
78903
|
+
function restoreIgnore(labelList) {
|
|
78904
|
+
for (var i = 0; i < labelList.length; i++) {
|
|
78905
|
+
var labelItem = labelList[i];
|
|
78906
|
+
var defaultAttr = labelItem.defaultAttr;
|
|
78907
|
+
var labelLine = labelItem.labelLine;
|
|
78908
|
+
labelItem.label.attr('ignore', defaultAttr.ignore);
|
|
78909
|
+
labelLine && labelLine.attr('ignore', defaultAttr.labelGuideIgnore);
|
|
78910
|
+
}
|
|
78911
|
+
}
|
|
78051
78912
|
/**
|
|
78052
78913
|
* [NOTICE - restore]:
|
|
78053
78914
|
* 'series:layoutlabels' may be triggered during some shortcut passes, such as zooming in series.graph/geo
|
|
@@ -78131,6 +78992,496 @@
|
|
|
78131
78992
|
return ensureOBB(baseLayoutInfo).intersect(ensureOBB(targetLayoutInfo), mtv, intersectOpt);
|
|
78132
78993
|
}
|
|
78133
78994
|
|
|
78995
|
+
function cloneArr(points) {
|
|
78996
|
+
if (points) {
|
|
78997
|
+
var newPoints = [];
|
|
78998
|
+
for (var i = 0; i < points.length; i++) {
|
|
78999
|
+
newPoints.push(points[i].slice());
|
|
79000
|
+
}
|
|
79001
|
+
return newPoints;
|
|
79002
|
+
}
|
|
79003
|
+
}
|
|
79004
|
+
function prepareLayoutCallbackParams(labelItem, hostEl) {
|
|
79005
|
+
var label = labelItem.label;
|
|
79006
|
+
var labelLine = hostEl && hostEl.getTextGuideLine();
|
|
79007
|
+
return {
|
|
79008
|
+
dataIndex: labelItem.dataIndex,
|
|
79009
|
+
dataType: labelItem.dataType,
|
|
79010
|
+
seriesIndex: labelItem.seriesModel.seriesIndex,
|
|
79011
|
+
text: labelItem.label.style.text,
|
|
79012
|
+
rect: labelItem.hostRect,
|
|
79013
|
+
labelRect: labelItem.rect,
|
|
79014
|
+
// x: labelAttr.x,
|
|
79015
|
+
// y: labelAttr.y,
|
|
79016
|
+
align: label.style.align,
|
|
79017
|
+
verticalAlign: label.style.verticalAlign,
|
|
79018
|
+
labelLinePoints: cloneArr(labelLine && labelLine.shape.points)
|
|
79019
|
+
};
|
|
79020
|
+
}
|
|
79021
|
+
var LABEL_OPTION_TO_STYLE_KEYS = ['align', 'verticalAlign', 'width', 'height', 'fontSize'];
|
|
79022
|
+
var dummyTransformable = new Transformable();
|
|
79023
|
+
var labelLayoutInnerStore = makeInner();
|
|
79024
|
+
var labelLineAnimationStore = makeInner();
|
|
79025
|
+
function extendWithKeys(target, source, keys) {
|
|
79026
|
+
for (var i = 0; i < keys.length; i++) {
|
|
79027
|
+
var key = keys[i];
|
|
79028
|
+
if (source[key] != null) {
|
|
79029
|
+
target[key] = source[key];
|
|
79030
|
+
}
|
|
79031
|
+
}
|
|
79032
|
+
}
|
|
79033
|
+
var LABEL_LAYOUT_PROPS = ['x', 'y', 'rotation'];
|
|
79034
|
+
var LabelManager = /** @class */function () {
|
|
79035
|
+
function LabelManager() {
|
|
79036
|
+
this._labelList = [];
|
|
79037
|
+
this._chartViewList = [];
|
|
79038
|
+
}
|
|
79039
|
+
LabelManager.prototype.clearLabels = function () {
|
|
79040
|
+
this._labelList = [];
|
|
79041
|
+
this._chartViewList = [];
|
|
79042
|
+
};
|
|
79043
|
+
/**
|
|
79044
|
+
* Add label to manager
|
|
79045
|
+
*/
|
|
79046
|
+
LabelManager.prototype._addLabel = function (dataIndex, dataType, seriesModel, label, layoutOptionOrCb) {
|
|
79047
|
+
var labelStyle = label.style;
|
|
79048
|
+
var hostEl = label.__hostTarget;
|
|
79049
|
+
var textConfig = hostEl.textConfig || {};
|
|
79050
|
+
// TODO: If label is in other state.
|
|
79051
|
+
var labelTransform = label.getComputedTransform();
|
|
79052
|
+
var labelRect = label.getBoundingRect().plain();
|
|
79053
|
+
BoundingRect.applyTransform(labelRect, labelRect, labelTransform);
|
|
79054
|
+
if (labelTransform) {
|
|
79055
|
+
dummyTransformable.setLocalTransform(labelTransform);
|
|
79056
|
+
} else {
|
|
79057
|
+
// Identity transform.
|
|
79058
|
+
dummyTransformable.x = dummyTransformable.y = dummyTransformable.rotation = dummyTransformable.originX = dummyTransformable.originY = 0;
|
|
79059
|
+
dummyTransformable.scaleX = dummyTransformable.scaleY = 1;
|
|
79060
|
+
}
|
|
79061
|
+
dummyTransformable.rotation = normalizeRadian(dummyTransformable.rotation);
|
|
79062
|
+
var host = label.__hostTarget;
|
|
79063
|
+
var hostRect;
|
|
79064
|
+
if (host) {
|
|
79065
|
+
hostRect = host.getBoundingRect().plain();
|
|
79066
|
+
var transform = host.getComputedTransform();
|
|
79067
|
+
BoundingRect.applyTransform(hostRect, hostRect, transform);
|
|
79068
|
+
}
|
|
79069
|
+
var labelGuide = hostRect && host.getTextGuideLine();
|
|
79070
|
+
this._labelList.push({
|
|
79071
|
+
label: label,
|
|
79072
|
+
labelLine: labelGuide,
|
|
79073
|
+
seriesModel: seriesModel,
|
|
79074
|
+
dataIndex: dataIndex,
|
|
79075
|
+
dataType: dataType,
|
|
79076
|
+
layoutOptionOrCb: layoutOptionOrCb,
|
|
79077
|
+
layoutOption: null,
|
|
79078
|
+
rect: labelRect,
|
|
79079
|
+
hostRect: hostRect,
|
|
79080
|
+
// Label with lower priority will be hidden when overlapped
|
|
79081
|
+
// Use rect size as default priority
|
|
79082
|
+
priority: hostRect ? hostRect.width * hostRect.height : 0,
|
|
79083
|
+
// Save default label attributes.
|
|
79084
|
+
// For restore if developers want get back to default value in callback.
|
|
79085
|
+
defaultAttr: {
|
|
79086
|
+
ignore: label.ignore,
|
|
79087
|
+
labelGuideIgnore: labelGuide && labelGuide.ignore,
|
|
79088
|
+
x: dummyTransformable.x,
|
|
79089
|
+
y: dummyTransformable.y,
|
|
79090
|
+
scaleX: dummyTransformable.scaleX,
|
|
79091
|
+
scaleY: dummyTransformable.scaleY,
|
|
79092
|
+
rotation: dummyTransformable.rotation,
|
|
79093
|
+
style: {
|
|
79094
|
+
x: labelStyle.x,
|
|
79095
|
+
y: labelStyle.y,
|
|
79096
|
+
align: labelStyle.align,
|
|
79097
|
+
verticalAlign: labelStyle.verticalAlign,
|
|
79098
|
+
width: labelStyle.width,
|
|
79099
|
+
height: labelStyle.height,
|
|
79100
|
+
fontSize: labelStyle.fontSize
|
|
79101
|
+
},
|
|
79102
|
+
cursor: label.cursor,
|
|
79103
|
+
attachedPos: textConfig.position,
|
|
79104
|
+
attachedRot: textConfig.rotation
|
|
79105
|
+
}
|
|
79106
|
+
});
|
|
79107
|
+
};
|
|
79108
|
+
LabelManager.prototype.addLabelsOfSeries = function (chartView) {
|
|
79109
|
+
var _this = this;
|
|
79110
|
+
this._chartViewList.push(chartView);
|
|
79111
|
+
var seriesModel = chartView.__model;
|
|
79112
|
+
var layoutOption = seriesModel.get('labelLayout');
|
|
79113
|
+
/**
|
|
79114
|
+
* Ignore layouting if it's not specified anything.
|
|
79115
|
+
*/
|
|
79116
|
+
if (!(isFunction$1(layoutOption) || keys(layoutOption).length)) {
|
|
79117
|
+
return;
|
|
79118
|
+
}
|
|
79119
|
+
chartView.group.traverse(function (child) {
|
|
79120
|
+
if (child.ignore) {
|
|
79121
|
+
return true; // Stop traverse descendants.
|
|
79122
|
+
}
|
|
79123
|
+
// Only support label being hosted on graphic elements.
|
|
79124
|
+
var textEl = child.getTextContent();
|
|
79125
|
+
var ecData = getECData(child);
|
|
79126
|
+
// Can only attach the text on the element with dataIndex
|
|
79127
|
+
if (textEl && !textEl.disableLabelLayout) {
|
|
79128
|
+
_this._addLabel(ecData.dataIndex, ecData.dataType, seriesModel, textEl, layoutOption);
|
|
79129
|
+
}
|
|
79130
|
+
});
|
|
79131
|
+
};
|
|
79132
|
+
LabelManager.prototype.updateLayoutConfig = function (api) {
|
|
79133
|
+
var width = api.getWidth();
|
|
79134
|
+
var height = api.getHeight();
|
|
79135
|
+
function createDragHandler(el, labelLineModel) {
|
|
79136
|
+
return function () {
|
|
79137
|
+
updateLabelLinePoints(el, labelLineModel);
|
|
79138
|
+
};
|
|
79139
|
+
}
|
|
79140
|
+
for (var i = 0; i < this._labelList.length; i++) {
|
|
79141
|
+
var labelItem = this._labelList[i];
|
|
79142
|
+
var label = labelItem.label;
|
|
79143
|
+
var hostEl = label.__hostTarget;
|
|
79144
|
+
var defaultLabelAttr = labelItem.defaultAttr;
|
|
79145
|
+
var layoutOption = void 0;
|
|
79146
|
+
// TODO A global layout option?
|
|
79147
|
+
if (isFunction$1(labelItem.layoutOptionOrCb)) {
|
|
79148
|
+
layoutOption = labelItem.layoutOptionOrCb(prepareLayoutCallbackParams(labelItem, hostEl));
|
|
79149
|
+
} else {
|
|
79150
|
+
layoutOption = labelItem.layoutOptionOrCb;
|
|
79151
|
+
}
|
|
79152
|
+
layoutOption = layoutOption || {};
|
|
79153
|
+
labelItem.layoutOption = layoutOption;
|
|
79154
|
+
var degreeToRadian = Math.PI / 180;
|
|
79155
|
+
// TODO hostEl should always exists.
|
|
79156
|
+
// Or label should not have parent because the x, y is all in global space.
|
|
79157
|
+
if (hostEl) {
|
|
79158
|
+
hostEl.setTextConfig({
|
|
79159
|
+
// Force to set local false.
|
|
79160
|
+
local: false,
|
|
79161
|
+
// Ignore position and rotation config on the host el if x or y is changed.
|
|
79162
|
+
position: layoutOption.x != null || layoutOption.y != null ? null : defaultLabelAttr.attachedPos,
|
|
79163
|
+
// Ignore rotation config on the host el if rotation is changed.
|
|
79164
|
+
rotation: layoutOption.rotate != null ? layoutOption.rotate * degreeToRadian : defaultLabelAttr.attachedRot,
|
|
79165
|
+
offset: [layoutOption.dx || 0, layoutOption.dy || 0]
|
|
79166
|
+
});
|
|
79167
|
+
}
|
|
79168
|
+
var needsUpdateLabelLine = false;
|
|
79169
|
+
if (layoutOption.x != null) {
|
|
79170
|
+
// TODO width of chart view.
|
|
79171
|
+
label.x = parsePercent(layoutOption.x, width);
|
|
79172
|
+
label.setStyle('x', 0); // Ignore movement in style. TODO: origin.
|
|
79173
|
+
needsUpdateLabelLine = true;
|
|
79174
|
+
} else {
|
|
79175
|
+
label.x = defaultLabelAttr.x;
|
|
79176
|
+
label.setStyle('x', defaultLabelAttr.style.x);
|
|
79177
|
+
}
|
|
79178
|
+
if (layoutOption.y != null) {
|
|
79179
|
+
// TODO height of chart view.
|
|
79180
|
+
label.y = parsePercent(layoutOption.y, height);
|
|
79181
|
+
label.setStyle('y', 0); // Ignore movement in style.
|
|
79182
|
+
needsUpdateLabelLine = true;
|
|
79183
|
+
} else {
|
|
79184
|
+
label.y = defaultLabelAttr.y;
|
|
79185
|
+
label.setStyle('y', defaultLabelAttr.style.y);
|
|
79186
|
+
}
|
|
79187
|
+
if (layoutOption.labelLinePoints) {
|
|
79188
|
+
var guideLine = hostEl.getTextGuideLine();
|
|
79189
|
+
if (guideLine) {
|
|
79190
|
+
guideLine.setShape({
|
|
79191
|
+
points: layoutOption.labelLinePoints
|
|
79192
|
+
});
|
|
79193
|
+
// Not update
|
|
79194
|
+
needsUpdateLabelLine = false;
|
|
79195
|
+
}
|
|
79196
|
+
}
|
|
79197
|
+
var labelLayoutStore = labelLayoutInnerStore(label);
|
|
79198
|
+
labelLayoutStore.needsUpdateLabelLine = needsUpdateLabelLine;
|
|
79199
|
+
label.rotation = layoutOption.rotate != null ? layoutOption.rotate * degreeToRadian : defaultLabelAttr.rotation;
|
|
79200
|
+
label.scaleX = defaultLabelAttr.scaleX;
|
|
79201
|
+
label.scaleY = defaultLabelAttr.scaleY;
|
|
79202
|
+
for (var k = 0; k < LABEL_OPTION_TO_STYLE_KEYS.length; k++) {
|
|
79203
|
+
var key = LABEL_OPTION_TO_STYLE_KEYS[k];
|
|
79204
|
+
label.setStyle(key, layoutOption[key] != null ? layoutOption[key] : defaultLabelAttr.style[key]);
|
|
79205
|
+
}
|
|
79206
|
+
if (layoutOption.draggable) {
|
|
79207
|
+
label.draggable = true;
|
|
79208
|
+
label.cursor = 'move';
|
|
79209
|
+
if (hostEl) {
|
|
79210
|
+
var hostModel = labelItem.seriesModel;
|
|
79211
|
+
if (labelItem.dataIndex != null) {
|
|
79212
|
+
var data = labelItem.seriesModel.getData(labelItem.dataType);
|
|
79213
|
+
hostModel = data.getItemModel(labelItem.dataIndex);
|
|
79214
|
+
}
|
|
79215
|
+
label.on('drag', createDragHandler(hostEl, hostModel.getModel('labelLine')));
|
|
79216
|
+
}
|
|
79217
|
+
} else {
|
|
79218
|
+
// TODO Other drag functions?
|
|
79219
|
+
label.off('drag');
|
|
79220
|
+
label.cursor = defaultLabelAttr.cursor;
|
|
79221
|
+
}
|
|
79222
|
+
}
|
|
79223
|
+
};
|
|
79224
|
+
LabelManager.prototype.layout = function (api) {
|
|
79225
|
+
var width = api.getWidth();
|
|
79226
|
+
var height = api.getHeight();
|
|
79227
|
+
var labelList = [];
|
|
79228
|
+
each$c(this._labelList, function (inputItem) {
|
|
79229
|
+
if (!inputItem.defaultAttr.ignore) {
|
|
79230
|
+
labelList.push(newLabelLayoutWithGeometry({}, inputItem));
|
|
79231
|
+
}
|
|
79232
|
+
});
|
|
79233
|
+
var labelsNeedsAdjustOnX = filter(labelList, function (item) {
|
|
79234
|
+
return item.layoutOption.moveOverlap === 'shiftX';
|
|
79235
|
+
});
|
|
79236
|
+
var labelsNeedsAdjustOnY = filter(labelList, function (item) {
|
|
79237
|
+
return item.layoutOption.moveOverlap === 'shiftY';
|
|
79238
|
+
});
|
|
79239
|
+
shiftLayoutOnXY(labelsNeedsAdjustOnX, 0, 0, width);
|
|
79240
|
+
shiftLayoutOnXY(labelsNeedsAdjustOnY, 1, 0, height);
|
|
79241
|
+
var labelsNeedsHideOverlap = filter(labelList, function (item) {
|
|
79242
|
+
return item.layoutOption.hideOverlap;
|
|
79243
|
+
});
|
|
79244
|
+
restoreIgnore(labelsNeedsHideOverlap);
|
|
79245
|
+
hideOverlap(labelsNeedsHideOverlap);
|
|
79246
|
+
};
|
|
79247
|
+
/**
|
|
79248
|
+
* Process all labels. Not only labels with layoutOption.
|
|
79249
|
+
*/
|
|
79250
|
+
LabelManager.prototype.processLabelsOverall = function () {
|
|
79251
|
+
var _this = this;
|
|
79252
|
+
each$c(this._chartViewList, function (chartView) {
|
|
79253
|
+
var seriesModel = chartView.__model;
|
|
79254
|
+
var ignoreLabelLineUpdate = chartView.ignoreLabelLineUpdate;
|
|
79255
|
+
var animationEnabled = seriesModel.isAnimationEnabled();
|
|
79256
|
+
chartView.group.traverse(function (child) {
|
|
79257
|
+
if (child.ignore && !child.forceLabelAnimation) {
|
|
79258
|
+
return true; // Stop traverse descendants.
|
|
79259
|
+
}
|
|
79260
|
+
var needsUpdateLabelLine = !ignoreLabelLineUpdate;
|
|
79261
|
+
var label = child.getTextContent();
|
|
79262
|
+
if (!needsUpdateLabelLine && label) {
|
|
79263
|
+
needsUpdateLabelLine = labelLayoutInnerStore(label).needsUpdateLabelLine;
|
|
79264
|
+
}
|
|
79265
|
+
if (needsUpdateLabelLine) {
|
|
79266
|
+
_this._updateLabelLine(child, seriesModel);
|
|
79267
|
+
}
|
|
79268
|
+
if (animationEnabled) {
|
|
79269
|
+
_this._animateLabels(child, seriesModel);
|
|
79270
|
+
}
|
|
79271
|
+
});
|
|
79272
|
+
});
|
|
79273
|
+
};
|
|
79274
|
+
LabelManager.prototype._updateLabelLine = function (el, seriesModel) {
|
|
79275
|
+
// Only support label being hosted on graphic elements.
|
|
79276
|
+
var textEl = el.getTextContent();
|
|
79277
|
+
// Update label line style.
|
|
79278
|
+
var ecData = getECData(el);
|
|
79279
|
+
var dataIndex = ecData.dataIndex;
|
|
79280
|
+
// Only support labelLine on the labels represent data.
|
|
79281
|
+
if (textEl && dataIndex != null) {
|
|
79282
|
+
var data = seriesModel.getData(ecData.dataType);
|
|
79283
|
+
var itemModel = data.getItemModel(dataIndex);
|
|
79284
|
+
var defaultStyle = {};
|
|
79285
|
+
var visualStyle = data.getItemVisual(dataIndex, 'style');
|
|
79286
|
+
if (visualStyle) {
|
|
79287
|
+
var visualType = data.getVisual('drawType');
|
|
79288
|
+
// Default to be same with main color
|
|
79289
|
+
defaultStyle.stroke = visualStyle[visualType];
|
|
79290
|
+
}
|
|
79291
|
+
var labelLineModel = itemModel.getModel('labelLine');
|
|
79292
|
+
setLabelLineStyle(el, getLabelLineStatesModels(itemModel), defaultStyle);
|
|
79293
|
+
updateLabelLinePoints(el, labelLineModel);
|
|
79294
|
+
}
|
|
79295
|
+
};
|
|
79296
|
+
LabelManager.prototype._animateLabels = function (el, seriesModel) {
|
|
79297
|
+
var textEl = el.getTextContent();
|
|
79298
|
+
var guideLine = el.getTextGuideLine();
|
|
79299
|
+
// Animate
|
|
79300
|
+
if (textEl
|
|
79301
|
+
// `forceLabelAnimation` has the highest priority
|
|
79302
|
+
&& (el.forceLabelAnimation || !textEl.ignore && !textEl.invisible && !el.disableLabelAnimation && !isElementRemoved(el))) {
|
|
79303
|
+
var layoutStore = labelLayoutInnerStore(textEl);
|
|
79304
|
+
var oldLayout = layoutStore.oldLayout;
|
|
79305
|
+
var ecData = getECData(el);
|
|
79306
|
+
var dataIndex = ecData.dataIndex;
|
|
79307
|
+
var newProps = {
|
|
79308
|
+
x: textEl.x,
|
|
79309
|
+
y: textEl.y,
|
|
79310
|
+
rotation: textEl.rotation
|
|
79311
|
+
};
|
|
79312
|
+
var data = seriesModel.getData(ecData.dataType);
|
|
79313
|
+
if (!oldLayout) {
|
|
79314
|
+
textEl.attr(newProps);
|
|
79315
|
+
// Disable fade in animation if value animation is enabled.
|
|
79316
|
+
if (!labelInner(textEl).valueAnimation) {
|
|
79317
|
+
var oldOpacity = retrieve2(textEl.style.opacity, 1);
|
|
79318
|
+
// Fade in animation
|
|
79319
|
+
textEl.style.opacity = 0;
|
|
79320
|
+
initProps(textEl, {
|
|
79321
|
+
style: {
|
|
79322
|
+
opacity: oldOpacity
|
|
79323
|
+
}
|
|
79324
|
+
}, seriesModel, dataIndex);
|
|
79325
|
+
}
|
|
79326
|
+
} else {
|
|
79327
|
+
textEl.attr(oldLayout);
|
|
79328
|
+
// Make sure the animation from is in the right status.
|
|
79329
|
+
var prevStates = el.prevStates;
|
|
79330
|
+
if (prevStates) {
|
|
79331
|
+
if (indexOf(prevStates, 'select') >= 0) {
|
|
79332
|
+
textEl.attr(layoutStore.oldLayoutSelect);
|
|
79333
|
+
}
|
|
79334
|
+
if (indexOf(prevStates, 'emphasis') >= 0) {
|
|
79335
|
+
textEl.attr(layoutStore.oldLayoutEmphasis);
|
|
79336
|
+
}
|
|
79337
|
+
}
|
|
79338
|
+
updateProps$1(textEl, newProps, seriesModel, dataIndex);
|
|
79339
|
+
}
|
|
79340
|
+
layoutStore.oldLayout = newProps;
|
|
79341
|
+
if (textEl.states.select) {
|
|
79342
|
+
var layoutSelect = layoutStore.oldLayoutSelect = {};
|
|
79343
|
+
extendWithKeys(layoutSelect, newProps, LABEL_LAYOUT_PROPS);
|
|
79344
|
+
extendWithKeys(layoutSelect, textEl.states.select, LABEL_LAYOUT_PROPS);
|
|
79345
|
+
}
|
|
79346
|
+
if (textEl.states.emphasis) {
|
|
79347
|
+
var layoutEmphasis = layoutStore.oldLayoutEmphasis = {};
|
|
79348
|
+
extendWithKeys(layoutEmphasis, newProps, LABEL_LAYOUT_PROPS);
|
|
79349
|
+
extendWithKeys(layoutEmphasis, textEl.states.emphasis, LABEL_LAYOUT_PROPS);
|
|
79350
|
+
}
|
|
79351
|
+
animateLabelValue(textEl, dataIndex, data, seriesModel, seriesModel);
|
|
79352
|
+
}
|
|
79353
|
+
if (guideLine && !guideLine.ignore && !guideLine.invisible) {
|
|
79354
|
+
var layoutStore = labelLineAnimationStore(guideLine);
|
|
79355
|
+
var oldLayout = layoutStore.oldLayout;
|
|
79356
|
+
var newLayout = {
|
|
79357
|
+
points: guideLine.shape.points
|
|
79358
|
+
};
|
|
79359
|
+
if (!oldLayout) {
|
|
79360
|
+
guideLine.setShape(newLayout);
|
|
79361
|
+
guideLine.style.strokePercent = 0;
|
|
79362
|
+
initProps(guideLine, {
|
|
79363
|
+
style: {
|
|
79364
|
+
strokePercent: 1
|
|
79365
|
+
}
|
|
79366
|
+
}, seriesModel);
|
|
79367
|
+
} else {
|
|
79368
|
+
guideLine.attr({
|
|
79369
|
+
shape: oldLayout
|
|
79370
|
+
});
|
|
79371
|
+
updateProps$1(guideLine, {
|
|
79372
|
+
shape: newLayout
|
|
79373
|
+
}, seriesModel);
|
|
79374
|
+
}
|
|
79375
|
+
layoutStore.oldLayout = newLayout;
|
|
79376
|
+
}
|
|
79377
|
+
};
|
|
79378
|
+
return LabelManager;
|
|
79379
|
+
}();
|
|
79380
|
+
|
|
79381
|
+
var getLabelManager = makeInner();
|
|
79382
|
+
function installLabelLayout(registers) {
|
|
79383
|
+
registers.registerUpdateLifecycle('series:beforeupdate', function (ecModel, api, params) {
|
|
79384
|
+
// TODO api provide an namespace that can save stuff per instance
|
|
79385
|
+
var labelManager = getLabelManager(api).labelManager;
|
|
79386
|
+
if (!labelManager) {
|
|
79387
|
+
labelManager = getLabelManager(api).labelManager = new LabelManager();
|
|
79388
|
+
}
|
|
79389
|
+
labelManager.clearLabels();
|
|
79390
|
+
});
|
|
79391
|
+
registers.registerUpdateLifecycle('series:layoutlabels', function (ecModel, api, params) {
|
|
79392
|
+
var labelManager = getLabelManager(api).labelManager;
|
|
79393
|
+
params.updatedSeries.forEach(function (series) {
|
|
79394
|
+
labelManager.addLabelsOfSeries(api.getViewOfSeriesModel(series));
|
|
79395
|
+
});
|
|
79396
|
+
labelManager.updateLayoutConfig(api);
|
|
79397
|
+
labelManager.layout(api);
|
|
79398
|
+
labelManager.processLabelsOverall();
|
|
79399
|
+
});
|
|
79400
|
+
}
|
|
79401
|
+
|
|
79402
|
+
use(installLabelLayout);
|
|
79403
|
+
|
|
79404
|
+
/*
|
|
79405
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
79406
|
+
* or more contributor license agreements. See the NOTICE file
|
|
79407
|
+
* distributed with this work for additional information
|
|
79408
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
79409
|
+
* to you under the Apache License, Version 2.0 (the
|
|
79410
|
+
* "License"); you may not use this file except in compliance
|
|
79411
|
+
* with the License. You may obtain a copy of the License at
|
|
79412
|
+
*
|
|
79413
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
79414
|
+
*
|
|
79415
|
+
* Unless required by applicable law or agreed to in writing,
|
|
79416
|
+
* software distributed under the License is distributed on an
|
|
79417
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
79418
|
+
* KIND, either express or implied. See the License for the
|
|
79419
|
+
* specific language governing permissions and limitations
|
|
79420
|
+
* under the License.
|
|
79421
|
+
*/
|
|
79422
|
+
|
|
79423
|
+
var core = /*#__PURE__*/Object.freeze({
|
|
79424
|
+
__proto__: null,
|
|
79425
|
+
Axis: Axis,
|
|
79426
|
+
ChartView: ChartView,
|
|
79427
|
+
ComponentModel: ComponentModel,
|
|
79428
|
+
ComponentView: ComponentView,
|
|
79429
|
+
List: SeriesData,
|
|
79430
|
+
Model: Model,
|
|
79431
|
+
PRIORITY: PRIORITY,
|
|
79432
|
+
SeriesModel: SeriesModel,
|
|
79433
|
+
color: color$2,
|
|
79434
|
+
connect: connect,
|
|
79435
|
+
dataTool: dataTool,
|
|
79436
|
+
dependencies: dependencies,
|
|
79437
|
+
disConnect: disConnect,
|
|
79438
|
+
disconnect: disconnect,
|
|
79439
|
+
dispose: dispose,
|
|
79440
|
+
env: env,
|
|
79441
|
+
extendChartView: extendChartView,
|
|
79442
|
+
extendComponentModel: extendComponentModel,
|
|
79443
|
+
extendComponentView: extendComponentView,
|
|
79444
|
+
extendSeriesModel: extendSeriesModel,
|
|
79445
|
+
format: format,
|
|
79446
|
+
getCoordinateSystemDimensions: getCoordinateSystemDimensions,
|
|
79447
|
+
getInstanceByDom: getInstanceByDom,
|
|
79448
|
+
getInstanceById: getInstanceById,
|
|
79449
|
+
getMap: getMap,
|
|
79450
|
+
graphic: graphic$1,
|
|
79451
|
+
helper: helper,
|
|
79452
|
+
init: init,
|
|
79453
|
+
innerDrawElementOnCanvas: brushSingle,
|
|
79454
|
+
matrix: matrix,
|
|
79455
|
+
number: number,
|
|
79456
|
+
parseGeoJSON: parseGeoJSON,
|
|
79457
|
+
parseGeoJson: parseGeoJSON,
|
|
79458
|
+
registerAction: registerAction,
|
|
79459
|
+
registerCoordinateSystem: registerCoordinateSystem,
|
|
79460
|
+
registerCustomSeries: registerCustomSeries,
|
|
79461
|
+
registerLayout: registerLayout,
|
|
79462
|
+
registerLoading: registerLoading,
|
|
79463
|
+
registerLocale: registerLocale,
|
|
79464
|
+
registerMap: registerMap$1,
|
|
79465
|
+
registerPostInit: registerPostInit,
|
|
79466
|
+
registerPostUpdate: registerPostUpdate,
|
|
79467
|
+
registerPreprocessor: registerPreprocessor,
|
|
79468
|
+
registerProcessor: registerProcessor,
|
|
79469
|
+
registerTheme: registerTheme,
|
|
79470
|
+
registerTransform: registerTransform,
|
|
79471
|
+
registerUpdateLifecycle: registerUpdateLifecycle,
|
|
79472
|
+
registerVisual: registerVisual,
|
|
79473
|
+
setCanvasCreator: setCanvasCreator,
|
|
79474
|
+
setPlatformAPI: setPlatformAPI,
|
|
79475
|
+
throttle: throttle,
|
|
79476
|
+
time: time,
|
|
79477
|
+
use: use,
|
|
79478
|
+
util: util,
|
|
79479
|
+
vector: vector,
|
|
79480
|
+
version: version$1,
|
|
79481
|
+
zrUtil: util$1,
|
|
79482
|
+
zrender: zrender
|
|
79483
|
+
});
|
|
79484
|
+
|
|
78134
79485
|
var LineSeriesModel = /** @class */function (_super) {
|
|
78135
79486
|
__extends(LineSeriesModel, _super);
|
|
78136
79487
|
function LineSeriesModel() {
|
|
@@ -83894,8 +85245,7 @@
|
|
|
83894
85245
|
return this.__ordinalMeta;
|
|
83895
85246
|
};
|
|
83896
85247
|
AxisModel.prototype.updateAxisBreaks = function (payload) {
|
|
83897
|
-
|
|
83898
|
-
return axisBreakHelper ? axisBreakHelper.updateModelAxisBreak(this, payload) : {
|
|
85248
|
+
return {
|
|
83899
85249
|
breaks: []
|
|
83900
85250
|
};
|
|
83901
85251
|
};
|
|
@@ -84586,7 +85936,7 @@
|
|
|
84586
85936
|
y: pos.y,
|
|
84587
85937
|
rotation: labelLayout.rotation,
|
|
84588
85938
|
silent: AxisBuilder.isLabelSilent(axisModel),
|
|
84589
|
-
style: createTextStyle(textStyleModel, {
|
|
85939
|
+
style: createTextStyle$1(textStyleModel, {
|
|
84590
85940
|
text: name,
|
|
84591
85941
|
font: textFont,
|
|
84592
85942
|
overflow: 'truncate',
|
|
@@ -84939,7 +86289,7 @@
|
|
|
84939
86289
|
// --- transform props end ---
|
|
84940
86290
|
silent: AxisBuilder.isLabelSilent(axisModel),
|
|
84941
86291
|
z2: z2,
|
|
84942
|
-
style: createTextStyle(itemLabelModel, {
|
|
86292
|
+
style: createTextStyle$1(itemLabelModel, {
|
|
84943
86293
|
text: formattedLabel,
|
|
84944
86294
|
align: index === 0 ? alignMin : index === labels.length - 1 ? alignMax : align,
|
|
84945
86295
|
verticalAlign: index === 0 ? verticalAlignMin : index === labels.length - 1 ? verticalAlignMax : verticalAlign,
|
|
@@ -92704,7 +94054,7 @@
|
|
|
92704
94054
|
lineJoin: 'bevel'
|
|
92705
94055
|
}),
|
|
92706
94056
|
textContent: new ZRText({
|
|
92707
|
-
style: createTextStyle(textStyleModel, {
|
|
94057
|
+
style: createTextStyle$1(textStyleModel, {
|
|
92708
94058
|
text: text
|
|
92709
94059
|
})
|
|
92710
94060
|
}),
|
|
@@ -92715,7 +94065,7 @@
|
|
|
92715
94065
|
onclick: curry$1(onSelect, itemNode)
|
|
92716
94066
|
});
|
|
92717
94067
|
el.disableLabelAnimation = true;
|
|
92718
|
-
el.getTextContent().ensureState('emphasis').style = createTextStyle(emphasisTextStyleModel, {
|
|
94068
|
+
el.getTextContent().ensureState('emphasis').style = createTextStyle$1(emphasisTextStyleModel, {
|
|
92719
94069
|
text: text
|
|
92720
94070
|
});
|
|
92721
94071
|
el.ensureState('emphasis').style = emphasisItemStyle;
|
|
@@ -96911,7 +98261,7 @@
|
|
|
96911
98261
|
}
|
|
96912
98262
|
if (rotate === 0) {
|
|
96913
98263
|
group.add(new ZRText({
|
|
96914
|
-
style: createTextStyle(labelModel, {
|
|
98264
|
+
style: createTextStyle$1(labelModel, {
|
|
96915
98265
|
text: label,
|
|
96916
98266
|
x: textStyleX,
|
|
96917
98267
|
y: textStyleY,
|
|
@@ -96924,7 +98274,7 @@
|
|
|
96924
98274
|
}));
|
|
96925
98275
|
} else {
|
|
96926
98276
|
group.add(new ZRText({
|
|
96927
|
-
style: createTextStyle(labelModel, {
|
|
98277
|
+
style: createTextStyle$1(labelModel, {
|
|
96928
98278
|
text: label,
|
|
96929
98279
|
x: textStyleX,
|
|
96930
98280
|
y: textStyleY,
|
|
@@ -97184,7 +98534,7 @@
|
|
|
97184
98534
|
var labelEl = newTitleEls[idx];
|
|
97185
98535
|
labelEl.attr({
|
|
97186
98536
|
z2: showPointerAbove ? 0 : 2,
|
|
97187
|
-
style: createTextStyle(itemTitleModel, {
|
|
98537
|
+
style: createTextStyle$1(itemTitleModel, {
|
|
97188
98538
|
x: titleX,
|
|
97189
98539
|
y: titleY,
|
|
97190
98540
|
text: data.getName(idx),
|
|
@@ -97208,7 +98558,7 @@
|
|
|
97208
98558
|
var formatter_1 = itemDetailModel.get('formatter');
|
|
97209
98559
|
labelEl.attr({
|
|
97210
98560
|
z2: showPointerAbove ? 0 : 2,
|
|
97211
|
-
style: createTextStyle(itemDetailModel, {
|
|
98561
|
+
style: createTextStyle$1(itemDetailModel, {
|
|
97212
98562
|
x: detailX,
|
|
97213
98563
|
y: detailY,
|
|
97214
98564
|
text: formatLabel(value, formatter_1),
|
|
@@ -103195,7 +104545,7 @@
|
|
|
103195
104545
|
if (isNormal) {
|
|
103196
104546
|
text = text || _this.node.name;
|
|
103197
104547
|
}
|
|
103198
|
-
state.style = createTextStyle(labelStateModel, {}, null, stateName !== 'normal', true);
|
|
104548
|
+
state.style = createTextStyle$1(labelStateModel, {}, null, stateName !== 'normal', true);
|
|
103199
104549
|
if (text) {
|
|
103200
104550
|
state.style.text = text;
|
|
103201
104551
|
}
|
|
@@ -105100,7 +106450,7 @@
|
|
|
105100
106450
|
// Now that the feature of "auto adjust text fill/stroke" has been migrated to zrender
|
|
105101
106451
|
// since ec5, we should set `isAttached` as `false` here and make compat in
|
|
105102
106452
|
// `convertToEC4StyleForCustomSerise`.
|
|
105103
|
-
var textStyle = createTextStyle(labelModel, null, opt, false, true);
|
|
106453
|
+
var textStyle = createTextStyle$1(labelModel, null, opt, false, true);
|
|
105104
106454
|
textStyle.text = labelModel.getShallow('show') ? retrieve2(customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null;
|
|
105105
106455
|
var textConfig = createTextConfig(labelModel, opt, false);
|
|
105106
106456
|
preFetchFromExtra(userProps, itemStyle);
|
|
@@ -105121,7 +106471,7 @@
|
|
|
105121
106471
|
dataIndexInside == null && (dataIndexInside = currDataIndexInside);
|
|
105122
106472
|
var itemStyle = getItemStyleModel(dataIndexInside, EMPHASIS).getItemStyle();
|
|
105123
106473
|
var labelModel = getLabelModel(dataIndexInside, EMPHASIS);
|
|
105124
|
-
var textStyle = createTextStyle(labelModel, null, null, true, true);
|
|
106474
|
+
var textStyle = createTextStyle$1(labelModel, null, null, true, true);
|
|
105125
106475
|
textStyle.text = labelModel.getShallow('show') ? retrieve3(customSeries.getFormattedLabel(dataIndexInside, EMPHASIS), customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null;
|
|
105126
106476
|
var textConfig = createTextConfig(labelModel, null, true);
|
|
105127
106477
|
preFetchFromExtra(userProps, itemStyle);
|
|
@@ -105918,7 +107268,7 @@
|
|
|
105918
107268
|
// shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},
|
|
105919
107269
|
x: position[0],
|
|
105920
107270
|
y: position[1],
|
|
105921
|
-
style: createTextStyle(labelModel, {
|
|
107271
|
+
style: createTextStyle$1(labelModel, {
|
|
105922
107272
|
text: text,
|
|
105923
107273
|
font: font,
|
|
105924
107274
|
fill: labelModel.getTextColor(),
|
|
@@ -107125,7 +108475,7 @@
|
|
|
107125
108475
|
}
|
|
107126
108476
|
var textEl = new ZRText({
|
|
107127
108477
|
silent: AxisBuilder.isLabelSilent(angleAxisModel),
|
|
107128
|
-
style: createTextStyle(labelModel, {
|
|
108478
|
+
style: createTextStyle$1(labelModel, {
|
|
107129
108479
|
x: p[0],
|
|
107130
108480
|
y: p[1],
|
|
107131
108481
|
fill: labelModel.getTextColor() || angleAxisModel.get(['axisLine', 'lineStyle', 'color']),
|
|
@@ -108050,7 +109400,7 @@
|
|
|
108050
109400
|
var content = this._formatterLabel(formatter, params);
|
|
108051
109401
|
var yearText = new ZRText({
|
|
108052
109402
|
z2: 30,
|
|
108053
|
-
style: createTextStyle(yearLabel, {
|
|
109403
|
+
style: createTextStyle$1(yearLabel, {
|
|
108054
109404
|
text: content
|
|
108055
109405
|
}),
|
|
108056
109406
|
silent: yearLabel.get('silent')
|
|
@@ -108131,7 +109481,7 @@
|
|
|
108131
109481
|
var content = this._formatterLabel(formatter, params);
|
|
108132
109482
|
var monthText = new ZRText({
|
|
108133
109483
|
z2: 30,
|
|
108134
|
-
style: extend(createTextStyle(monthLabel, {
|
|
109484
|
+
style: extend(createTextStyle$1(monthLabel, {
|
|
108135
109485
|
text: content
|
|
108136
109486
|
}), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin)),
|
|
108137
109487
|
silent: labelSilent
|
|
@@ -108196,7 +109546,7 @@
|
|
|
108196
109546
|
day = Math.abs((i + firstDayOfWeek) % 7);
|
|
108197
109547
|
var weekText = new ZRText({
|
|
108198
109548
|
z2: 30,
|
|
108199
|
-
style: extend(createTextStyle(dayLabel, {
|
|
109549
|
+
style: extend(createTextStyle$1(dayLabel, {
|
|
108200
109550
|
text: nameMap[day]
|
|
108201
109551
|
}), this._weekTextPositionControl(point, orient, pos, margin, cellSize)),
|
|
108202
109552
|
silent: labelSilent
|
|
@@ -113540,7 +114890,7 @@
|
|
|
113540
114890
|
var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0;
|
|
113541
114891
|
html = formatter;
|
|
113542
114892
|
if (isTimeAxis) {
|
|
113543
|
-
html = format(params0.axisValue, html, useUTC);
|
|
114893
|
+
html = format$1(params0.axisValue, html, useUTC);
|
|
113544
114894
|
}
|
|
113545
114895
|
html = formatTpl(html, params, true);
|
|
113546
114896
|
} else if (isFunction$1(formatter)) {
|
|
@@ -114677,7 +116027,7 @@
|
|
|
114677
116027
|
var textAlign = titleModel.get('textAlign');
|
|
114678
116028
|
var textVerticalAlign = retrieve2(titleModel.get('textBaseline'), titleModel.get('textVerticalAlign'));
|
|
114679
116029
|
var textEl = new ZRText({
|
|
114680
|
-
style: createTextStyle(textStyleModel, {
|
|
116030
|
+
style: createTextStyle$1(textStyleModel, {
|
|
114681
116031
|
text: titleModel.get('text'),
|
|
114682
116032
|
fill: textStyleModel.getTextColor()
|
|
114683
116033
|
}, {
|
|
@@ -114688,7 +116038,7 @@
|
|
|
114688
116038
|
var textRect = textEl.getBoundingRect();
|
|
114689
116039
|
var subText = titleModel.get('subtext');
|
|
114690
116040
|
var subTextEl = new ZRText({
|
|
114691
|
-
style: createTextStyle(subtextStyleModel, {
|
|
116041
|
+
style: createTextStyle$1(subtextStyleModel, {
|
|
114692
116042
|
text: subText,
|
|
114693
116043
|
fill: subtextStyleModel.getTextColor(),
|
|
114694
116044
|
y: textRect.height + titleModel.get('itemGap'),
|
|
@@ -115386,14 +116736,14 @@
|
|
|
115386
116736
|
rotation: layoutInfo.labelRotation - layoutInfo.rotation,
|
|
115387
116737
|
onclick: bind$1(_this._changeTimeline, _this, dataIndex),
|
|
115388
116738
|
silent: false,
|
|
115389
|
-
style: createTextStyle(normalLabelModel, {
|
|
116739
|
+
style: createTextStyle$1(normalLabelModel, {
|
|
115390
116740
|
text: labelItem.formattedLabel,
|
|
115391
116741
|
align: layoutInfo.labelAlign,
|
|
115392
116742
|
verticalAlign: layoutInfo.labelBaseline
|
|
115393
116743
|
})
|
|
115394
116744
|
});
|
|
115395
|
-
textEl.ensureState('emphasis').style = createTextStyle(hoverLabelModel);
|
|
115396
|
-
textEl.ensureState('progress').style = createTextStyle(progressLabelModel);
|
|
116745
|
+
textEl.ensureState('emphasis').style = createTextStyle$1(hoverLabelModel);
|
|
116746
|
+
textEl.ensureState('progress').style = createTextStyle$1(progressLabelModel);
|
|
115397
116747
|
group.add(textEl);
|
|
115398
116748
|
enableHoverEmphasis(textEl);
|
|
115399
116749
|
labelDataIndexStore(textEl).dataIndex = dataIndex;
|
|
@@ -117461,7 +118811,7 @@
|
|
|
117461
118811
|
}
|
|
117462
118812
|
var textColor = isSelected ? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor');
|
|
117463
118813
|
itemGroup.add(new ZRText({
|
|
117464
|
-
style: createTextStyle(textStyleModel, {
|
|
118814
|
+
style: createTextStyle$1(textStyleModel, {
|
|
117465
118815
|
text: content,
|
|
117466
118816
|
x: textX,
|
|
117467
118817
|
y: itemHeight / 2,
|
|
@@ -119173,7 +120523,7 @@
|
|
|
119173
120523
|
thisGroup.add(handleLabels[handleIndex] = new ZRText({
|
|
119174
120524
|
silent: true,
|
|
119175
120525
|
invisible: !handleLabelShow,
|
|
119176
|
-
style: createTextStyle(textStyleModel, {
|
|
120526
|
+
style: createTextStyle$1(textStyleModel, {
|
|
119177
120527
|
x: 0,
|
|
119178
120528
|
y: 0,
|
|
119179
120529
|
text: '',
|
|
@@ -120380,7 +121730,7 @@
|
|
|
120380
121730
|
var orient = this._orient;
|
|
120381
121731
|
var textStyleModel = this.visualMapModel.textStyleModel;
|
|
120382
121732
|
this.group.add(new ZRText({
|
|
120383
|
-
style: createTextStyle(textStyleModel, {
|
|
121733
|
+
style: createTextStyle$1(textStyleModel, {
|
|
120384
121734
|
x: position[0],
|
|
120385
121735
|
y: position[1],
|
|
120386
121736
|
verticalAlign: textStyleModel.get('verticalAlign') || (orient === 'horizontal' ? 'middle' : align),
|
|
@@ -120464,7 +121814,7 @@
|
|
|
120464
121814
|
stop(e.event);
|
|
120465
121815
|
},
|
|
120466
121816
|
ondragend: onDragEnd,
|
|
120467
|
-
style: createTextStyle(textStyleModel, {
|
|
121817
|
+
style: createTextStyle$1(textStyleModel, {
|
|
120468
121818
|
x: 0,
|
|
120469
121819
|
y: 0,
|
|
120470
121820
|
text: ''
|
|
@@ -120511,7 +121861,7 @@
|
|
|
120511
121861
|
var indicatorLabel = new ZRText({
|
|
120512
121862
|
silent: true,
|
|
120513
121863
|
invisible: true,
|
|
120514
|
-
style: createTextStyle(textStyleModel, {
|
|
121864
|
+
style: createTextStyle$1(textStyleModel, {
|
|
120515
121865
|
x: 0,
|
|
120516
121866
|
y: 0,
|
|
120517
121867
|
text: ''
|
|
@@ -121536,7 +122886,7 @@
|
|
|
121536
122886
|
var visualState = this.visualMapModel.getValueState(representValue);
|
|
121537
122887
|
var align = textStyleModel.get('align') || itemAlign;
|
|
121538
122888
|
itemGroup.add(new ZRText({
|
|
121539
|
-
style: createTextStyle(textStyleModel, {
|
|
122889
|
+
style: createTextStyle$1(textStyleModel, {
|
|
121540
122890
|
x: align === 'right' ? -textGap : itemSize[0] + textGap,
|
|
121541
122891
|
y: itemSize[1] / 2,
|
|
121542
122892
|
text: piece.text,
|
|
@@ -121591,7 +122941,7 @@
|
|
|
121591
122941
|
var itemGroup = new Group$3();
|
|
121592
122942
|
var textStyleModel = this.visualMapModel.textStyleModel;
|
|
121593
122943
|
itemGroup.add(new ZRText({
|
|
121594
|
-
style: createTextStyle(textStyleModel, {
|
|
122944
|
+
style: createTextStyle$1(textStyleModel, {
|
|
121595
122945
|
x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2,
|
|
121596
122946
|
y: itemSize[1] / 2,
|
|
121597
122947
|
verticalAlign: 'middle',
|
|
@@ -123048,6 +124398,7 @@
|
|
|
123048
124398
|
"#FFAF20"
|
|
123049
124399
|
]
|
|
123050
124400
|
});
|
|
124401
|
+
const MENU_RESIZE_DELAYS = [50, 100, 200];
|
|
123051
124402
|
const RESIZE_DEBOUNCE_DELAY = 100;
|
|
123052
124403
|
function useChart(options = {}) {
|
|
123053
124404
|
const { initOptions, initDelay = 0, threshold = 0.1, autoTheme = true } = options;
|
|
@@ -123087,8 +124438,18 @@
|
|
|
123087
124438
|
resizeTimeoutId = null;
|
|
123088
124439
|
}, RESIZE_DEBOUNCE_DELAY);
|
|
123089
124440
|
};
|
|
124441
|
+
const multiDelayResize = (delays) => {
|
|
124442
|
+
vue.nextTick(requestAnimationResize);
|
|
124443
|
+
delays.forEach((delay) => {
|
|
124444
|
+
setTimeout(requestAnimationResize, delay);
|
|
124445
|
+
});
|
|
124446
|
+
};
|
|
123090
124447
|
let menuOpenStopHandle = null;
|
|
123091
124448
|
let menuTypeStopHandle = null;
|
|
124449
|
+
const setupMenuWatchers = () => {
|
|
124450
|
+
vue.nextTick(requestAnimationResize);
|
|
124451
|
+
setTimeout(() => multiDelayResize(MENU_RESIZE_DELAYS), 0);
|
|
124452
|
+
};
|
|
123092
124453
|
const cleanupMenuWatchers = () => {
|
|
123093
124454
|
menuOpenStopHandle?.();
|
|
123094
124455
|
menuTypeStopHandle?.();
|
|
@@ -123300,6 +124661,7 @@
|
|
|
123300
124661
|
const performChartInit = (options2) => {
|
|
123301
124662
|
if (!chart && chartRef.value && !isDestroyed) {
|
|
123302
124663
|
chart = init(chartRef.value);
|
|
124664
|
+
setupMenuWatchers();
|
|
123303
124665
|
}
|
|
123304
124666
|
if (chart && !isDestroyed) {
|
|
123305
124667
|
chart.setOption(options2);
|
|
@@ -146136,6 +147498,7 @@
|
|
|
146136
147498
|
exports.downloadByOnlineUrl = downloadByOnlineUrl;
|
|
146137
147499
|
exports.downloadByUrl = downloadByUrl;
|
|
146138
147500
|
exports.downloadStreamFile = downloadStreamFile;
|
|
147501
|
+
exports.echarts = core;
|
|
146139
147502
|
exports.elSvg = elSvg;
|
|
146140
147503
|
exports.emitter = emitter;
|
|
146141
147504
|
exports.feature = feature;
|
|
@@ -146153,6 +147516,7 @@
|
|
|
146153
147516
|
exports.getJWTDate = getJWTDate;
|
|
146154
147517
|
exports.getToken = getToken;
|
|
146155
147518
|
exports.getWeek = getWeek;
|
|
147519
|
+
exports.graphic = graphic;
|
|
146156
147520
|
exports.hAuth = hAuth;
|
|
146157
147521
|
exports.hAuthAll = hAuthAll;
|
|
146158
147522
|
exports.hAuths = hAuths;
|