@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.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
1
|
+
/*! fm-dev v1.0.116 */
|
|
2
2
|
import { defineComponent, reactive, computed, watch, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, createTextVNode, toDisplayString as toDisplayString$1, withDirectives, createElementBlock, Fragment, renderList, vShow, ref, onMounted, nextTick, normalizeStyle as normalizeStyle$1, createCommentVNode, normalizeClass, withModifiers, mergeModels, useModel, effectScope, getCurrentInstance, shallowRef, isRef as isRef$1, inject, onUnmounted, h, Text, createSlots, renderSlot, markRaw, hasInjectionContext, toRaw as toRaw$1, isReactive as isReactive$1, toRef, unref, getCurrentScope, onScopeDispose, toRefs, resolveDirective, mergeProps, resolveDynamicComponent, useSlots, toHandlers, onBeforeUnmount, onUpdated, useAttrs, normalizeProps, guardReactiveProps } from 'vue';
|
|
3
3
|
import crypto from 'crypto';
|
|
4
4
|
import require$$0 from 'url';
|
|
5
5
|
import require$$1 from 'http';
|
|
6
6
|
import require$$2 from 'https';
|
|
7
7
|
import http2 from 'http2';
|
|
8
|
-
import util from 'util';
|
|
8
|
+
import util$2 from 'util';
|
|
9
9
|
import stream, { Readable } from 'stream';
|
|
10
10
|
import require$$4 from 'assert';
|
|
11
11
|
import zlib from 'zlib';
|
|
@@ -5421,7 +5421,7 @@ const readBlob = async function* (blob) {
|
|
|
5421
5421
|
|
|
5422
5422
|
const BOUNDARY_ALPHABET = platform$1.ALPHABET.ALPHA_DIGIT + '-_';
|
|
5423
5423
|
|
|
5424
|
-
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder();
|
|
5424
|
+
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util$2.TextEncoder();
|
|
5425
5425
|
|
|
5426
5426
|
const CRLF = '\r\n';
|
|
5427
5427
|
const CRLF_BYTES = textEncoder.encode(CRLF);
|
|
@@ -5816,7 +5816,7 @@ class Http2Sessions {
|
|
|
5816
5816
|
|
|
5817
5817
|
for (let i = 0; i < len; i++) {
|
|
5818
5818
|
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
5819
|
-
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
|
|
5819
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util$2.isDeepStrictEqual(sessionOptions, options)) {
|
|
5820
5820
|
return sessionHandle;
|
|
5821
5821
|
}
|
|
5822
5822
|
}
|
|
@@ -6243,7 +6243,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
6243
6243
|
|
|
6244
6244
|
if (!headers.hasContentLength()) {
|
|
6245
6245
|
try {
|
|
6246
|
-
const knownLength = await util.promisify(data.getLength).call(data);
|
|
6246
|
+
const knownLength = await util$2.promisify(data.getLength).call(data);
|
|
6247
6247
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
6248
6248
|
/*eslint no-empty:0*/
|
|
6249
6249
|
} catch (e) {
|
|
@@ -9038,14 +9038,14 @@ function commonjsRequire(path) {
|
|
|
9038
9038
|
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.');
|
|
9039
9039
|
}
|
|
9040
9040
|
|
|
9041
|
-
var core$
|
|
9041
|
+
var core$2 = {exports: {}};
|
|
9042
9042
|
|
|
9043
|
-
var core = core$
|
|
9043
|
+
var core$1 = core$2.exports;
|
|
9044
9044
|
|
|
9045
9045
|
var hasRequiredCore;
|
|
9046
9046
|
|
|
9047
9047
|
function requireCore () {
|
|
9048
|
-
if (hasRequiredCore) return core$
|
|
9048
|
+
if (hasRequiredCore) return core$2.exports;
|
|
9049
9049
|
hasRequiredCore = 1;
|
|
9050
9050
|
(function (module, exports) {
|
|
9051
9051
|
(function (root, factory) {
|
|
@@ -9053,7 +9053,7 @@ function requireCore () {
|
|
|
9053
9053
|
// CommonJS
|
|
9054
9054
|
module.exports = factory();
|
|
9055
9055
|
}
|
|
9056
|
-
}(core, function () {
|
|
9056
|
+
}(core$1, function () {
|
|
9057
9057
|
|
|
9058
9058
|
/*globals window, global, require*/
|
|
9059
9059
|
|
|
@@ -9847,8 +9847,8 @@ function requireCore () {
|
|
|
9847
9847
|
return CryptoJS;
|
|
9848
9848
|
|
|
9849
9849
|
}));
|
|
9850
|
-
} (core$
|
|
9851
|
-
return core$
|
|
9850
|
+
} (core$2));
|
|
9851
|
+
return core$2.exports;
|
|
9852
9852
|
}
|
|
9853
9853
|
|
|
9854
9854
|
var x64Core$1 = {exports: {}};
|
|
@@ -17591,7 +17591,7 @@ if ((process.env.NODE_ENV !== 'production')) {
|
|
|
17591
17591
|
}
|
|
17592
17592
|
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
|
17593
17593
|
/* eslint-disable */
|
|
17594
|
-
function format$
|
|
17594
|
+
function format$3(message, ...args) {
|
|
17595
17595
|
if (args.length === 1 && isObject$5(args[0])) {
|
|
17596
17596
|
args = args[0];
|
|
17597
17597
|
}
|
|
@@ -17886,7 +17886,7 @@ const errorMessages$2 = {
|
|
|
17886
17886
|
function createCompileError(code, loc, options = {}) {
|
|
17887
17887
|
const { domain, messages, args } = options;
|
|
17888
17888
|
const msg = (process.env.NODE_ENV !== 'production')
|
|
17889
|
-
? format$
|
|
17889
|
+
? format$3((messages || errorMessages$2)[code] || '', ...(args || []))
|
|
17890
17890
|
: code;
|
|
17891
17891
|
const error = new SyntaxError(String(msg));
|
|
17892
17892
|
error.code = code;
|
|
@@ -19420,7 +19420,7 @@ function createUnhandleNodeError(type) {
|
|
|
19420
19420
|
return new Error(`unhandled node type: ${type}`);
|
|
19421
19421
|
}
|
|
19422
19422
|
|
|
19423
|
-
function format$
|
|
19423
|
+
function format$2(ast) {
|
|
19424
19424
|
const msg = (ctx) => formatParts(ctx, ast);
|
|
19425
19425
|
return msg;
|
|
19426
19426
|
}
|
|
@@ -19503,7 +19503,7 @@ function formatMessagePart(ctx, node) {
|
|
|
19503
19503
|
const WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;
|
|
19504
19504
|
function checkHtmlMessage(source, warnHtmlMessage) {
|
|
19505
19505
|
if (warnHtmlMessage && detectHtmlTag(source)) {
|
|
19506
|
-
warn$1(format$
|
|
19506
|
+
warn$1(format$3(WARN_MESSAGE, { source }));
|
|
19507
19507
|
}
|
|
19508
19508
|
}
|
|
19509
19509
|
const defaultOnCacheKey = (message) => message;
|
|
@@ -19542,7 +19542,7 @@ function compile(message, context) {
|
|
|
19542
19542
|
jit: true
|
|
19543
19543
|
});
|
|
19544
19544
|
// compose message function from AST
|
|
19545
|
-
const msg = format$
|
|
19545
|
+
const msg = format$2(ast);
|
|
19546
19546
|
// if occurred compile error, don't cache
|
|
19547
19547
|
return !detectError
|
|
19548
19548
|
? (compileCache[cacheKey] = msg)
|
|
@@ -19562,10 +19562,10 @@ function compile(message, context) {
|
|
|
19562
19562
|
}
|
|
19563
19563
|
// compose message function from message (AST)
|
|
19564
19564
|
return (compileCache[cacheKey] =
|
|
19565
|
-
format$
|
|
19565
|
+
format$2(message));
|
|
19566
19566
|
}
|
|
19567
19567
|
else {
|
|
19568
|
-
return format$
|
|
19568
|
+
return format$2(message);
|
|
19569
19569
|
}
|
|
19570
19570
|
}
|
|
19571
19571
|
}
|
|
@@ -20061,7 +20061,7 @@ const warnMessages$1 = {
|
|
|
20061
20061
|
[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.`
|
|
20062
20062
|
};
|
|
20063
20063
|
function getWarnMessage$1(code, ...args) {
|
|
20064
|
-
return format$
|
|
20064
|
+
return format$3(warnMessages$1[code], ...args);
|
|
20065
20065
|
}
|
|
20066
20066
|
|
|
20067
20067
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -20504,7 +20504,7 @@ function clearDateTimeFormat(ctx, locale, format) {
|
|
|
20504
20504
|
}
|
|
20505
20505
|
|
|
20506
20506
|
// implementation of `number` function
|
|
20507
|
-
function number(context, ...args) {
|
|
20507
|
+
function number$1(context, ...args) {
|
|
20508
20508
|
const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
|
|
20509
20509
|
const { __numberFormatters } = context;
|
|
20510
20510
|
if ((process.env.NODE_ENV !== 'production') && !Availabilities.numberFormat) {
|
|
@@ -21484,7 +21484,7 @@ const warnMessages = {
|
|
|
21484
21484
|
[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."
|
|
21485
21485
|
};
|
|
21486
21486
|
function getWarnMessage(code, ...args) {
|
|
21487
|
-
return format$
|
|
21487
|
+
return format$3(warnMessages[code], ...args);
|
|
21488
21488
|
}
|
|
21489
21489
|
|
|
21490
21490
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -21936,7 +21936,7 @@ function createComposer(options = {}) {
|
|
|
21936
21936
|
}
|
|
21937
21937
|
// n
|
|
21938
21938
|
function n(...args) {
|
|
21939
|
-
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));
|
|
21939
|
+
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));
|
|
21940
21940
|
}
|
|
21941
21941
|
// for custom processor
|
|
21942
21942
|
function normalize(values) {
|
|
@@ -21967,7 +21967,7 @@ function createComposer(options = {}) {
|
|
|
21967
21967
|
}
|
|
21968
21968
|
// numberParts, using for `i18n-n` component
|
|
21969
21969
|
function numberParts(...args) {
|
|
21970
|
-
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));
|
|
21970
|
+
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));
|
|
21971
21971
|
}
|
|
21972
21972
|
// datetimeParts, using for `i18n-d` component
|
|
21973
21973
|
function datetimeParts(...args) {
|
|
@@ -31800,7 +31800,7 @@ function createRect() {
|
|
|
31800
31800
|
return rect;
|
|
31801
31801
|
}
|
|
31802
31802
|
var range;
|
|
31803
|
-
function getTextRect(node) {
|
|
31803
|
+
function getTextRect$1(node) {
|
|
31804
31804
|
if (!range)
|
|
31805
31805
|
range = document.createRange();
|
|
31806
31806
|
range.selectNode(node);
|
|
@@ -31820,7 +31820,7 @@ function getFragmentRect(vnode) {
|
|
|
31820
31820
|
if (el.nodeType === 1 || el.getBoundingClientRect)
|
|
31821
31821
|
childRect = el.getBoundingClientRect();
|
|
31822
31822
|
else if (el.nodeType === 3 && el.data.trim())
|
|
31823
|
-
childRect = getTextRect(el);
|
|
31823
|
+
childRect = getTextRect$1(el);
|
|
31824
31824
|
}
|
|
31825
31825
|
if (childRect)
|
|
31826
31826
|
mergeRects(rect, childRect);
|
|
@@ -42934,6 +42934,13 @@ var platformApi = {
|
|
|
42934
42934
|
return image;
|
|
42935
42935
|
}
|
|
42936
42936
|
};
|
|
42937
|
+
function setPlatformAPI(newPlatformApis) {
|
|
42938
|
+
for (var key in platformApi) {
|
|
42939
|
+
if (newPlatformApis[key]) {
|
|
42940
|
+
platformApi[key] = newPlatformApis[key];
|
|
42941
|
+
}
|
|
42942
|
+
}
|
|
42943
|
+
}
|
|
42937
42944
|
|
|
42938
42945
|
var BUILTIN_OBJECT = reduce([
|
|
42939
42946
|
'Function',
|
|
@@ -43079,6 +43086,7 @@ function defaults(target, source, overlay) {
|
|
|
43079
43086
|
}
|
|
43080
43087
|
return target;
|
|
43081
43088
|
}
|
|
43089
|
+
var createCanvas = platformApi.createCanvas;
|
|
43082
43090
|
function indexOf(array, value) {
|
|
43083
43091
|
if (array) {
|
|
43084
43092
|
if (array.indexOf) {
|
|
@@ -43473,6 +43481,62 @@ function hasOwn(own, prop) {
|
|
|
43473
43481
|
}
|
|
43474
43482
|
function noop() { }
|
|
43475
43483
|
var RADIAN_TO_DEGREE = 180 / Math.PI;
|
|
43484
|
+
var EPSILON$4 = Number.EPSILON || Math.pow(2, -52);
|
|
43485
|
+
|
|
43486
|
+
var util$1 = /*#__PURE__*/Object.freeze({
|
|
43487
|
+
__proto__: null,
|
|
43488
|
+
EPSILON: EPSILON$4,
|
|
43489
|
+
HashMap: HashMap,
|
|
43490
|
+
RADIAN_TO_DEGREE: RADIAN_TO_DEGREE,
|
|
43491
|
+
assert: assert,
|
|
43492
|
+
bind: bind$1,
|
|
43493
|
+
clone: clone$3,
|
|
43494
|
+
concatArray: concatArray,
|
|
43495
|
+
createCanvas: createCanvas,
|
|
43496
|
+
createHashMap: createHashMap,
|
|
43497
|
+
createObject: createObject,
|
|
43498
|
+
curry: curry$1,
|
|
43499
|
+
defaults: defaults,
|
|
43500
|
+
disableUserSelect: disableUserSelect,
|
|
43501
|
+
each: each$c,
|
|
43502
|
+
eqNaN: eqNaN,
|
|
43503
|
+
extend: extend,
|
|
43504
|
+
filter: filter,
|
|
43505
|
+
find: find,
|
|
43506
|
+
guid: guid,
|
|
43507
|
+
hasOwn: hasOwn,
|
|
43508
|
+
indexOf: indexOf,
|
|
43509
|
+
inherits: inherits,
|
|
43510
|
+
isArray: isArray$2,
|
|
43511
|
+
isArrayLike: isArrayLike$1,
|
|
43512
|
+
isBuiltInObject: isBuiltInObject,
|
|
43513
|
+
isDom: isDom,
|
|
43514
|
+
isFunction: isFunction$1,
|
|
43515
|
+
isGradientObject: isGradientObject,
|
|
43516
|
+
isImagePatternObject: isImagePatternObject,
|
|
43517
|
+
isNumber: isNumber,
|
|
43518
|
+
isObject: isObject$4,
|
|
43519
|
+
isPrimitive: isPrimitive,
|
|
43520
|
+
isRegExp: isRegExp,
|
|
43521
|
+
isString: isString,
|
|
43522
|
+
isStringSafe: isStringSafe,
|
|
43523
|
+
isTypedArray: isTypedArray$1,
|
|
43524
|
+
keys: keys,
|
|
43525
|
+
logError: logError,
|
|
43526
|
+
map: map$1,
|
|
43527
|
+
merge: merge$1,
|
|
43528
|
+
mergeAll: mergeAll,
|
|
43529
|
+
mixin: mixin,
|
|
43530
|
+
noop: noop,
|
|
43531
|
+
normalizeCssArray: normalizeCssArray$1,
|
|
43532
|
+
reduce: reduce,
|
|
43533
|
+
retrieve: retrieve,
|
|
43534
|
+
retrieve2: retrieve2,
|
|
43535
|
+
retrieve3: retrieve3,
|
|
43536
|
+
setAsPrimitive: setAsPrimitive,
|
|
43537
|
+
slice: slice,
|
|
43538
|
+
trim: trim$1
|
|
43539
|
+
});
|
|
43476
43540
|
|
|
43477
43541
|
function create$1(x, y) {
|
|
43478
43542
|
if (x == null) {
|
|
@@ -43514,9 +43578,24 @@ function sub(out, v1, v2) {
|
|
|
43514
43578
|
function len(v) {
|
|
43515
43579
|
return Math.sqrt(lenSquare(v));
|
|
43516
43580
|
}
|
|
43581
|
+
var length = len;
|
|
43517
43582
|
function lenSquare(v) {
|
|
43518
43583
|
return v[0] * v[0] + v[1] * v[1];
|
|
43519
43584
|
}
|
|
43585
|
+
var lengthSquare = lenSquare;
|
|
43586
|
+
function mul$1(out, v1, v2) {
|
|
43587
|
+
out[0] = v1[0] * v2[0];
|
|
43588
|
+
out[1] = v1[1] * v2[1];
|
|
43589
|
+
return out;
|
|
43590
|
+
}
|
|
43591
|
+
function div(out, v1, v2) {
|
|
43592
|
+
out[0] = v1[0] / v2[0];
|
|
43593
|
+
out[1] = v1[1] / v2[1];
|
|
43594
|
+
return out;
|
|
43595
|
+
}
|
|
43596
|
+
function dot(v1, v2) {
|
|
43597
|
+
return v1[0] * v2[0] + v1[1] * v2[1];
|
|
43598
|
+
}
|
|
43520
43599
|
function scale$2(out, v, s) {
|
|
43521
43600
|
out[0] = v[0] * s;
|
|
43522
43601
|
out[1] = v[1] * s;
|
|
@@ -43544,6 +43623,11 @@ function distanceSquare(v1, v2) {
|
|
|
43544
43623
|
+ (v1[1] - v2[1]) * (v1[1] - v2[1]);
|
|
43545
43624
|
}
|
|
43546
43625
|
var distSquare = distanceSquare;
|
|
43626
|
+
function negate(out, v) {
|
|
43627
|
+
out[0] = -v[0];
|
|
43628
|
+
out[1] = -v[1];
|
|
43629
|
+
return out;
|
|
43630
|
+
}
|
|
43547
43631
|
function lerp$1(out, v1, v2, t) {
|
|
43548
43632
|
out[0] = v1[0] + t * (v2[0] - v1[0]);
|
|
43549
43633
|
out[1] = v1[1] + t * (v2[1] - v1[1]);
|
|
@@ -43567,6 +43651,35 @@ function max$1(out, v1, v2) {
|
|
|
43567
43651
|
return out;
|
|
43568
43652
|
}
|
|
43569
43653
|
|
|
43654
|
+
var vector = /*#__PURE__*/Object.freeze({
|
|
43655
|
+
__proto__: null,
|
|
43656
|
+
add: add,
|
|
43657
|
+
applyTransform: applyTransform$1,
|
|
43658
|
+
clone: clone$2,
|
|
43659
|
+
copy: copy$1,
|
|
43660
|
+
create: create$1,
|
|
43661
|
+
dist: dist$1,
|
|
43662
|
+
distSquare: distSquare,
|
|
43663
|
+
distance: distance,
|
|
43664
|
+
distanceSquare: distanceSquare,
|
|
43665
|
+
div: div,
|
|
43666
|
+
dot: dot,
|
|
43667
|
+
len: len,
|
|
43668
|
+
lenSquare: lenSquare,
|
|
43669
|
+
length: length,
|
|
43670
|
+
lengthSquare: lengthSquare,
|
|
43671
|
+
lerp: lerp$1,
|
|
43672
|
+
max: max$1,
|
|
43673
|
+
min: min$1,
|
|
43674
|
+
mul: mul$1,
|
|
43675
|
+
negate: negate,
|
|
43676
|
+
normalize: normalize$1,
|
|
43677
|
+
scale: scale$2,
|
|
43678
|
+
scaleAndAdd: scaleAndAdd,
|
|
43679
|
+
set: set$1,
|
|
43680
|
+
sub: sub
|
|
43681
|
+
});
|
|
43682
|
+
|
|
43570
43683
|
var Param = (function () {
|
|
43571
43684
|
function Param(target, e) {
|
|
43572
43685
|
this.target = target;
|
|
@@ -44249,6 +44362,19 @@ function clone$1(a) {
|
|
|
44249
44362
|
return b;
|
|
44250
44363
|
}
|
|
44251
44364
|
|
|
44365
|
+
var matrix = /*#__PURE__*/Object.freeze({
|
|
44366
|
+
__proto__: null,
|
|
44367
|
+
clone: clone$1,
|
|
44368
|
+
copy: copy,
|
|
44369
|
+
create: create,
|
|
44370
|
+
identity: identity$1,
|
|
44371
|
+
invert: invert,
|
|
44372
|
+
mul: mul,
|
|
44373
|
+
rotate: rotate,
|
|
44374
|
+
scale: scale$1,
|
|
44375
|
+
translate: translate
|
|
44376
|
+
});
|
|
44377
|
+
|
|
44252
44378
|
var Point = (function () {
|
|
44253
44379
|
function Point(x, y) {
|
|
44254
44380
|
this.x = x || 0;
|
|
@@ -46064,6 +46190,10 @@ function cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, out) {
|
|
|
46064
46190
|
}
|
|
46065
46191
|
}
|
|
46066
46192
|
}
|
|
46193
|
+
if (out) {
|
|
46194
|
+
out[0] = cubicAt(x0, x1, x2, x3, t);
|
|
46195
|
+
out[1] = cubicAt(y0, y1, y2, y3, t);
|
|
46196
|
+
}
|
|
46067
46197
|
return mathSqrt$3(d);
|
|
46068
46198
|
}
|
|
46069
46199
|
function cubicLength(x0, y0, x1, y1, x2, y2, x3, y3, iteration) {
|
|
@@ -46187,6 +46317,10 @@ function quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, out) {
|
|
|
46187
46317
|
}
|
|
46188
46318
|
}
|
|
46189
46319
|
}
|
|
46320
|
+
if (out) {
|
|
46321
|
+
out[0] = quadraticAt$1(x0, x1, x2, t);
|
|
46322
|
+
out[1] = quadraticAt$1(y0, y1, y2, t);
|
|
46323
|
+
}
|
|
46190
46324
|
return mathSqrt$3(d);
|
|
46191
46325
|
}
|
|
46192
46326
|
function quadraticLength(x0, y0, x1, y1, x2, y2, iteration) {
|
|
@@ -46696,9 +46830,12 @@ function lift(color, level) {
|
|
|
46696
46830
|
var colorArr = parse(color);
|
|
46697
46831
|
if (colorArr) {
|
|
46698
46832
|
for (var i = 0; i < 3; i++) {
|
|
46699
|
-
{
|
|
46833
|
+
if (level < 0) {
|
|
46700
46834
|
colorArr[i] = colorArr[i] * (1 - level) | 0;
|
|
46701
46835
|
}
|
|
46836
|
+
else {
|
|
46837
|
+
colorArr[i] = ((255 - colorArr[i]) * level + colorArr[i]) | 0;
|
|
46838
|
+
}
|
|
46702
46839
|
if (colorArr[i] > 255) {
|
|
46703
46840
|
colorArr[i] = 255;
|
|
46704
46841
|
}
|
|
@@ -46709,6 +46846,12 @@ function lift(color, level) {
|
|
|
46709
46846
|
return stringify(colorArr, colorArr.length === 4 ? 'rgba' : 'rgb');
|
|
46710
46847
|
}
|
|
46711
46848
|
}
|
|
46849
|
+
function toHex(color) {
|
|
46850
|
+
var colorArr = parse(color);
|
|
46851
|
+
if (colorArr) {
|
|
46852
|
+
return ((1 << 24) + (colorArr[0] << 16) + (colorArr[1] << 8) + (+colorArr[2])).toString(16).slice(1);
|
|
46853
|
+
}
|
|
46854
|
+
}
|
|
46712
46855
|
function fastLerp(normalizedValue, colors, out) {
|
|
46713
46856
|
if (!(colors && colors.length)
|
|
46714
46857
|
|| !(normalizedValue >= 0 && normalizedValue <= 1)) {
|
|
@@ -46727,6 +46870,7 @@ function fastLerp(normalizedValue, colors, out) {
|
|
|
46727
46870
|
out[3] = clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv));
|
|
46728
46871
|
return out;
|
|
46729
46872
|
}
|
|
46873
|
+
var fastMapToColor = fastLerp;
|
|
46730
46874
|
function lerp(normalizedValue, colors, fullOutput) {
|
|
46731
46875
|
if (!(colors && colors.length)
|
|
46732
46876
|
|| !(normalizedValue >= 0 && normalizedValue <= 1)) {
|
|
@@ -46753,6 +46897,7 @@ function lerp(normalizedValue, colors, fullOutput) {
|
|
|
46753
46897
|
}
|
|
46754
46898
|
: color;
|
|
46755
46899
|
}
|
|
46900
|
+
var mapToColor = lerp;
|
|
46756
46901
|
function modifyHSL(color, h, s, l) {
|
|
46757
46902
|
var colorArr = parse(color);
|
|
46758
46903
|
if (color) {
|
|
@@ -46787,6 +46932,13 @@ function lum(color, backgroundLum) {
|
|
|
46787
46932
|
+ (1 - arr[3]) * backgroundLum
|
|
46788
46933
|
: 0;
|
|
46789
46934
|
}
|
|
46935
|
+
function random() {
|
|
46936
|
+
return stringify([
|
|
46937
|
+
Math.round(Math.random() * 255),
|
|
46938
|
+
Math.round(Math.random() * 255),
|
|
46939
|
+
Math.round(Math.random() * 255)
|
|
46940
|
+
], 'rgb');
|
|
46941
|
+
}
|
|
46790
46942
|
var liftedColorCache = new LRU(100);
|
|
46791
46943
|
function liftColor(color) {
|
|
46792
46944
|
if (isString(color)) {
|
|
@@ -46808,6 +46960,25 @@ function liftColor(color) {
|
|
|
46808
46960
|
return color;
|
|
46809
46961
|
}
|
|
46810
46962
|
|
|
46963
|
+
var color$2 = /*#__PURE__*/Object.freeze({
|
|
46964
|
+
__proto__: null,
|
|
46965
|
+
fastLerp: fastLerp,
|
|
46966
|
+
fastMapToColor: fastMapToColor,
|
|
46967
|
+
lerp: lerp,
|
|
46968
|
+
lift: lift,
|
|
46969
|
+
liftColor: liftColor,
|
|
46970
|
+
lum: lum,
|
|
46971
|
+
mapToColor: mapToColor,
|
|
46972
|
+
modifyAlpha: modifyAlpha,
|
|
46973
|
+
modifyHSL: modifyHSL,
|
|
46974
|
+
parse: parse,
|
|
46975
|
+
parseCssFloat: parseCssFloat,
|
|
46976
|
+
parseCssInt: parseCssInt,
|
|
46977
|
+
random: random,
|
|
46978
|
+
stringify: stringify,
|
|
46979
|
+
toHex: toHex
|
|
46980
|
+
});
|
|
46981
|
+
|
|
46811
46982
|
function isLinearGradient(val) {
|
|
46812
46983
|
return val.type === 'linear';
|
|
46813
46984
|
}
|
|
@@ -49983,9 +50154,45 @@ function init$1(dom, opts) {
|
|
|
49983
50154
|
instances$1[zr.id] = zr;
|
|
49984
50155
|
return zr;
|
|
49985
50156
|
}
|
|
50157
|
+
function dispose$1(zr) {
|
|
50158
|
+
zr.dispose();
|
|
50159
|
+
}
|
|
50160
|
+
function disposeAll() {
|
|
50161
|
+
for (var key in instances$1) {
|
|
50162
|
+
if (instances$1.hasOwnProperty(key)) {
|
|
50163
|
+
instances$1[key].dispose();
|
|
50164
|
+
}
|
|
50165
|
+
}
|
|
50166
|
+
instances$1 = {};
|
|
50167
|
+
}
|
|
50168
|
+
function getInstance(id) {
|
|
50169
|
+
return instances$1[id];
|
|
50170
|
+
}
|
|
49986
50171
|
function registerPainter(name, Ctor) {
|
|
49987
50172
|
painterCtors[name] = Ctor;
|
|
49988
50173
|
}
|
|
50174
|
+
var ssrDataGetter;
|
|
50175
|
+
function getElementSSRData(el) {
|
|
50176
|
+
if (typeof ssrDataGetter === 'function') {
|
|
50177
|
+
return ssrDataGetter(el);
|
|
50178
|
+
}
|
|
50179
|
+
}
|
|
50180
|
+
function registerSSRDataGetter(getter) {
|
|
50181
|
+
ssrDataGetter = getter;
|
|
50182
|
+
}
|
|
50183
|
+
var version$2 = '6.0.0';
|
|
50184
|
+
|
|
50185
|
+
var zrender = /*#__PURE__*/Object.freeze({
|
|
50186
|
+
__proto__: null,
|
|
50187
|
+
dispose: dispose$1,
|
|
50188
|
+
disposeAll: disposeAll,
|
|
50189
|
+
getElementSSRData: getElementSSRData,
|
|
50190
|
+
getInstance: getInstance,
|
|
50191
|
+
init: init$1,
|
|
50192
|
+
registerPainter: registerPainter,
|
|
50193
|
+
registerSSRDataGetter: registerSSRDataGetter,
|
|
50194
|
+
version: version$2
|
|
50195
|
+
});
|
|
49989
50196
|
|
|
49990
50197
|
var RADIAN_EPSILON = 1e-4;
|
|
49991
50198
|
// Although chrome already enlarge this number to 100 for `toFixed`, but
|
|
@@ -50160,6 +50367,24 @@ function getPixelPrecision(dataExtent, pixelExtent) {
|
|
|
50160
50367
|
var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20);
|
|
50161
50368
|
return !isFinite(precision) ? 20 : precision;
|
|
50162
50369
|
}
|
|
50370
|
+
/**
|
|
50371
|
+
* Get a data of given precision, assuring the sum of percentages
|
|
50372
|
+
* in valueList is 1.
|
|
50373
|
+
* The largest remainder method is used.
|
|
50374
|
+
* https://en.wikipedia.org/wiki/Largest_remainder_method
|
|
50375
|
+
*
|
|
50376
|
+
* @param valueList a list of all data
|
|
50377
|
+
* @param idx index of the data to be processed in valueList
|
|
50378
|
+
* @param precision integer number showing digits of precision
|
|
50379
|
+
* @return percent ranging from 0 to 100
|
|
50380
|
+
*/
|
|
50381
|
+
function getPercentWithPrecision(valueList, idx, precision) {
|
|
50382
|
+
if (!valueList[idx]) {
|
|
50383
|
+
return 0;
|
|
50384
|
+
}
|
|
50385
|
+
var seats = getPercentSeats(valueList, precision);
|
|
50386
|
+
return seats[idx] || 0;
|
|
50387
|
+
}
|
|
50163
50388
|
/**
|
|
50164
50389
|
* Get a data of given precision, assuring the sum of percentages
|
|
50165
50390
|
* in valueList is 1.
|
|
@@ -50224,6 +50449,8 @@ function addSafe(val0, val1) {
|
|
|
50224
50449
|
// // PENDING: support more?
|
|
50225
50450
|
return maxPrecision > ROUND_SUPPORTED_PRECISION_MAX ? sum : round$2(sum, maxPrecision);
|
|
50226
50451
|
}
|
|
50452
|
+
// Number.MAX_SAFE_INTEGER, ie do not support.
|
|
50453
|
+
var MAX_SAFE_INTEGER$2 = 9007199254740991;
|
|
50227
50454
|
/**
|
|
50228
50455
|
* To 0 - 2 * PI, considering negative radian.
|
|
50229
50456
|
*/
|
|
@@ -50342,7 +50569,7 @@ function nice(val, round) {
|
|
|
50342
50569
|
var exp10 = Math.pow(10, exponent);
|
|
50343
50570
|
var f = val / exp10; // 1 <= f < 10
|
|
50344
50571
|
var nf;
|
|
50345
|
-
{
|
|
50572
|
+
if (round) {
|
|
50346
50573
|
if (f < 1.5) {
|
|
50347
50574
|
nf = 1;
|
|
50348
50575
|
} else if (f < 2.5) {
|
|
@@ -50354,12 +50581,37 @@ function nice(val, round) {
|
|
|
50354
50581
|
} else {
|
|
50355
50582
|
nf = 10;
|
|
50356
50583
|
}
|
|
50584
|
+
} else {
|
|
50585
|
+
if (f < 1) {
|
|
50586
|
+
nf = 1;
|
|
50587
|
+
} else if (f < 2) {
|
|
50588
|
+
nf = 2;
|
|
50589
|
+
} else if (f < 3) {
|
|
50590
|
+
nf = 3;
|
|
50591
|
+
} else if (f < 5) {
|
|
50592
|
+
nf = 5;
|
|
50593
|
+
} else {
|
|
50594
|
+
nf = 10;
|
|
50595
|
+
}
|
|
50357
50596
|
}
|
|
50358
50597
|
val = nf * exp10;
|
|
50359
50598
|
// Fix 3 * 0.1 === 0.30000000000000004 issue (see IEEE 754).
|
|
50360
50599
|
// 20 is the uppper bound of toFixed.
|
|
50361
50600
|
return exponent >= -20 ? +val.toFixed(exponent < 0 ? -exponent : 0) : val;
|
|
50362
50601
|
}
|
|
50602
|
+
/**
|
|
50603
|
+
* This code was copied from "d3.js"
|
|
50604
|
+
* <https://github.com/d3/d3/blob/9cc9a875e636a1dcf36cc1e07bdf77e1ad6e2c74/src/arrays/quantile.js>.
|
|
50605
|
+
* See the license statement at the head of this file.
|
|
50606
|
+
* @param ascArr
|
|
50607
|
+
*/
|
|
50608
|
+
function quantile(ascArr, p) {
|
|
50609
|
+
var H = (ascArr.length - 1) * p + 1;
|
|
50610
|
+
var h = Math.floor(H);
|
|
50611
|
+
var v = +ascArr[h - 1];
|
|
50612
|
+
var e = H - h;
|
|
50613
|
+
return e ? v + e * (ascArr[h] - v) : v;
|
|
50614
|
+
}
|
|
50363
50615
|
/**
|
|
50364
50616
|
* Order intervals asc, and split them when overlap.
|
|
50365
50617
|
* expect(numberUtil.reformIntervals([
|
|
@@ -51611,6 +51863,11 @@ function isImageReady(image) {
|
|
|
51611
51863
|
}
|
|
51612
51864
|
|
|
51613
51865
|
var STYLE_REG = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
|
|
51866
|
+
function truncateText(text, containerWidth, font, ellipsis, options) {
|
|
51867
|
+
var out = {};
|
|
51868
|
+
truncateText2(out, text, containerWidth, font, ellipsis, options);
|
|
51869
|
+
return out.text;
|
|
51870
|
+
}
|
|
51614
51871
|
function truncateText2(out, text, containerWidth, font, ellipsis, options) {
|
|
51615
51872
|
if (!containerWidth) {
|
|
51616
51873
|
out.text = '';
|
|
@@ -52476,7 +52733,7 @@ var mathMin$7 = Math.min;
|
|
|
52476
52733
|
var mathMax$7 = Math.max;
|
|
52477
52734
|
var mathSin$3 = Math.sin;
|
|
52478
52735
|
var mathCos$3 = Math.cos;
|
|
52479
|
-
var PI2$
|
|
52736
|
+
var PI2$7 = Math.PI * 2;
|
|
52480
52737
|
var start = create$1();
|
|
52481
52738
|
var end = create$1();
|
|
52482
52739
|
var extremity = create$1();
|
|
@@ -52553,7 +52810,7 @@ function fromArc(x, y, rx, ry, startAngle, endAngle, anticlockwise, min, max) {
|
|
|
52553
52810
|
var vec2Min = min$1;
|
|
52554
52811
|
var vec2Max = max$1;
|
|
52555
52812
|
var diff = Math.abs(startAngle - endAngle);
|
|
52556
|
-
if (diff % PI2$
|
|
52813
|
+
if (diff % PI2$7 < 1e-4 && diff > 1e-4) {
|
|
52557
52814
|
min[0] = x - rx;
|
|
52558
52815
|
min[1] = y - ry;
|
|
52559
52816
|
max[0] = x + rx;
|
|
@@ -52566,19 +52823,19 @@ function fromArc(x, y, rx, ry, startAngle, endAngle, anticlockwise, min, max) {
|
|
|
52566
52823
|
end[1] = mathSin$3(endAngle) * ry + y;
|
|
52567
52824
|
vec2Min(min, start, end);
|
|
52568
52825
|
vec2Max(max, start, end);
|
|
52569
|
-
startAngle = startAngle % (PI2$
|
|
52826
|
+
startAngle = startAngle % (PI2$7);
|
|
52570
52827
|
if (startAngle < 0) {
|
|
52571
|
-
startAngle = startAngle + PI2$
|
|
52828
|
+
startAngle = startAngle + PI2$7;
|
|
52572
52829
|
}
|
|
52573
|
-
endAngle = endAngle % (PI2$
|
|
52830
|
+
endAngle = endAngle % (PI2$7);
|
|
52574
52831
|
if (endAngle < 0) {
|
|
52575
|
-
endAngle = endAngle + PI2$
|
|
52832
|
+
endAngle = endAngle + PI2$7;
|
|
52576
52833
|
}
|
|
52577
52834
|
if (startAngle > endAngle && !anticlockwise) {
|
|
52578
|
-
endAngle += PI2$
|
|
52835
|
+
endAngle += PI2$7;
|
|
52579
52836
|
}
|
|
52580
52837
|
else if (startAngle < endAngle && anticlockwise) {
|
|
52581
|
-
startAngle += PI2$
|
|
52838
|
+
startAngle += PI2$7;
|
|
52582
52839
|
}
|
|
52583
52840
|
if (anticlockwise) {
|
|
52584
52841
|
var tmp = endAngle;
|
|
@@ -52595,7 +52852,7 @@ function fromArc(x, y, rx, ry, startAngle, endAngle, anticlockwise, min, max) {
|
|
|
52595
52852
|
}
|
|
52596
52853
|
}
|
|
52597
52854
|
|
|
52598
|
-
var CMD$
|
|
52855
|
+
var CMD$3 = {
|
|
52599
52856
|
M: 1,
|
|
52600
52857
|
L: 2,
|
|
52601
52858
|
C: 3,
|
|
@@ -52616,7 +52873,7 @@ var mathCos$2 = Math.cos;
|
|
|
52616
52873
|
var mathSin$2 = Math.sin;
|
|
52617
52874
|
var mathAbs$3 = Math.abs;
|
|
52618
52875
|
var PI$6 = Math.PI;
|
|
52619
|
-
var PI2$
|
|
52876
|
+
var PI2$6 = PI$6 * 2;
|
|
52620
52877
|
var hasTypedArray = typeof Float32Array !== 'undefined';
|
|
52621
52878
|
var tmpAngles = [];
|
|
52622
52879
|
function modPI2(radian) {
|
|
@@ -52626,22 +52883,22 @@ function modPI2(radian) {
|
|
|
52626
52883
|
function normalizeArcAngles(angles, anticlockwise) {
|
|
52627
52884
|
var newStartAngle = modPI2(angles[0]);
|
|
52628
52885
|
if (newStartAngle < 0) {
|
|
52629
|
-
newStartAngle += PI2$
|
|
52886
|
+
newStartAngle += PI2$6;
|
|
52630
52887
|
}
|
|
52631
52888
|
var delta = newStartAngle - angles[0];
|
|
52632
52889
|
var newEndAngle = angles[1];
|
|
52633
52890
|
newEndAngle += delta;
|
|
52634
|
-
if (!anticlockwise && newEndAngle - newStartAngle >= PI2$
|
|
52635
|
-
newEndAngle = newStartAngle + PI2$
|
|
52891
|
+
if (!anticlockwise && newEndAngle - newStartAngle >= PI2$6) {
|
|
52892
|
+
newEndAngle = newStartAngle + PI2$6;
|
|
52636
52893
|
}
|
|
52637
|
-
else if (anticlockwise && newStartAngle - newEndAngle >= PI2$
|
|
52638
|
-
newEndAngle = newStartAngle - PI2$
|
|
52894
|
+
else if (anticlockwise && newStartAngle - newEndAngle >= PI2$6) {
|
|
52895
|
+
newEndAngle = newStartAngle - PI2$6;
|
|
52639
52896
|
}
|
|
52640
52897
|
else if (!anticlockwise && newStartAngle > newEndAngle) {
|
|
52641
|
-
newEndAngle = newStartAngle + (PI2$
|
|
52898
|
+
newEndAngle = newStartAngle + (PI2$6 - modPI2(newStartAngle - newEndAngle));
|
|
52642
52899
|
}
|
|
52643
52900
|
else if (anticlockwise && newStartAngle < newEndAngle) {
|
|
52644
|
-
newEndAngle = newStartAngle - (PI2$
|
|
52901
|
+
newEndAngle = newStartAngle - (PI2$6 - modPI2(newEndAngle - newStartAngle));
|
|
52645
52902
|
}
|
|
52646
52903
|
angles[0] = newStartAngle;
|
|
52647
52904
|
angles[1] = newEndAngle;
|
|
@@ -52700,7 +52957,7 @@ var PathProxy = (function () {
|
|
|
52700
52957
|
};
|
|
52701
52958
|
PathProxy.prototype.moveTo = function (x, y) {
|
|
52702
52959
|
this._drawPendingPt();
|
|
52703
|
-
this.addData(CMD$
|
|
52960
|
+
this.addData(CMD$3.M, x, y);
|
|
52704
52961
|
this._ctx && this._ctx.moveTo(x, y);
|
|
52705
52962
|
this._x0 = x;
|
|
52706
52963
|
this._y0 = y;
|
|
@@ -52712,7 +52969,7 @@ var PathProxy = (function () {
|
|
|
52712
52969
|
var dx = mathAbs$3(x - this._xi);
|
|
52713
52970
|
var dy = mathAbs$3(y - this._yi);
|
|
52714
52971
|
var exceedUnit = dx > this._ux || dy > this._uy;
|
|
52715
|
-
this.addData(CMD$
|
|
52972
|
+
this.addData(CMD$3.L, x, y);
|
|
52716
52973
|
if (this._ctx && exceedUnit) {
|
|
52717
52974
|
this._ctx.lineTo(x, y);
|
|
52718
52975
|
}
|
|
@@ -52733,7 +52990,7 @@ var PathProxy = (function () {
|
|
|
52733
52990
|
};
|
|
52734
52991
|
PathProxy.prototype.bezierCurveTo = function (x1, y1, x2, y2, x3, y3) {
|
|
52735
52992
|
this._drawPendingPt();
|
|
52736
|
-
this.addData(CMD$
|
|
52993
|
+
this.addData(CMD$3.C, x1, y1, x2, y2, x3, y3);
|
|
52737
52994
|
if (this._ctx) {
|
|
52738
52995
|
this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3);
|
|
52739
52996
|
}
|
|
@@ -52743,7 +53000,7 @@ var PathProxy = (function () {
|
|
|
52743
53000
|
};
|
|
52744
53001
|
PathProxy.prototype.quadraticCurveTo = function (x1, y1, x2, y2) {
|
|
52745
53002
|
this._drawPendingPt();
|
|
52746
|
-
this.addData(CMD$
|
|
53003
|
+
this.addData(CMD$3.Q, x1, y1, x2, y2);
|
|
52747
53004
|
if (this._ctx) {
|
|
52748
53005
|
this._ctx.quadraticCurveTo(x1, y1, x2, y2);
|
|
52749
53006
|
}
|
|
@@ -52759,7 +53016,7 @@ var PathProxy = (function () {
|
|
|
52759
53016
|
startAngle = tmpAngles[0];
|
|
52760
53017
|
endAngle = tmpAngles[1];
|
|
52761
53018
|
var delta = endAngle - startAngle;
|
|
52762
|
-
this.addData(CMD$
|
|
53019
|
+
this.addData(CMD$3.A, cx, cy, r, r, startAngle, delta, 0, anticlockwise ? 0 : 1);
|
|
52763
53020
|
this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise);
|
|
52764
53021
|
this._xi = mathCos$2(endAngle) * r + cx;
|
|
52765
53022
|
this._yi = mathSin$2(endAngle) * r + cy;
|
|
@@ -52775,12 +53032,12 @@ var PathProxy = (function () {
|
|
|
52775
53032
|
PathProxy.prototype.rect = function (x, y, w, h) {
|
|
52776
53033
|
this._drawPendingPt();
|
|
52777
53034
|
this._ctx && this._ctx.rect(x, y, w, h);
|
|
52778
|
-
this.addData(CMD$
|
|
53035
|
+
this.addData(CMD$3.R, x, y, w, h);
|
|
52779
53036
|
return this;
|
|
52780
53037
|
};
|
|
52781
53038
|
PathProxy.prototype.closePath = function () {
|
|
52782
53039
|
this._drawPendingPt();
|
|
52783
|
-
this.addData(CMD$
|
|
53040
|
+
this.addData(CMD$3.Z);
|
|
52784
53041
|
var ctx = this._ctx;
|
|
52785
53042
|
var x0 = this._x0;
|
|
52786
53043
|
var y0 = this._y0;
|
|
@@ -52905,7 +53162,7 @@ var PathProxy = (function () {
|
|
|
52905
53162
|
y0 = yi;
|
|
52906
53163
|
}
|
|
52907
53164
|
switch (cmd) {
|
|
52908
|
-
case CMD$
|
|
53165
|
+
case CMD$3.M:
|
|
52909
53166
|
xi = x0 = data[i++];
|
|
52910
53167
|
yi = y0 = data[i++];
|
|
52911
53168
|
min2[0] = x0;
|
|
@@ -52913,22 +53170,22 @@ var PathProxy = (function () {
|
|
|
52913
53170
|
max2[0] = x0;
|
|
52914
53171
|
max2[1] = y0;
|
|
52915
53172
|
break;
|
|
52916
|
-
case CMD$
|
|
53173
|
+
case CMD$3.L:
|
|
52917
53174
|
fromLine(xi, yi, data[i], data[i + 1], min2, max2);
|
|
52918
53175
|
xi = data[i++];
|
|
52919
53176
|
yi = data[i++];
|
|
52920
53177
|
break;
|
|
52921
|
-
case CMD$
|
|
53178
|
+
case CMD$3.C:
|
|
52922
53179
|
fromCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], min2, max2);
|
|
52923
53180
|
xi = data[i++];
|
|
52924
53181
|
yi = data[i++];
|
|
52925
53182
|
break;
|
|
52926
|
-
case CMD$
|
|
53183
|
+
case CMD$3.Q:
|
|
52927
53184
|
fromQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], min2, max2);
|
|
52928
53185
|
xi = data[i++];
|
|
52929
53186
|
yi = data[i++];
|
|
52930
53187
|
break;
|
|
52931
|
-
case CMD$
|
|
53188
|
+
case CMD$3.A:
|
|
52932
53189
|
var cx = data[i++];
|
|
52933
53190
|
var cy = data[i++];
|
|
52934
53191
|
var rx = data[i++];
|
|
@@ -52945,14 +53202,14 @@ var PathProxy = (function () {
|
|
|
52945
53202
|
xi = mathCos$2(endAngle) * rx + cx;
|
|
52946
53203
|
yi = mathSin$2(endAngle) * ry + cy;
|
|
52947
53204
|
break;
|
|
52948
|
-
case CMD$
|
|
53205
|
+
case CMD$3.R:
|
|
52949
53206
|
x0 = xi = data[i++];
|
|
52950
53207
|
y0 = yi = data[i++];
|
|
52951
53208
|
var width = data[i++];
|
|
52952
53209
|
var height = data[i++];
|
|
52953
53210
|
fromLine(x0, y0, x0 + width, y0 + height, min2, max2);
|
|
52954
53211
|
break;
|
|
52955
|
-
case CMD$
|
|
53212
|
+
case CMD$3.Z:
|
|
52956
53213
|
xi = x0;
|
|
52957
53214
|
yi = y0;
|
|
52958
53215
|
break;
|
|
@@ -52991,11 +53248,11 @@ var PathProxy = (function () {
|
|
|
52991
53248
|
}
|
|
52992
53249
|
var l = -1;
|
|
52993
53250
|
switch (cmd) {
|
|
52994
|
-
case CMD$
|
|
53251
|
+
case CMD$3.M:
|
|
52995
53252
|
xi = x0 = data[i++];
|
|
52996
53253
|
yi = y0 = data[i++];
|
|
52997
53254
|
break;
|
|
52998
|
-
case CMD$
|
|
53255
|
+
case CMD$3.L: {
|
|
52999
53256
|
var x2 = data[i++];
|
|
53000
53257
|
var y2 = data[i++];
|
|
53001
53258
|
var dx = x2 - xi;
|
|
@@ -53007,7 +53264,7 @@ var PathProxy = (function () {
|
|
|
53007
53264
|
}
|
|
53008
53265
|
break;
|
|
53009
53266
|
}
|
|
53010
|
-
case CMD$
|
|
53267
|
+
case CMD$3.C: {
|
|
53011
53268
|
var x1 = data[i++];
|
|
53012
53269
|
var y1 = data[i++];
|
|
53013
53270
|
var x2 = data[i++];
|
|
@@ -53019,7 +53276,7 @@ var PathProxy = (function () {
|
|
|
53019
53276
|
yi = y3;
|
|
53020
53277
|
break;
|
|
53021
53278
|
}
|
|
53022
|
-
case CMD$
|
|
53279
|
+
case CMD$3.Q: {
|
|
53023
53280
|
var x1 = data[i++];
|
|
53024
53281
|
var y1 = data[i++];
|
|
53025
53282
|
var x2 = data[i++];
|
|
@@ -53029,7 +53286,7 @@ var PathProxy = (function () {
|
|
|
53029
53286
|
yi = y2;
|
|
53030
53287
|
break;
|
|
53031
53288
|
}
|
|
53032
|
-
case CMD$
|
|
53289
|
+
case CMD$3.A:
|
|
53033
53290
|
var cx = data[i++];
|
|
53034
53291
|
var cy = data[i++];
|
|
53035
53292
|
var rx = data[i++];
|
|
@@ -53042,11 +53299,11 @@ var PathProxy = (function () {
|
|
|
53042
53299
|
x0 = mathCos$2(startAngle) * rx + cx;
|
|
53043
53300
|
y0 = mathSin$2(startAngle) * ry + cy;
|
|
53044
53301
|
}
|
|
53045
|
-
l = mathMax$6(rx, ry) * mathMin$6(PI2$
|
|
53302
|
+
l = mathMax$6(rx, ry) * mathMin$6(PI2$6, Math.abs(delta));
|
|
53046
53303
|
xi = mathCos$2(endAngle) * rx + cx;
|
|
53047
53304
|
yi = mathSin$2(endAngle) * ry + cy;
|
|
53048
53305
|
break;
|
|
53049
|
-
case CMD$
|
|
53306
|
+
case CMD$3.R: {
|
|
53050
53307
|
x0 = xi = data[i++];
|
|
53051
53308
|
y0 = yi = data[i++];
|
|
53052
53309
|
var width = data[i++];
|
|
@@ -53054,7 +53311,7 @@ var PathProxy = (function () {
|
|
|
53054
53311
|
l = width * 2 + height * 2;
|
|
53055
53312
|
break;
|
|
53056
53313
|
}
|
|
53057
|
-
case CMD$
|
|
53314
|
+
case CMD$3.Z: {
|
|
53058
53315
|
var dx = x0 - xi;
|
|
53059
53316
|
var dy = y0 - yi;
|
|
53060
53317
|
l = Math.sqrt(dx * dx + dy * dy);
|
|
@@ -53111,17 +53368,17 @@ var PathProxy = (function () {
|
|
|
53111
53368
|
x0 = xi;
|
|
53112
53369
|
y0 = yi;
|
|
53113
53370
|
}
|
|
53114
|
-
if (cmd !== CMD$
|
|
53371
|
+
if (cmd !== CMD$3.L && pendingPtDist > 0) {
|
|
53115
53372
|
ctx.lineTo(pendingPtX, pendingPtY);
|
|
53116
53373
|
pendingPtDist = 0;
|
|
53117
53374
|
}
|
|
53118
53375
|
switch (cmd) {
|
|
53119
|
-
case CMD$
|
|
53376
|
+
case CMD$3.M:
|
|
53120
53377
|
x0 = xi = d[i++];
|
|
53121
53378
|
y0 = yi = d[i++];
|
|
53122
53379
|
ctx.moveTo(xi, yi);
|
|
53123
53380
|
break;
|
|
53124
|
-
case CMD$
|
|
53381
|
+
case CMD$3.L: {
|
|
53125
53382
|
x = d[i++];
|
|
53126
53383
|
y = d[i++];
|
|
53127
53384
|
var dx = mathAbs$3(x - xi);
|
|
@@ -53151,7 +53408,7 @@ var PathProxy = (function () {
|
|
|
53151
53408
|
}
|
|
53152
53409
|
break;
|
|
53153
53410
|
}
|
|
53154
|
-
case CMD$
|
|
53411
|
+
case CMD$3.C: {
|
|
53155
53412
|
var x1 = d[i++];
|
|
53156
53413
|
var y1 = d[i++];
|
|
53157
53414
|
var x2 = d[i++];
|
|
@@ -53174,7 +53431,7 @@ var PathProxy = (function () {
|
|
|
53174
53431
|
yi = y3;
|
|
53175
53432
|
break;
|
|
53176
53433
|
}
|
|
53177
|
-
case CMD$
|
|
53434
|
+
case CMD$3.Q: {
|
|
53178
53435
|
var x1 = d[i++];
|
|
53179
53436
|
var y1 = d[i++];
|
|
53180
53437
|
var x2 = d[i++];
|
|
@@ -53195,7 +53452,7 @@ var PathProxy = (function () {
|
|
|
53195
53452
|
yi = y2;
|
|
53196
53453
|
break;
|
|
53197
53454
|
}
|
|
53198
|
-
case CMD$
|
|
53455
|
+
case CMD$3.A:
|
|
53199
53456
|
var cx = d[i++];
|
|
53200
53457
|
var cy = d[i++];
|
|
53201
53458
|
var rx = d[i++];
|
|
@@ -53232,7 +53489,7 @@ var PathProxy = (function () {
|
|
|
53232
53489
|
xi = mathCos$2(endAngle) * rx + cx;
|
|
53233
53490
|
yi = mathSin$2(endAngle) * ry + cy;
|
|
53234
53491
|
break;
|
|
53235
|
-
case CMD$
|
|
53492
|
+
case CMD$3.R:
|
|
53236
53493
|
x0 = xi = d[i];
|
|
53237
53494
|
y0 = yi = d[i + 1];
|
|
53238
53495
|
x = d[i++];
|
|
@@ -53263,7 +53520,7 @@ var PathProxy = (function () {
|
|
|
53263
53520
|
}
|
|
53264
53521
|
ctx.rect(x, y, width, height);
|
|
53265
53522
|
break;
|
|
53266
|
-
case CMD$
|
|
53523
|
+
case CMD$3.Z:
|
|
53267
53524
|
if (drawPart) {
|
|
53268
53525
|
var l = pathSegLen[segCount++];
|
|
53269
53526
|
if (accumLength + l > displayedLength) {
|
|
@@ -53290,7 +53547,7 @@ var PathProxy = (function () {
|
|
|
53290
53547
|
PathProxy.prototype.canSave = function () {
|
|
53291
53548
|
return !!this._saveData;
|
|
53292
53549
|
};
|
|
53293
|
-
PathProxy.CMD = CMD$
|
|
53550
|
+
PathProxy.CMD = CMD$3;
|
|
53294
53551
|
PathProxy.initDefaultProps = (function () {
|
|
53295
53552
|
var proto = PathProxy.prototype;
|
|
53296
53553
|
proto._saveData = true;
|
|
@@ -53338,7 +53595,7 @@ function containStroke$3(x0, y0, x1, y1, x2, y2, x3, y3, lineWidth, x, y) {
|
|
|
53338
53595
|
|| (x < x0 - _l && x < x1 - _l && x < x2 - _l && x < x3 - _l)) {
|
|
53339
53596
|
return false;
|
|
53340
53597
|
}
|
|
53341
|
-
var d = cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y);
|
|
53598
|
+
var d = cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, null);
|
|
53342
53599
|
return d <= _l / 2;
|
|
53343
53600
|
}
|
|
53344
53601
|
|
|
@@ -53353,20 +53610,20 @@ function containStroke$2(x0, y0, x1, y1, x2, y2, lineWidth, x, y) {
|
|
|
53353
53610
|
|| (x < x0 - _l && x < x1 - _l && x < x2 - _l)) {
|
|
53354
53611
|
return false;
|
|
53355
53612
|
}
|
|
53356
|
-
var d = quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y);
|
|
53613
|
+
var d = quadraticProjectPoint(x0, y0, x1, y1, x2, y2, x, y, null);
|
|
53357
53614
|
return d <= _l / 2;
|
|
53358
53615
|
}
|
|
53359
53616
|
|
|
53360
|
-
var PI2$
|
|
53617
|
+
var PI2$5 = Math.PI * 2;
|
|
53361
53618
|
function normalizeRadian(angle) {
|
|
53362
|
-
angle %= PI2$
|
|
53619
|
+
angle %= PI2$5;
|
|
53363
53620
|
if (angle < 0) {
|
|
53364
|
-
angle += PI2$
|
|
53621
|
+
angle += PI2$5;
|
|
53365
53622
|
}
|
|
53366
53623
|
return angle;
|
|
53367
53624
|
}
|
|
53368
53625
|
|
|
53369
|
-
var PI2$
|
|
53626
|
+
var PI2$4 = Math.PI * 2;
|
|
53370
53627
|
function containStroke$1(cx, cy, r, startAngle, endAngle, anticlockwise, lineWidth, x, y) {
|
|
53371
53628
|
if (lineWidth === 0) {
|
|
53372
53629
|
return false;
|
|
@@ -53378,7 +53635,7 @@ function containStroke$1(cx, cy, r, startAngle, endAngle, anticlockwise, lineWid
|
|
|
53378
53635
|
if ((d - _l > r) || (d + _l < r)) {
|
|
53379
53636
|
return false;
|
|
53380
53637
|
}
|
|
53381
|
-
if (Math.abs(startAngle - endAngle) % PI2$
|
|
53638
|
+
if (Math.abs(startAngle - endAngle) % PI2$4 < 1e-4) {
|
|
53382
53639
|
return true;
|
|
53383
53640
|
}
|
|
53384
53641
|
if (anticlockwise) {
|
|
@@ -53391,14 +53648,14 @@ function containStroke$1(cx, cy, r, startAngle, endAngle, anticlockwise, lineWid
|
|
|
53391
53648
|
endAngle = normalizeRadian(endAngle);
|
|
53392
53649
|
}
|
|
53393
53650
|
if (startAngle > endAngle) {
|
|
53394
|
-
endAngle += PI2$
|
|
53651
|
+
endAngle += PI2$4;
|
|
53395
53652
|
}
|
|
53396
53653
|
var angle = Math.atan2(y, x);
|
|
53397
53654
|
if (angle < 0) {
|
|
53398
|
-
angle += PI2$
|
|
53655
|
+
angle += PI2$4;
|
|
53399
53656
|
}
|
|
53400
53657
|
return (angle >= startAngle && angle <= endAngle)
|
|
53401
|
-
|| (angle + PI2$
|
|
53658
|
+
|| (angle + PI2$4 >= startAngle && angle + PI2$4 <= endAngle);
|
|
53402
53659
|
}
|
|
53403
53660
|
|
|
53404
53661
|
function windingLine(x0, y0, x1, y1, x, y) {
|
|
@@ -53417,8 +53674,8 @@ function windingLine(x0, y0, x1, y1, x, y) {
|
|
|
53417
53674
|
return x_ === x ? Infinity : x_ > x ? dir : 0;
|
|
53418
53675
|
}
|
|
53419
53676
|
|
|
53420
|
-
var CMD$
|
|
53421
|
-
var PI2$
|
|
53677
|
+
var CMD$2 = PathProxy.CMD;
|
|
53678
|
+
var PI2$3 = Math.PI * 2;
|
|
53422
53679
|
var EPSILON$1 = 1e-4;
|
|
53423
53680
|
function isAroundEqual$1(a, b) {
|
|
53424
53681
|
return Math.abs(a - b) < EPSILON$1;
|
|
@@ -53535,9 +53792,9 @@ function windingArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y) {
|
|
|
53535
53792
|
if (dTheta < 1e-4) {
|
|
53536
53793
|
return 0;
|
|
53537
53794
|
}
|
|
53538
|
-
if (dTheta >= PI2$
|
|
53795
|
+
if (dTheta >= PI2$3 - 1e-4) {
|
|
53539
53796
|
startAngle = 0;
|
|
53540
|
-
endAngle = PI2$
|
|
53797
|
+
endAngle = PI2$3;
|
|
53541
53798
|
var dir = anticlockwise ? 1 : -1;
|
|
53542
53799
|
if (x >= roots[0] + cx && x <= roots[1] + cx) {
|
|
53543
53800
|
return dir;
|
|
@@ -53552,8 +53809,8 @@ function windingArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y) {
|
|
|
53552
53809
|
endAngle = tmp_1;
|
|
53553
53810
|
}
|
|
53554
53811
|
if (startAngle < 0) {
|
|
53555
|
-
startAngle += PI2$
|
|
53556
|
-
endAngle += PI2$
|
|
53812
|
+
startAngle += PI2$3;
|
|
53813
|
+
endAngle += PI2$3;
|
|
53557
53814
|
}
|
|
53558
53815
|
var w = 0;
|
|
53559
53816
|
for (var i = 0; i < 2; i++) {
|
|
@@ -53562,10 +53819,10 @@ function windingArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y) {
|
|
|
53562
53819
|
var angle = Math.atan2(y, x_);
|
|
53563
53820
|
var dir = anticlockwise ? 1 : -1;
|
|
53564
53821
|
if (angle < 0) {
|
|
53565
|
-
angle = PI2$
|
|
53822
|
+
angle = PI2$3 + angle;
|
|
53566
53823
|
}
|
|
53567
53824
|
if ((angle >= startAngle && angle <= endAngle)
|
|
53568
|
-
|| (angle + PI2$
|
|
53825
|
+
|| (angle + PI2$3 >= startAngle && angle + PI2$3 <= endAngle)) {
|
|
53569
53826
|
if (angle > Math.PI / 2 && angle < Math.PI * 1.5) {
|
|
53570
53827
|
dir = -dir;
|
|
53571
53828
|
}
|
|
@@ -53588,7 +53845,7 @@ function containPath(path, lineWidth, isStroke, x, y) {
|
|
|
53588
53845
|
for (var i = 0; i < len;) {
|
|
53589
53846
|
var cmd = data[i++];
|
|
53590
53847
|
var isFirst = i === 1;
|
|
53591
|
-
if (cmd === CMD$
|
|
53848
|
+
if (cmd === CMD$2.M && i > 1) {
|
|
53592
53849
|
if (!isStroke) {
|
|
53593
53850
|
w += windingLine(xi, yi, x0, y0, x, y);
|
|
53594
53851
|
}
|
|
@@ -53600,13 +53857,13 @@ function containPath(path, lineWidth, isStroke, x, y) {
|
|
|
53600
53857
|
y0 = yi;
|
|
53601
53858
|
}
|
|
53602
53859
|
switch (cmd) {
|
|
53603
|
-
case CMD$
|
|
53860
|
+
case CMD$2.M:
|
|
53604
53861
|
x0 = data[i++];
|
|
53605
53862
|
y0 = data[i++];
|
|
53606
53863
|
xi = x0;
|
|
53607
53864
|
yi = y0;
|
|
53608
53865
|
break;
|
|
53609
|
-
case CMD$
|
|
53866
|
+
case CMD$2.L:
|
|
53610
53867
|
if (isStroke) {
|
|
53611
53868
|
if (containStroke$4(xi, yi, data[i], data[i + 1], lineWidth, x, y)) {
|
|
53612
53869
|
return true;
|
|
@@ -53618,7 +53875,7 @@ function containPath(path, lineWidth, isStroke, x, y) {
|
|
|
53618
53875
|
xi = data[i++];
|
|
53619
53876
|
yi = data[i++];
|
|
53620
53877
|
break;
|
|
53621
|
-
case CMD$
|
|
53878
|
+
case CMD$2.C:
|
|
53622
53879
|
if (isStroke) {
|
|
53623
53880
|
if (containStroke$3(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) {
|
|
53624
53881
|
return true;
|
|
@@ -53630,7 +53887,7 @@ function containPath(path, lineWidth, isStroke, x, y) {
|
|
|
53630
53887
|
xi = data[i++];
|
|
53631
53888
|
yi = data[i++];
|
|
53632
53889
|
break;
|
|
53633
|
-
case CMD$
|
|
53890
|
+
case CMD$2.Q:
|
|
53634
53891
|
if (isStroke) {
|
|
53635
53892
|
if (containStroke$2(xi, yi, data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) {
|
|
53636
53893
|
return true;
|
|
@@ -53642,7 +53899,7 @@ function containPath(path, lineWidth, isStroke, x, y) {
|
|
|
53642
53899
|
xi = data[i++];
|
|
53643
53900
|
yi = data[i++];
|
|
53644
53901
|
break;
|
|
53645
|
-
case CMD$
|
|
53902
|
+
case CMD$2.A:
|
|
53646
53903
|
var cx = data[i++];
|
|
53647
53904
|
var cy = data[i++];
|
|
53648
53905
|
var rx = data[i++];
|
|
@@ -53672,7 +53929,7 @@ function containPath(path, lineWidth, isStroke, x, y) {
|
|
|
53672
53929
|
xi = Math.cos(theta + dTheta) * rx + cx;
|
|
53673
53930
|
yi = Math.sin(theta + dTheta) * ry + cy;
|
|
53674
53931
|
break;
|
|
53675
|
-
case CMD$
|
|
53932
|
+
case CMD$2.R:
|
|
53676
53933
|
x0 = xi = data[i++];
|
|
53677
53934
|
y0 = yi = data[i++];
|
|
53678
53935
|
var width = data[i++];
|
|
@@ -53692,7 +53949,7 @@ function containPath(path, lineWidth, isStroke, x, y) {
|
|
|
53692
53949
|
w += windingLine(x0, y1, x0, y0, x, y);
|
|
53693
53950
|
}
|
|
53694
53951
|
break;
|
|
53695
|
-
case CMD$
|
|
53952
|
+
case CMD$2.Z:
|
|
53696
53953
|
if (isStroke) {
|
|
53697
53954
|
if (containStroke$4(xi, yi, x0, y0, lineWidth, x, y)) {
|
|
53698
53955
|
return true;
|
|
@@ -55611,7 +55868,7 @@ function savePathStates(el) {
|
|
|
55611
55868
|
store.selectStroke = selectState.style && selectState.style.stroke || null;
|
|
55612
55869
|
}
|
|
55613
55870
|
|
|
55614
|
-
var CMD = PathProxy.CMD;
|
|
55871
|
+
var CMD$1 = PathProxy.CMD;
|
|
55615
55872
|
var points$2 = [[], [], []];
|
|
55616
55873
|
var mathSqrt$2 = Math.sqrt;
|
|
55617
55874
|
var mathAtan2 = Math.atan2;
|
|
@@ -55627,12 +55884,12 @@ function transformPath(path, m) {
|
|
|
55627
55884
|
var j;
|
|
55628
55885
|
var k;
|
|
55629
55886
|
var p;
|
|
55630
|
-
var M = CMD.M;
|
|
55631
|
-
var C = CMD.C;
|
|
55632
|
-
var L = CMD.L;
|
|
55633
|
-
var R = CMD.R;
|
|
55634
|
-
var A = CMD.A;
|
|
55635
|
-
var Q = CMD.Q;
|
|
55887
|
+
var M = CMD$1.M;
|
|
55888
|
+
var C = CMD$1.C;
|
|
55889
|
+
var L = CMD$1.L;
|
|
55890
|
+
var R = CMD$1.R;
|
|
55891
|
+
var A = CMD$1.A;
|
|
55892
|
+
var Q = CMD$1.Q;
|
|
55636
55893
|
for (i = 0, j = 0; i < len;) {
|
|
55637
55894
|
cmd = data[i++];
|
|
55638
55895
|
j = i;
|
|
@@ -56095,7 +56352,7 @@ var Ellipse = (function (_super) {
|
|
|
56095
56352
|
Ellipse.prototype.type = 'ellipse';
|
|
56096
56353
|
|
|
56097
56354
|
var PI$4 = Math.PI;
|
|
56098
|
-
var PI2$
|
|
56355
|
+
var PI2$2 = PI$4 * 2;
|
|
56099
56356
|
var mathSin = Math.sin;
|
|
56100
56357
|
var mathCos = Math.cos;
|
|
56101
56358
|
var mathACos = Math.acos;
|
|
@@ -56206,12 +56463,12 @@ function buildPath$1(ctx, shape) {
|
|
|
56206
56463
|
var cx = shape.cx, cy = shape.cy;
|
|
56207
56464
|
var clockwise = !!shape.clockwise;
|
|
56208
56465
|
var arc = mathAbs$2(endAngle - startAngle);
|
|
56209
|
-
var mod = arc > PI2$
|
|
56466
|
+
var mod = arc > PI2$2 && arc % PI2$2;
|
|
56210
56467
|
mod > e && (arc = mod);
|
|
56211
56468
|
if (!(radius > e)) {
|
|
56212
56469
|
ctx.moveTo(cx, cy);
|
|
56213
56470
|
}
|
|
56214
|
-
else if (arc > PI2$
|
|
56471
|
+
else if (arc > PI2$2 - e) {
|
|
56215
56472
|
ctx.moveTo(cx + radius * mathCos(startAngle), cy + radius * mathSin(startAngle));
|
|
56216
56473
|
ctx.arc(cx, cy, radius, startAngle, endAngle, !clockwise);
|
|
56217
56474
|
if (innerRadius > e) {
|
|
@@ -58019,7 +58276,7 @@ function setLabelStyle(targetEl, labelStatesModels, opt, stateSpecified
|
|
|
58019
58276
|
var labelStatesTexts = getLabelText(opt, labelStatesModels);
|
|
58020
58277
|
var normalModel = labelStatesModels.normal;
|
|
58021
58278
|
var showNormal = !!normalModel.getShallow('show');
|
|
58022
|
-
var normalStyle = createTextStyle(normalModel, stateSpecified && stateSpecified.normal, opt, false, !isSetOnText);
|
|
58279
|
+
var normalStyle = createTextStyle$1(normalModel, stateSpecified && stateSpecified.normal, opt, false, !isSetOnText);
|
|
58023
58280
|
normalStyle.text = labelStatesTexts.normal;
|
|
58024
58281
|
if (!isSetOnText) {
|
|
58025
58282
|
// Always create new
|
|
@@ -58034,7 +58291,7 @@ function setLabelStyle(targetEl, labelStatesModels, opt, stateSpecified
|
|
|
58034
58291
|
if (stateShow !== showNormal) {
|
|
58035
58292
|
stateObj.ignore = !stateShow;
|
|
58036
58293
|
}
|
|
58037
|
-
stateObj.style = createTextStyle(stateModel, stateSpecified && stateSpecified[stateName], opt, true, !isSetOnText);
|
|
58294
|
+
stateObj.style = createTextStyle$1(stateModel, stateSpecified && stateSpecified[stateName], opt, true, !isSetOnText);
|
|
58038
58295
|
stateObj.style.text = labelStatesTexts[stateName];
|
|
58039
58296
|
if (!isSetOnText) {
|
|
58040
58297
|
var targetElEmphasisState = targetEl.ensureState(stateName);
|
|
@@ -58083,7 +58340,7 @@ function getLabelStatesModels(itemModel, labelName) {
|
|
|
58083
58340
|
/**
|
|
58084
58341
|
* Set basic textStyle properties.
|
|
58085
58342
|
*/
|
|
58086
|
-
function createTextStyle(textStyleModel, specifiedTextStyle,
|
|
58343
|
+
function createTextStyle$1(textStyleModel, specifiedTextStyle,
|
|
58087
58344
|
// Fixed style in the code. Can't be set by model.
|
|
58088
58345
|
opt, isNotNormal, isAttached // If text is attached on an element. If so, auto color will handling in zrender.
|
|
58089
58346
|
) {
|
|
@@ -59301,7 +59558,7 @@ function getDefaultFormatPrecisionOfInterval(timeUnit) {
|
|
|
59301
59558
|
return 'second';
|
|
59302
59559
|
}
|
|
59303
59560
|
}
|
|
59304
|
-
function format(
|
|
59561
|
+
function format$1(
|
|
59305
59562
|
// Note: The result based on `isUTC` are totally different, which can not be just simply
|
|
59306
59563
|
// substituted by the result without `isUTC`. So we make the param `isUTC` mandatory.
|
|
59307
59564
|
time, template, isUTC, lang) {
|
|
@@ -59352,7 +59609,7 @@ function leveledFormat(tick, idx, formatter, lang, isUTC) {
|
|
|
59352
59609
|
template = formatter[unit][unit][0];
|
|
59353
59610
|
}
|
|
59354
59611
|
}
|
|
59355
|
-
return format(new Date(tick.value), template, isUTC, lang);
|
|
59612
|
+
return format$1(new Date(tick.value), template, isUTC, lang);
|
|
59356
59613
|
}
|
|
59357
59614
|
function getUnitFromValue(value, isUTC) {
|
|
59358
59615
|
var date = parseDate(value);
|
|
@@ -59483,6 +59740,22 @@ function millisecondsSetterName(isUTC) {
|
|
|
59483
59740
|
return isUTC ? 'setUTCMilliseconds' : 'setMilliseconds';
|
|
59484
59741
|
}
|
|
59485
59742
|
|
|
59743
|
+
function getTextRect(text, font, align, verticalAlign, padding, rich, truncate, lineHeight) {
|
|
59744
|
+
var textEl = new ZRText({
|
|
59745
|
+
style: {
|
|
59746
|
+
text: text,
|
|
59747
|
+
font: font,
|
|
59748
|
+
align: align,
|
|
59749
|
+
verticalAlign: verticalAlign,
|
|
59750
|
+
padding: padding,
|
|
59751
|
+
rich: rich,
|
|
59752
|
+
overflow: truncate ? 'truncate' : null,
|
|
59753
|
+
lineHeight: lineHeight
|
|
59754
|
+
}
|
|
59755
|
+
});
|
|
59756
|
+
return textEl.getBoundingRect();
|
|
59757
|
+
}
|
|
59758
|
+
|
|
59486
59759
|
/**
|
|
59487
59760
|
* Add a comma each three digit.
|
|
59488
59761
|
*/
|
|
@@ -59523,7 +59796,7 @@ function makeValueReadable(value, valueType, useUTC) {
|
|
|
59523
59796
|
if (isTypeTime || isValueDate) {
|
|
59524
59797
|
var date = isTypeTime ? parseDate(value) : value;
|
|
59525
59798
|
if (!isNaN(+date)) {
|
|
59526
|
-
return format(date, USER_READABLE_DEFUALT_TIME_PATTERN, useUTC);
|
|
59799
|
+
return format$1(date, USER_READABLE_DEFUALT_TIME_PATTERN, useUTC);
|
|
59527
59800
|
} else if (isValueDate) {
|
|
59528
59801
|
return '-';
|
|
59529
59802
|
}
|
|
@@ -59613,6 +59886,43 @@ function getTooltipMarker(inOpt, extraCssText) {
|
|
|
59613
59886
|
};
|
|
59614
59887
|
}
|
|
59615
59888
|
}
|
|
59889
|
+
/**
|
|
59890
|
+
* @deprecated Use `time/format` instead.
|
|
59891
|
+
* ISO Date format
|
|
59892
|
+
* @param {string} tpl
|
|
59893
|
+
* @param {number} value
|
|
59894
|
+
* @param {boolean} [isUTC=false] Default in local time.
|
|
59895
|
+
* see `module:echarts/scale/Time`
|
|
59896
|
+
* and `module:echarts/util/number#parseDate`.
|
|
59897
|
+
* @inner
|
|
59898
|
+
*/
|
|
59899
|
+
function formatTime(tpl, value, isUTC) {
|
|
59900
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
59901
|
+
deprecateReplaceLog('echarts.format.formatTime', 'echarts.time.format');
|
|
59902
|
+
}
|
|
59903
|
+
if (tpl === 'week' || tpl === 'month' || tpl === 'quarter' || tpl === 'half-year' || tpl === 'year') {
|
|
59904
|
+
tpl = 'MM-dd\nyyyy';
|
|
59905
|
+
}
|
|
59906
|
+
var date = parseDate(value);
|
|
59907
|
+
var getUTC = isUTC ? 'getUTC' : 'get';
|
|
59908
|
+
var y = date[getUTC + 'FullYear']();
|
|
59909
|
+
var M = date[getUTC + 'Month']() + 1;
|
|
59910
|
+
var d = date[getUTC + 'Date']();
|
|
59911
|
+
var h = date[getUTC + 'Hours']();
|
|
59912
|
+
var m = date[getUTC + 'Minutes']();
|
|
59913
|
+
var s = date[getUTC + 'Seconds']();
|
|
59914
|
+
var S = date[getUTC + 'Milliseconds']();
|
|
59915
|
+
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));
|
|
59916
|
+
return tpl;
|
|
59917
|
+
}
|
|
59918
|
+
/**
|
|
59919
|
+
* Capital first
|
|
59920
|
+
* @param {string} str
|
|
59921
|
+
* @return {string}
|
|
59922
|
+
*/
|
|
59923
|
+
function capitalFirst(str) {
|
|
59924
|
+
return str ? str.charAt(0).toUpperCase() + str.substr(1) : str;
|
|
59925
|
+
}
|
|
59616
59926
|
/**
|
|
59617
59927
|
* @return Never be null/undefined.
|
|
59618
59928
|
*/
|
|
@@ -62731,7 +63041,7 @@ function globalBackwardCompat(option, isTheme) {
|
|
|
62731
63041
|
// See <module:echarts/stream/Scheduler#performDataProcessorTasks>
|
|
62732
63042
|
// (2) Only register once when import repeatedly.
|
|
62733
63043
|
// Should be executed after series is filtered and before stack calculation.
|
|
62734
|
-
function dataStack(ecModel) {
|
|
63044
|
+
function dataStack$1(ecModel) {
|
|
62735
63045
|
var stackInfoMap = createHashMap();
|
|
62736
63046
|
ecModel.eachSeries(function (seriesModel) {
|
|
62737
63047
|
var stack = seriesModel.get('stack');
|
|
@@ -69770,13 +70080,17 @@ function getImpl(name) {
|
|
|
69770
70080
|
* under the License.
|
|
69771
70081
|
*/
|
|
69772
70082
|
var customRenderers = {};
|
|
69773
|
-
function registerCustomSeries(type, renderItem) {
|
|
70083
|
+
function registerCustomSeries$1(type, renderItem) {
|
|
69774
70084
|
customRenderers[type] = renderItem;
|
|
69775
70085
|
}
|
|
69776
70086
|
function getCustomSeries(type) {
|
|
69777
70087
|
return customRenderers[type];
|
|
69778
70088
|
}
|
|
69779
70089
|
|
|
70090
|
+
var version$1 = '6.0.0';
|
|
70091
|
+
var dependencies = {
|
|
70092
|
+
zrender: '6.0.0'
|
|
70093
|
+
};
|
|
69780
70094
|
var TEST_FRAME_REMAIN_TIME = 1;
|
|
69781
70095
|
var PRIORITY_PROCESSOR_SERIES_FILTER = 800;
|
|
69782
70096
|
// Some data processors depends on the stack result dimension (to calculate data extent).
|
|
@@ -69925,7 +70239,20 @@ var ECharts = /** @class */function (_super) {
|
|
|
69925
70239
|
defaultUseDirtyRect = retrieve2(root.__ECHARTS__DEFAULT__USE_DIRTY_RECT__, defaultUseDirtyRect);
|
|
69926
70240
|
}
|
|
69927
70241
|
}
|
|
69928
|
-
if (opts.ssr)
|
|
70242
|
+
if (opts.ssr) {
|
|
70243
|
+
registerSSRDataGetter(function (el) {
|
|
70244
|
+
var ecData = getECData(el);
|
|
70245
|
+
var dataIndex = ecData.dataIndex;
|
|
70246
|
+
if (dataIndex == null) {
|
|
70247
|
+
return;
|
|
70248
|
+
}
|
|
70249
|
+
var hashMap = createHashMap();
|
|
70250
|
+
hashMap.set('series_index', ecData.seriesIndex);
|
|
70251
|
+
hashMap.set('data_index', dataIndex);
|
|
70252
|
+
ecData.ssrType && hashMap.set('ssr_type', ecData.ssrType);
|
|
70253
|
+
return hashMap;
|
|
70254
|
+
});
|
|
70255
|
+
}
|
|
69929
70256
|
var zr = _this._zr = init$1(dom, {
|
|
69930
70257
|
renderer: opts.renderer || defaultRenderer,
|
|
69931
70258
|
devicePixelRatio: opts.devicePixelRatio,
|
|
@@ -71679,6 +72006,7 @@ var loadingEffects = {};
|
|
|
71679
72006
|
var instances = {};
|
|
71680
72007
|
var connectedGroups = {};
|
|
71681
72008
|
var idBase = +new Date() - 0;
|
|
72009
|
+
var groupIdBase = +new Date() - 0;
|
|
71682
72010
|
var DOM_ATTRIBUTE_KEY = '_echarts_instance_';
|
|
71683
72011
|
/**
|
|
71684
72012
|
* @param opts.devicePixelRatio Use window.devicePixelRatio by default
|
|
@@ -71691,7 +72019,8 @@ var DOM_ATTRIBUTE_KEY = '_echarts_instance_';
|
|
|
71691
72019
|
* @param opts.useDirtyRect Enable dirty rectangle rendering or not.
|
|
71692
72020
|
*/
|
|
71693
72021
|
function init(dom, theme, opts) {
|
|
71694
|
-
|
|
72022
|
+
var isClient = !(opts && opts.ssr);
|
|
72023
|
+
if (isClient) {
|
|
71695
72024
|
if (process.env.NODE_ENV !== 'production') {
|
|
71696
72025
|
if (!dom) {
|
|
71697
72026
|
throw new Error('Initialize failed: invalid dom.');
|
|
@@ -71705,7 +72034,7 @@ function init(dom, theme, opts) {
|
|
|
71705
72034
|
return existInstance;
|
|
71706
72035
|
}
|
|
71707
72036
|
if (process.env.NODE_ENV !== 'production') {
|
|
71708
|
-
if (isDom(dom) && dom.nodeName.toUpperCase() !== 'CANVAS' && (!dom.clientWidth && (!opts) || !dom.clientHeight && (!opts))) {
|
|
72037
|
+
if (isDom(dom) && dom.nodeName.toUpperCase() !== 'CANVAS' && (!dom.clientWidth && (!opts || opts.width == null) || !dom.clientHeight && (!opts || opts.height == null))) {
|
|
71709
72038
|
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.');
|
|
71710
72039
|
}
|
|
71711
72040
|
}
|
|
@@ -71713,14 +72042,75 @@ function init(dom, theme, opts) {
|
|
|
71713
72042
|
var chart = new ECharts(dom, theme, opts);
|
|
71714
72043
|
chart.id = 'ec_' + idBase++;
|
|
71715
72044
|
instances[chart.id] = chart;
|
|
71716
|
-
setAttribute(dom, DOM_ATTRIBUTE_KEY, chart.id);
|
|
72045
|
+
isClient && setAttribute(dom, DOM_ATTRIBUTE_KEY, chart.id);
|
|
71717
72046
|
enableConnect(chart);
|
|
71718
72047
|
lifecycle.trigger('afterinit', chart);
|
|
71719
72048
|
return chart;
|
|
71720
72049
|
}
|
|
72050
|
+
/**
|
|
72051
|
+
* @usage
|
|
72052
|
+
* (A)
|
|
72053
|
+
* ```js
|
|
72054
|
+
* let chart1 = echarts.init(dom1);
|
|
72055
|
+
* let chart2 = echarts.init(dom2);
|
|
72056
|
+
* chart1.group = 'xxx';
|
|
72057
|
+
* chart2.group = 'xxx';
|
|
72058
|
+
* echarts.connect('xxx');
|
|
72059
|
+
* ```
|
|
72060
|
+
* (B)
|
|
72061
|
+
* ```js
|
|
72062
|
+
* let chart1 = echarts.init(dom1);
|
|
72063
|
+
* let chart2 = echarts.init(dom2);
|
|
72064
|
+
* echarts.connect('xxx', [chart1, chart2]);
|
|
72065
|
+
* ```
|
|
72066
|
+
*/
|
|
72067
|
+
function connect(groupId) {
|
|
72068
|
+
// Is array of charts
|
|
72069
|
+
if (isArray$2(groupId)) {
|
|
72070
|
+
var charts = groupId;
|
|
72071
|
+
groupId = null;
|
|
72072
|
+
// If any chart has group
|
|
72073
|
+
each$c(charts, function (chart) {
|
|
72074
|
+
if (chart.group != null) {
|
|
72075
|
+
groupId = chart.group;
|
|
72076
|
+
}
|
|
72077
|
+
});
|
|
72078
|
+
groupId = groupId || 'g_' + groupIdBase++;
|
|
72079
|
+
each$c(charts, function (chart) {
|
|
72080
|
+
chart.group = groupId;
|
|
72081
|
+
});
|
|
72082
|
+
}
|
|
72083
|
+
connectedGroups[groupId] = true;
|
|
72084
|
+
return groupId;
|
|
72085
|
+
}
|
|
72086
|
+
function disconnect(groupId) {
|
|
72087
|
+
connectedGroups[groupId] = false;
|
|
72088
|
+
}
|
|
72089
|
+
/**
|
|
72090
|
+
* Alias and backward compatibility
|
|
72091
|
+
* @deprecated
|
|
72092
|
+
*/
|
|
72093
|
+
var disConnect = disconnect;
|
|
72094
|
+
/**
|
|
72095
|
+
* Dispose a chart instance
|
|
72096
|
+
*/
|
|
72097
|
+
function dispose(chart) {
|
|
72098
|
+
if (isString(chart)) {
|
|
72099
|
+
chart = instances[chart];
|
|
72100
|
+
} else if (!(chart instanceof ECharts)) {
|
|
72101
|
+
// Try to treat as dom
|
|
72102
|
+
chart = getInstanceByDom(chart);
|
|
72103
|
+
}
|
|
72104
|
+
if (chart instanceof ECharts && !chart.isDisposed()) {
|
|
72105
|
+
chart.dispose();
|
|
72106
|
+
}
|
|
72107
|
+
}
|
|
71721
72108
|
function getInstanceByDom(dom) {
|
|
71722
72109
|
return instances[getAttribute(dom, DOM_ATTRIBUTE_KEY)];
|
|
71723
72110
|
}
|
|
72111
|
+
function getInstanceById(key) {
|
|
72112
|
+
return instances[key];
|
|
72113
|
+
}
|
|
71724
72114
|
/**
|
|
71725
72115
|
* Register theme
|
|
71726
72116
|
*/
|
|
@@ -71816,6 +72206,20 @@ function registerAction(arg0, arg1, action) {
|
|
|
71816
72206
|
function registerCoordinateSystem(type, coordSysCreator) {
|
|
71817
72207
|
CoordinateSystemManager.register(type, coordSysCreator);
|
|
71818
72208
|
}
|
|
72209
|
+
/**
|
|
72210
|
+
* Get dimensions of specified coordinate system.
|
|
72211
|
+
* @param {string} type
|
|
72212
|
+
* @return {Array.<string|Object>}
|
|
72213
|
+
*/
|
|
72214
|
+
function getCoordinateSystemDimensions(type) {
|
|
72215
|
+
var coordSysCreator = CoordinateSystemManager.get(type);
|
|
72216
|
+
if (coordSysCreator) {
|
|
72217
|
+
return coordSysCreator.getDimensionsInfo ? coordSysCreator.getDimensionsInfo() : coordSysCreator.dimensions.slice();
|
|
72218
|
+
}
|
|
72219
|
+
}
|
|
72220
|
+
function registerCustomSeries(seriesType, renderItem) {
|
|
72221
|
+
registerCustomSeries$1(seriesType, renderItem);
|
|
72222
|
+
}
|
|
71819
72223
|
function registerLayout(priority, layoutTask) {
|
|
71820
72224
|
normalizeRegister(visualFuncs, priority, layoutTask, PRIORITY_VISUAL_LAYOUT, 'layout');
|
|
71821
72225
|
}
|
|
@@ -71850,6 +72254,30 @@ function normalizeRegister(targetList, priority, fn, defaultPriority, visualType
|
|
|
71850
72254
|
function registerLoading(name, loadingFx) {
|
|
71851
72255
|
loadingEffects[name] = loadingFx;
|
|
71852
72256
|
}
|
|
72257
|
+
/**
|
|
72258
|
+
* ZRender need a canvas context to do measureText.
|
|
72259
|
+
* But in node environment canvas may be created by node-canvas.
|
|
72260
|
+
* So we need to specify how to create a canvas instead of using document.createElement('canvas')
|
|
72261
|
+
*
|
|
72262
|
+
*
|
|
72263
|
+
* @deprecated use setPlatformAPI({ createCanvas }) instead.
|
|
72264
|
+
*
|
|
72265
|
+
* @example
|
|
72266
|
+
* let Canvas = require('canvas');
|
|
72267
|
+
* let echarts = require('echarts');
|
|
72268
|
+
* echarts.setCanvasCreator(function () {
|
|
72269
|
+
* // Small size is enough.
|
|
72270
|
+
* return new Canvas(32, 32);
|
|
72271
|
+
* });
|
|
72272
|
+
*/
|
|
72273
|
+
function setCanvasCreator(creator) {
|
|
72274
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
72275
|
+
deprecateLog('setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead.');
|
|
72276
|
+
}
|
|
72277
|
+
setPlatformAPI({
|
|
72278
|
+
createCanvas: creator
|
|
72279
|
+
});
|
|
72280
|
+
}
|
|
71853
72281
|
/**
|
|
71854
72282
|
* The parameters and usage: see `geoSourceManager.registerMap`.
|
|
71855
72283
|
* Compatible with previous `echarts.registerMap`.
|
|
@@ -71858,6 +72286,10 @@ function registerMap$1(mapName, geoJson, specialAreas) {
|
|
|
71858
72286
|
var registerMap = getImpl('registerMap');
|
|
71859
72287
|
registerMap && registerMap(mapName, geoJson, specialAreas);
|
|
71860
72288
|
}
|
|
72289
|
+
function getMap(mapName) {
|
|
72290
|
+
var getMap = getImpl('getMap');
|
|
72291
|
+
return getMap && getMap(mapName);
|
|
72292
|
+
}
|
|
71861
72293
|
var registerTransform = registerExternalTransform;
|
|
71862
72294
|
/**
|
|
71863
72295
|
* Globa dispatchAction to a specified chart instance.
|
|
@@ -71880,7 +72312,7 @@ registerVisual(PRIORITY_VISUAL_GLOBAL, seriesSymbolTask);
|
|
|
71880
72312
|
registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM, dataSymbolTask);
|
|
71881
72313
|
registerVisual(PRIORITY_VISUAL_DECAL, decalVisual);
|
|
71882
72314
|
registerPreprocessor(globalBackwardCompat);
|
|
71883
|
-
registerProcessor(PRIORITY_PROCESSOR_DATASTACK, dataStack);
|
|
72315
|
+
registerProcessor(PRIORITY_PROCESSOR_DATASTACK, dataStack$1);
|
|
71884
72316
|
registerLoading('default', defaultLoading);
|
|
71885
72317
|
// Default actions
|
|
71886
72318
|
registerAction({
|
|
@@ -71929,6 +72361,9 @@ function makeSelectChangedEvent(actionResultBatch, payload, ecModel, api) {
|
|
|
71929
72361
|
// the default theme after changing to other themes.
|
|
71930
72362
|
registerTheme('default', {});
|
|
71931
72363
|
registerTheme('dark', theme);
|
|
72364
|
+
// For backward compatibility, where the namespace `dataTool` will
|
|
72365
|
+
// be mounted on `echarts` is the extension `dataTool` is imported.
|
|
72366
|
+
var dataTool = {};
|
|
71932
72367
|
|
|
71933
72368
|
/*
|
|
71934
72369
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
@@ -73460,6 +73895,12 @@ var SeriesData = /** @class */function () {
|
|
|
73460
73895
|
return SeriesData;
|
|
73461
73896
|
}();
|
|
73462
73897
|
|
|
73898
|
+
/**
|
|
73899
|
+
* For outside usage compat (like echarts-gl are using it).
|
|
73900
|
+
*/
|
|
73901
|
+
function createDimensions(source, opt) {
|
|
73902
|
+
return prepareSeriesDataSchema(source, opt).dimensions;
|
|
73903
|
+
}
|
|
73463
73904
|
/**
|
|
73464
73905
|
* This method builds the relationship between:
|
|
73465
73906
|
* + "what the coord sys or series requires (see `coordDimensions`)",
|
|
@@ -74134,7 +74575,7 @@ function isIntervalOrLogScale(scale) {
|
|
|
74134
74575
|
*/
|
|
74135
74576
|
function intervalScaleNiceTicks(extent, spanWithBreaks, splitNumber, minInterval, maxInterval) {
|
|
74136
74577
|
var result = {};
|
|
74137
|
-
var interval = result.interval = nice(spanWithBreaks / splitNumber);
|
|
74578
|
+
var interval = result.interval = nice(spanWithBreaks / splitNumber, true);
|
|
74138
74579
|
if (minInterval != null && interval < minInterval) {
|
|
74139
74580
|
interval = result.interval = minInterval;
|
|
74140
74581
|
}
|
|
@@ -75313,7 +75754,7 @@ var TimeScale = /** @class */function (_super) {
|
|
|
75313
75754
|
*/
|
|
75314
75755
|
TimeScale.prototype.getLabel = function (tick) {
|
|
75315
75756
|
var useUTC = this.getSetting('useUTC');
|
|
75316
|
-
return format(tick.value, fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))] || fullLeveledFormatter.second, useUTC, this.getSetting('locale'));
|
|
75757
|
+
return format$1(tick.value, fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))] || fullLeveledFormatter.second, useUTC, this.getSetting('locale'));
|
|
75317
75758
|
};
|
|
75318
75759
|
TimeScale.prototype.getFormattedLabel = function (tick, idx, labelFormatter) {
|
|
75319
75760
|
var isUTC = this.getSetting('useUTC');
|
|
@@ -75534,7 +75975,7 @@ function getMinutesAndSecondsInterval(approxInterval, isMinutes) {
|
|
|
75534
75975
|
return approxInterval > 30 ? 30 : approxInterval > 20 ? 20 : approxInterval > 15 ? 15 : approxInterval > 10 ? 10 : approxInterval > 5 ? 5 : approxInterval > 2 ? 2 : 1;
|
|
75535
75976
|
}
|
|
75536
75977
|
function getMillisecondsInterval(approxInterval) {
|
|
75537
|
-
return nice(approxInterval);
|
|
75978
|
+
return nice(approxInterval, true);
|
|
75538
75979
|
}
|
|
75539
75980
|
// e.g., if the input unit is 'day', start calculate ticks from the first day of
|
|
75540
75981
|
// that month to make ticks "nice".
|
|
@@ -76409,6 +76850,73 @@ var AxisModelCommonMixin = /** @class */function () {
|
|
|
76409
76850
|
return AxisModelCommonMixin;
|
|
76410
76851
|
}();
|
|
76411
76852
|
|
|
76853
|
+
/**
|
|
76854
|
+
* Create a multi dimension List structure from seriesModel.
|
|
76855
|
+
*/
|
|
76856
|
+
function createList$2(seriesModel) {
|
|
76857
|
+
return createSeriesData(null, seriesModel);
|
|
76858
|
+
}
|
|
76859
|
+
var dataStack = {
|
|
76860
|
+
isDimensionStacked: isDimensionStacked,
|
|
76861
|
+
enableDataStack: enableDataStack,
|
|
76862
|
+
getStackedDimension: getStackedDimension
|
|
76863
|
+
};
|
|
76864
|
+
/**
|
|
76865
|
+
* Create scale
|
|
76866
|
+
* @param {Array.<number>} dataExtent
|
|
76867
|
+
* @param {Object|module:echarts/Model} option If `optoin.type`
|
|
76868
|
+
* is secified, it can only be `'value'` currently.
|
|
76869
|
+
*/
|
|
76870
|
+
function createScale(dataExtent, option) {
|
|
76871
|
+
var axisModel = option;
|
|
76872
|
+
if (!(option instanceof Model)) {
|
|
76873
|
+
axisModel = new Model(option);
|
|
76874
|
+
// FIXME
|
|
76875
|
+
// Currently AxisModelCommonMixin has nothing to do with the
|
|
76876
|
+
// the requirements of `axisHelper.createScaleByModel`. For
|
|
76877
|
+
// example the methods `getCategories` and `getOrdinalMeta`
|
|
76878
|
+
// are required for `'category'` axis, and ecModel is required
|
|
76879
|
+
// for `'time'` axis. But occasionally echarts-gl happened
|
|
76880
|
+
// to only use `'value'` axis.
|
|
76881
|
+
// zrUtil.mixin(axisModel, AxisModelCommonMixin);
|
|
76882
|
+
}
|
|
76883
|
+
var scale = createScaleByModel$1(axisModel);
|
|
76884
|
+
scale.setExtent(dataExtent[0], dataExtent[1]);
|
|
76885
|
+
niceScaleExtent(scale, axisModel);
|
|
76886
|
+
return scale;
|
|
76887
|
+
}
|
|
76888
|
+
/**
|
|
76889
|
+
* Mixin common methods to axis model,
|
|
76890
|
+
*
|
|
76891
|
+
* Include methods
|
|
76892
|
+
* `getFormattedLabels() => Array.<string>`
|
|
76893
|
+
* `getCategories() => Array.<string>`
|
|
76894
|
+
* `getMin(origin: boolean) => number`
|
|
76895
|
+
* `getMax(origin: boolean) => number`
|
|
76896
|
+
* `getNeedCrossZero() => boolean`
|
|
76897
|
+
*/
|
|
76898
|
+
function mixinAxisModelCommonMethods(Model) {
|
|
76899
|
+
mixin(Model, AxisModelCommonMixin);
|
|
76900
|
+
}
|
|
76901
|
+
function createTextStyle(textStyleModel, opts) {
|
|
76902
|
+
opts = opts || {};
|
|
76903
|
+
return createTextStyle$1(textStyleModel, null, null, opts.state !== 'normal');
|
|
76904
|
+
}
|
|
76905
|
+
|
|
76906
|
+
var helper = /*#__PURE__*/Object.freeze({
|
|
76907
|
+
__proto__: null,
|
|
76908
|
+
createDimensions: createDimensions,
|
|
76909
|
+
createList: createList$2,
|
|
76910
|
+
createScale: createScale,
|
|
76911
|
+
createSymbol: createSymbol$1,
|
|
76912
|
+
createTextStyle: createTextStyle,
|
|
76913
|
+
dataStack: dataStack,
|
|
76914
|
+
enableHoverEmphasis: enableHoverEmphasis,
|
|
76915
|
+
getECData: getECData,
|
|
76916
|
+
getLayoutRect: getLayoutRect,
|
|
76917
|
+
mixinAxisModelCommonMethods: mixinAxisModelCommonMethods
|
|
76918
|
+
});
|
|
76919
|
+
|
|
76412
76920
|
var extensions = [];
|
|
76413
76921
|
var extensionRegisters = {
|
|
76414
76922
|
registerPreprocessor: registerPreprocessor,
|
|
@@ -76443,7 +76951,7 @@ var extensionRegisters = {
|
|
|
76443
76951
|
ChartView.registerClass(ChartViewClass);
|
|
76444
76952
|
},
|
|
76445
76953
|
registerCustomSeries: function (seriesType, renderItem) {
|
|
76446
|
-
registerCustomSeries(seriesType, renderItem);
|
|
76954
|
+
registerCustomSeries$1(seriesType, renderItem);
|
|
76447
76955
|
},
|
|
76448
76956
|
registerSubTypeDefaulter: function (componentType, defaulter) {
|
|
76449
76957
|
ComponentModel.registerSubTypeDefaulter(componentType, defaulter);
|
|
@@ -76826,6 +77334,36 @@ function parseGeoJSON(geoJson, nameProperty) {
|
|
|
76826
77334
|
});
|
|
76827
77335
|
}
|
|
76828
77336
|
|
|
77337
|
+
var number = /*#__PURE__*/Object.freeze({
|
|
77338
|
+
__proto__: null,
|
|
77339
|
+
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$2,
|
|
77340
|
+
asc: asc$2,
|
|
77341
|
+
getPercentWithPrecision: getPercentWithPrecision,
|
|
77342
|
+
getPixelPrecision: getPixelPrecision,
|
|
77343
|
+
getPrecision: getPrecision,
|
|
77344
|
+
getPrecisionSafe: getPrecisionSafe,
|
|
77345
|
+
isNumeric: isNumeric,
|
|
77346
|
+
isRadianAroundZero: isRadianAroundZero,
|
|
77347
|
+
linearMap: linearMap$2,
|
|
77348
|
+
nice: nice,
|
|
77349
|
+
numericToNumber: numericToNumber,
|
|
77350
|
+
parseDate: parseDate,
|
|
77351
|
+
parsePercent: parsePercent,
|
|
77352
|
+
quantile: quantile,
|
|
77353
|
+
quantity: quantity,
|
|
77354
|
+
quantityExponent: quantityExponent,
|
|
77355
|
+
reformIntervals: reformIntervals,
|
|
77356
|
+
remRadian: remRadian,
|
|
77357
|
+
round: round$2
|
|
77358
|
+
});
|
|
77359
|
+
|
|
77360
|
+
var time = /*#__PURE__*/Object.freeze({
|
|
77361
|
+
__proto__: null,
|
|
77362
|
+
format: format$1,
|
|
77363
|
+
parse: parseDate,
|
|
77364
|
+
roundTime: roundTime
|
|
77365
|
+
});
|
|
77366
|
+
|
|
76829
77367
|
var graphic$1 = /*#__PURE__*/Object.freeze({
|
|
76830
77368
|
__proto__: null,
|
|
76831
77369
|
Arc: Arc,
|
|
@@ -76862,6 +77400,40 @@ var graphic$1 = /*#__PURE__*/Object.freeze({
|
|
|
76862
77400
|
updateProps: updateProps$1
|
|
76863
77401
|
});
|
|
76864
77402
|
|
|
77403
|
+
var format = /*#__PURE__*/Object.freeze({
|
|
77404
|
+
__proto__: null,
|
|
77405
|
+
addCommas: addCommas,
|
|
77406
|
+
capitalFirst: capitalFirst,
|
|
77407
|
+
encodeHTML: encodeHTML,
|
|
77408
|
+
formatTime: formatTime,
|
|
77409
|
+
formatTpl: formatTpl,
|
|
77410
|
+
getTextRect: getTextRect,
|
|
77411
|
+
getTooltipMarker: getTooltipMarker,
|
|
77412
|
+
normalizeCssArray: normalizeCssArray,
|
|
77413
|
+
toCamelCase: toCamelCase,
|
|
77414
|
+
truncateText: truncateText
|
|
77415
|
+
});
|
|
77416
|
+
|
|
77417
|
+
var util = /*#__PURE__*/Object.freeze({
|
|
77418
|
+
__proto__: null,
|
|
77419
|
+
bind: bind$1,
|
|
77420
|
+
clone: clone$3,
|
|
77421
|
+
curry: curry$1,
|
|
77422
|
+
defaults: defaults,
|
|
77423
|
+
each: each$c,
|
|
77424
|
+
extend: extend,
|
|
77425
|
+
filter: filter,
|
|
77426
|
+
indexOf: indexOf,
|
|
77427
|
+
inherits: inherits,
|
|
77428
|
+
isArray: isArray$2,
|
|
77429
|
+
isFunction: isFunction$1,
|
|
77430
|
+
isObject: isObject$4,
|
|
77431
|
+
isString: isString,
|
|
77432
|
+
map: map$1,
|
|
77433
|
+
merge: merge$1,
|
|
77434
|
+
reduce: reduce
|
|
77435
|
+
});
|
|
77436
|
+
|
|
76865
77437
|
var modelInner = makeInner();
|
|
76866
77438
|
var axisInner = makeInner();
|
|
76867
77439
|
var AxisTickLabelComputingKind = {
|
|
@@ -77503,6 +78075,110 @@ function fixOnBandTicksCoords(axis, ticksCoords, alignWithLabel, clamp) {
|
|
|
77503
78075
|
}
|
|
77504
78076
|
}
|
|
77505
78077
|
|
|
78078
|
+
// --------------------- Deprecated Extension Methods ---------------------
|
|
78079
|
+
// Should use `ComponentModel.extend` or `class XXXX extend ComponentModel` to create class.
|
|
78080
|
+
// Then use `registerComponentModel` in `install` parameter when `use` this extension. For example:
|
|
78081
|
+
// class Bar3DModel extends ComponentModel {}
|
|
78082
|
+
// export function install(registers) { registers.registerComponentModel(Bar3DModel); }
|
|
78083
|
+
// echarts.use(install);
|
|
78084
|
+
function extendComponentModel(proto) {
|
|
78085
|
+
var Model = ComponentModel.extend(proto);
|
|
78086
|
+
ComponentModel.registerClass(Model);
|
|
78087
|
+
return Model;
|
|
78088
|
+
}
|
|
78089
|
+
function extendComponentView(proto) {
|
|
78090
|
+
var View = ComponentView.extend(proto);
|
|
78091
|
+
ComponentView.registerClass(View);
|
|
78092
|
+
return View;
|
|
78093
|
+
}
|
|
78094
|
+
function extendSeriesModel(proto) {
|
|
78095
|
+
var Model = SeriesModel.extend(proto);
|
|
78096
|
+
SeriesModel.registerClass(Model);
|
|
78097
|
+
return Model;
|
|
78098
|
+
}
|
|
78099
|
+
function extendChartView(proto) {
|
|
78100
|
+
var View = ChartView.extend(proto);
|
|
78101
|
+
ChartView.registerClass(View);
|
|
78102
|
+
return View;
|
|
78103
|
+
}
|
|
78104
|
+
|
|
78105
|
+
var PI2$1 = Math.PI * 2;
|
|
78106
|
+
var CMD = PathProxy.CMD;
|
|
78107
|
+
var DEFAULT_SEARCH_SPACE = ['top', 'right', 'bottom', 'left'];
|
|
78108
|
+
function getCandidateAnchor(pos, distance, rect, outPt, outDir) {
|
|
78109
|
+
var width = rect.width;
|
|
78110
|
+
var height = rect.height;
|
|
78111
|
+
switch (pos) {
|
|
78112
|
+
case 'top':
|
|
78113
|
+
outPt.set(rect.x + width / 2, rect.y - distance);
|
|
78114
|
+
outDir.set(0, -1);
|
|
78115
|
+
break;
|
|
78116
|
+
case 'bottom':
|
|
78117
|
+
outPt.set(rect.x + width / 2, rect.y + height + distance);
|
|
78118
|
+
outDir.set(0, 1);
|
|
78119
|
+
break;
|
|
78120
|
+
case 'left':
|
|
78121
|
+
outPt.set(rect.x - distance, rect.y + height / 2);
|
|
78122
|
+
outDir.set(-1, 0);
|
|
78123
|
+
break;
|
|
78124
|
+
case 'right':
|
|
78125
|
+
outPt.set(rect.x + width + distance, rect.y + height / 2);
|
|
78126
|
+
outDir.set(1, 0);
|
|
78127
|
+
break;
|
|
78128
|
+
}
|
|
78129
|
+
}
|
|
78130
|
+
function projectPointToArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y, out) {
|
|
78131
|
+
x -= cx;
|
|
78132
|
+
y -= cy;
|
|
78133
|
+
var d = Math.sqrt(x * x + y * y);
|
|
78134
|
+
x /= d;
|
|
78135
|
+
y /= d;
|
|
78136
|
+
// Intersect point.
|
|
78137
|
+
var ox = x * r + cx;
|
|
78138
|
+
var oy = y * r + cy;
|
|
78139
|
+
if (Math.abs(startAngle - endAngle) % PI2$1 < 1e-4) {
|
|
78140
|
+
// Is a circle
|
|
78141
|
+
out[0] = ox;
|
|
78142
|
+
out[1] = oy;
|
|
78143
|
+
return d - r;
|
|
78144
|
+
}
|
|
78145
|
+
if (anticlockwise) {
|
|
78146
|
+
var tmp = startAngle;
|
|
78147
|
+
startAngle = normalizeRadian(endAngle);
|
|
78148
|
+
endAngle = normalizeRadian(tmp);
|
|
78149
|
+
} else {
|
|
78150
|
+
startAngle = normalizeRadian(startAngle);
|
|
78151
|
+
endAngle = normalizeRadian(endAngle);
|
|
78152
|
+
}
|
|
78153
|
+
if (startAngle > endAngle) {
|
|
78154
|
+
endAngle += PI2$1;
|
|
78155
|
+
}
|
|
78156
|
+
var angle = Math.atan2(y, x);
|
|
78157
|
+
if (angle < 0) {
|
|
78158
|
+
angle += PI2$1;
|
|
78159
|
+
}
|
|
78160
|
+
if (angle >= startAngle && angle <= endAngle || angle + PI2$1 >= startAngle && angle + PI2$1 <= endAngle) {
|
|
78161
|
+
// Project point is on the arc.
|
|
78162
|
+
out[0] = ox;
|
|
78163
|
+
out[1] = oy;
|
|
78164
|
+
return d - r;
|
|
78165
|
+
}
|
|
78166
|
+
var x1 = r * Math.cos(startAngle) + cx;
|
|
78167
|
+
var y1 = r * Math.sin(startAngle) + cy;
|
|
78168
|
+
var x2 = r * Math.cos(endAngle) + cx;
|
|
78169
|
+
var y2 = r * Math.sin(endAngle) + cy;
|
|
78170
|
+
var d1 = (x1 - x) * (x1 - x) + (y1 - y) * (y1 - y);
|
|
78171
|
+
var d2 = (x2 - x) * (x2 - x) + (y2 - y) * (y2 - y);
|
|
78172
|
+
if (d1 < d2) {
|
|
78173
|
+
out[0] = x1;
|
|
78174
|
+
out[1] = y1;
|
|
78175
|
+
return Math.sqrt(d1);
|
|
78176
|
+
} else {
|
|
78177
|
+
out[0] = x2;
|
|
78178
|
+
out[1] = y2;
|
|
78179
|
+
return Math.sqrt(d2);
|
|
78180
|
+
}
|
|
78181
|
+
}
|
|
77506
78182
|
function projectPointToLine(x1, y1, x2, y2, x, y, out, limitToEnds) {
|
|
77507
78183
|
var dx = x - x1;
|
|
77508
78184
|
var dy = y - y1;
|
|
@@ -77514,17 +78190,189 @@ function projectPointToLine(x1, y1, x2, y2, x, y, out, limitToEnds) {
|
|
|
77514
78190
|
// dot product
|
|
77515
78191
|
var projectedLen = dx * dx1 + dy * dy1;
|
|
77516
78192
|
var t = projectedLen / lineLen;
|
|
78193
|
+
if (limitToEnds) {
|
|
78194
|
+
t = Math.min(Math.max(t, 0), 1);
|
|
78195
|
+
}
|
|
77517
78196
|
t *= lineLen;
|
|
77518
78197
|
var ox = out[0] = x1 + t * dx1;
|
|
77519
78198
|
var oy = out[1] = y1 + t * dy1;
|
|
77520
78199
|
return Math.sqrt((ox - x) * (ox - x) + (oy - y) * (oy - y));
|
|
77521
78200
|
}
|
|
78201
|
+
function projectPointToRect(x1, y1, width, height, x, y, out) {
|
|
78202
|
+
if (width < 0) {
|
|
78203
|
+
x1 = x1 + width;
|
|
78204
|
+
width = -width;
|
|
78205
|
+
}
|
|
78206
|
+
if (height < 0) {
|
|
78207
|
+
y1 = y1 + height;
|
|
78208
|
+
height = -height;
|
|
78209
|
+
}
|
|
78210
|
+
var x2 = x1 + width;
|
|
78211
|
+
var y2 = y1 + height;
|
|
78212
|
+
var ox = out[0] = Math.min(Math.max(x, x1), x2);
|
|
78213
|
+
var oy = out[1] = Math.min(Math.max(y, y1), y2);
|
|
78214
|
+
return Math.sqrt((ox - x) * (ox - x) + (oy - y) * (oy - y));
|
|
78215
|
+
}
|
|
78216
|
+
var tmpPt = [];
|
|
78217
|
+
function nearestPointOnRect(pt, rect, out) {
|
|
78218
|
+
var dist = projectPointToRect(rect.x, rect.y, rect.width, rect.height, pt.x, pt.y, tmpPt);
|
|
78219
|
+
out.set(tmpPt[0], tmpPt[1]);
|
|
78220
|
+
return dist;
|
|
78221
|
+
}
|
|
78222
|
+
/**
|
|
78223
|
+
* Calculate min distance corresponding point.
|
|
78224
|
+
* This method won't evaluate if point is in the path.
|
|
78225
|
+
*/
|
|
78226
|
+
function nearestPointOnPath(pt, path, out) {
|
|
78227
|
+
var xi = 0;
|
|
78228
|
+
var yi = 0;
|
|
78229
|
+
var x0 = 0;
|
|
78230
|
+
var y0 = 0;
|
|
78231
|
+
var x1;
|
|
78232
|
+
var y1;
|
|
78233
|
+
var minDist = Infinity;
|
|
78234
|
+
var data = path.data;
|
|
78235
|
+
var x = pt.x;
|
|
78236
|
+
var y = pt.y;
|
|
78237
|
+
for (var i = 0; i < data.length;) {
|
|
78238
|
+
var cmd = data[i++];
|
|
78239
|
+
if (i === 1) {
|
|
78240
|
+
xi = data[i];
|
|
78241
|
+
yi = data[i + 1];
|
|
78242
|
+
x0 = xi;
|
|
78243
|
+
y0 = yi;
|
|
78244
|
+
}
|
|
78245
|
+
var d = minDist;
|
|
78246
|
+
switch (cmd) {
|
|
78247
|
+
case CMD.M:
|
|
78248
|
+
// moveTo 命令重新创建一个新的 subpath, 并且更新新的起点
|
|
78249
|
+
// 在 closePath 的时候使用
|
|
78250
|
+
x0 = data[i++];
|
|
78251
|
+
y0 = data[i++];
|
|
78252
|
+
xi = x0;
|
|
78253
|
+
yi = y0;
|
|
78254
|
+
break;
|
|
78255
|
+
case CMD.L:
|
|
78256
|
+
d = projectPointToLine(xi, yi, data[i], data[i + 1], x, y, tmpPt, true);
|
|
78257
|
+
xi = data[i++];
|
|
78258
|
+
yi = data[i++];
|
|
78259
|
+
break;
|
|
78260
|
+
case CMD.C:
|
|
78261
|
+
d = cubicProjectPoint(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], x, y, tmpPt);
|
|
78262
|
+
xi = data[i++];
|
|
78263
|
+
yi = data[i++];
|
|
78264
|
+
break;
|
|
78265
|
+
case CMD.Q:
|
|
78266
|
+
d = quadraticProjectPoint(xi, yi, data[i++], data[i++], data[i], data[i + 1], x, y, tmpPt);
|
|
78267
|
+
xi = data[i++];
|
|
78268
|
+
yi = data[i++];
|
|
78269
|
+
break;
|
|
78270
|
+
case CMD.A:
|
|
78271
|
+
// TODO Arc 判断的开销比较大
|
|
78272
|
+
var cx = data[i++];
|
|
78273
|
+
var cy = data[i++];
|
|
78274
|
+
var rx = data[i++];
|
|
78275
|
+
var ry = data[i++];
|
|
78276
|
+
var theta = data[i++];
|
|
78277
|
+
var dTheta = data[i++];
|
|
78278
|
+
// TODO Arc 旋转
|
|
78279
|
+
i += 1;
|
|
78280
|
+
var anticlockwise = !!(1 - data[i++]);
|
|
78281
|
+
x1 = Math.cos(theta) * rx + cx;
|
|
78282
|
+
y1 = Math.sin(theta) * ry + cy;
|
|
78283
|
+
// 不是直接使用 arc 命令
|
|
78284
|
+
if (i <= 1) {
|
|
78285
|
+
// 第一个命令起点还未定义
|
|
78286
|
+
x0 = x1;
|
|
78287
|
+
y0 = y1;
|
|
78288
|
+
}
|
|
78289
|
+
// zr 使用scale来模拟椭圆, 这里也对x做一定的缩放
|
|
78290
|
+
var _x = (x - cx) * ry / rx + cx;
|
|
78291
|
+
d = projectPointToArc(cx, cy, ry, theta, theta + dTheta, anticlockwise, _x, y, tmpPt);
|
|
78292
|
+
xi = Math.cos(theta + dTheta) * rx + cx;
|
|
78293
|
+
yi = Math.sin(theta + dTheta) * ry + cy;
|
|
78294
|
+
break;
|
|
78295
|
+
case CMD.R:
|
|
78296
|
+
x0 = xi = data[i++];
|
|
78297
|
+
y0 = yi = data[i++];
|
|
78298
|
+
var width = data[i++];
|
|
78299
|
+
var height = data[i++];
|
|
78300
|
+
d = projectPointToRect(x0, y0, width, height, x, y, tmpPt);
|
|
78301
|
+
break;
|
|
78302
|
+
case CMD.Z:
|
|
78303
|
+
d = projectPointToLine(xi, yi, x0, y0, x, y, tmpPt, true);
|
|
78304
|
+
xi = x0;
|
|
78305
|
+
yi = y0;
|
|
78306
|
+
break;
|
|
78307
|
+
}
|
|
78308
|
+
if (d < minDist) {
|
|
78309
|
+
minDist = d;
|
|
78310
|
+
out.set(tmpPt[0], tmpPt[1]);
|
|
78311
|
+
}
|
|
78312
|
+
}
|
|
78313
|
+
return minDist;
|
|
78314
|
+
}
|
|
77522
78315
|
// Temporal variable for intermediate usage.
|
|
77523
78316
|
var pt0 = new Point();
|
|
77524
78317
|
var pt1 = new Point();
|
|
77525
78318
|
var pt2 = new Point();
|
|
77526
78319
|
var dir = new Point();
|
|
77527
78320
|
var dir2 = new Point();
|
|
78321
|
+
/**
|
|
78322
|
+
* Calculate a proper guide line based on the label position and graphic element definition
|
|
78323
|
+
* @param label
|
|
78324
|
+
* @param labelRect
|
|
78325
|
+
* @param target
|
|
78326
|
+
* @param targetRect
|
|
78327
|
+
*/
|
|
78328
|
+
function updateLabelLinePoints(target, labelLineModel) {
|
|
78329
|
+
if (!target) {
|
|
78330
|
+
return;
|
|
78331
|
+
}
|
|
78332
|
+
var labelLine = target.getTextGuideLine();
|
|
78333
|
+
var label = target.getTextContent();
|
|
78334
|
+
// Needs to create text guide in each charts.
|
|
78335
|
+
if (!(label && labelLine)) {
|
|
78336
|
+
return;
|
|
78337
|
+
}
|
|
78338
|
+
var labelGuideConfig = target.textGuideLineConfig || {};
|
|
78339
|
+
var points = [[0, 0], [0, 0], [0, 0]];
|
|
78340
|
+
var searchSpace = labelGuideConfig.candidates || DEFAULT_SEARCH_SPACE;
|
|
78341
|
+
var labelRect = label.getBoundingRect().clone();
|
|
78342
|
+
labelRect.applyTransform(label.getComputedTransform());
|
|
78343
|
+
var minDist = Infinity;
|
|
78344
|
+
var anchorPoint = labelGuideConfig.anchor;
|
|
78345
|
+
var targetTransform = target.getComputedTransform();
|
|
78346
|
+
var targetInversedTransform = targetTransform && invert([], targetTransform);
|
|
78347
|
+
var len = labelLineModel.get('length2') || 0;
|
|
78348
|
+
if (anchorPoint) {
|
|
78349
|
+
pt2.copy(anchorPoint);
|
|
78350
|
+
}
|
|
78351
|
+
for (var i = 0; i < searchSpace.length; i++) {
|
|
78352
|
+
var candidate = searchSpace[i];
|
|
78353
|
+
getCandidateAnchor(candidate, 0, labelRect, pt0, dir);
|
|
78354
|
+
Point.scaleAndAdd(pt1, pt0, dir, len);
|
|
78355
|
+
// Transform to target coord space.
|
|
78356
|
+
pt1.transform(targetInversedTransform);
|
|
78357
|
+
// Note: getBoundingRect will ensure the `path` being created.
|
|
78358
|
+
var boundingRect = target.getBoundingRect();
|
|
78359
|
+
var dist = anchorPoint ? anchorPoint.distance(pt1) : target instanceof Path ? nearestPointOnPath(pt1, target.path, pt2) : nearestPointOnRect(pt1, boundingRect, pt2);
|
|
78360
|
+
// TODO pt2 is in the path
|
|
78361
|
+
if (dist < minDist) {
|
|
78362
|
+
minDist = dist;
|
|
78363
|
+
// Transform back to global space.
|
|
78364
|
+
pt1.transform(targetTransform);
|
|
78365
|
+
pt2.transform(targetTransform);
|
|
78366
|
+
pt2.toArray(points[0]);
|
|
78367
|
+
pt1.toArray(points[1]);
|
|
78368
|
+
pt0.toArray(points[2]);
|
|
78369
|
+
}
|
|
78370
|
+
}
|
|
78371
|
+
limitTurnAngle(points, labelLineModel.get('minTurnAngle'));
|
|
78372
|
+
labelLine.setShape({
|
|
78373
|
+
points: points
|
|
78374
|
+
});
|
|
78375
|
+
}
|
|
77528
78376
|
// Temporal variable for the limitTurnAngle function
|
|
77529
78377
|
var tmpArr = [];
|
|
77530
78378
|
var tmpProjPoint = new Point();
|
|
@@ -77559,7 +78407,7 @@ function limitTurnAngle(linePoints, minTurnAngle) {
|
|
|
77559
78407
|
if (minTurnAngleCos < angleCos) {
|
|
77560
78408
|
// Smaller than minTurnAngle
|
|
77561
78409
|
// Calculate project point of pt0 on pt1-pt2
|
|
77562
|
-
var d = projectPointToLine(pt1.x, pt1.y, pt2.x, pt2.y, pt0.x, pt0.y, tmpArr);
|
|
78410
|
+
var d = projectPointToLine(pt1.x, pt1.y, pt2.x, pt2.y, pt0.x, pt0.y, tmpArr, false);
|
|
77563
78411
|
tmpProjPoint.fromArray(tmpArr);
|
|
77564
78412
|
// Calculate new projected length with limited minTurnAngle and get the new connect point
|
|
77565
78413
|
tmpProjPoint.scaleAndAdd(dir2, d / Math.tan(Math.PI - minTurnAngle));
|
|
@@ -77601,7 +78449,7 @@ function limitSurfaceAngle(linePoints, surfaceNormal, maxSurfaceAngle) {
|
|
|
77601
78449
|
var maxSurfaceAngleCos = Math.cos(maxSurfaceAngle);
|
|
77602
78450
|
if (angleCos < maxSurfaceAngleCos) {
|
|
77603
78451
|
// Calculate project point of pt0 on pt1-pt2
|
|
77604
|
-
var d = projectPointToLine(pt1.x, pt1.y, pt2.x, pt2.y, pt0.x, pt0.y, tmpArr);
|
|
78452
|
+
var d = projectPointToLine(pt1.x, pt1.y, pt2.x, pt2.y, pt0.x, pt0.y, tmpArr, false);
|
|
77605
78453
|
tmpProjPoint.fromArray(tmpArr);
|
|
77606
78454
|
var HALF_PI = Math.PI / 2;
|
|
77607
78455
|
var angle2 = Math.acos(dir2.dot(surfaceNormal));
|
|
@@ -78054,6 +78902,19 @@ balanceShift) {
|
|
|
78054
78902
|
}
|
|
78055
78903
|
return adjusted;
|
|
78056
78904
|
}
|
|
78905
|
+
/**
|
|
78906
|
+
* @see `SavedLabelAttr` in `LabelManager.ts`
|
|
78907
|
+
* @see `hideOverlap`
|
|
78908
|
+
*/
|
|
78909
|
+
function restoreIgnore(labelList) {
|
|
78910
|
+
for (var i = 0; i < labelList.length; i++) {
|
|
78911
|
+
var labelItem = labelList[i];
|
|
78912
|
+
var defaultAttr = labelItem.defaultAttr;
|
|
78913
|
+
var labelLine = labelItem.labelLine;
|
|
78914
|
+
labelItem.label.attr('ignore', defaultAttr.ignore);
|
|
78915
|
+
labelLine && labelLine.attr('ignore', defaultAttr.labelGuideIgnore);
|
|
78916
|
+
}
|
|
78917
|
+
}
|
|
78057
78918
|
/**
|
|
78058
78919
|
* [NOTICE - restore]:
|
|
78059
78920
|
* 'series:layoutlabels' may be triggered during some shortcut passes, such as zooming in series.graph/geo
|
|
@@ -78137,6 +78998,496 @@ function labelIntersect(baseLayoutInfo, targetLayoutInfo, mtv, intersectOpt) {
|
|
|
78137
78998
|
return ensureOBB(baseLayoutInfo).intersect(ensureOBB(targetLayoutInfo), mtv, intersectOpt);
|
|
78138
78999
|
}
|
|
78139
79000
|
|
|
79001
|
+
function cloneArr(points) {
|
|
79002
|
+
if (points) {
|
|
79003
|
+
var newPoints = [];
|
|
79004
|
+
for (var i = 0; i < points.length; i++) {
|
|
79005
|
+
newPoints.push(points[i].slice());
|
|
79006
|
+
}
|
|
79007
|
+
return newPoints;
|
|
79008
|
+
}
|
|
79009
|
+
}
|
|
79010
|
+
function prepareLayoutCallbackParams(labelItem, hostEl) {
|
|
79011
|
+
var label = labelItem.label;
|
|
79012
|
+
var labelLine = hostEl && hostEl.getTextGuideLine();
|
|
79013
|
+
return {
|
|
79014
|
+
dataIndex: labelItem.dataIndex,
|
|
79015
|
+
dataType: labelItem.dataType,
|
|
79016
|
+
seriesIndex: labelItem.seriesModel.seriesIndex,
|
|
79017
|
+
text: labelItem.label.style.text,
|
|
79018
|
+
rect: labelItem.hostRect,
|
|
79019
|
+
labelRect: labelItem.rect,
|
|
79020
|
+
// x: labelAttr.x,
|
|
79021
|
+
// y: labelAttr.y,
|
|
79022
|
+
align: label.style.align,
|
|
79023
|
+
verticalAlign: label.style.verticalAlign,
|
|
79024
|
+
labelLinePoints: cloneArr(labelLine && labelLine.shape.points)
|
|
79025
|
+
};
|
|
79026
|
+
}
|
|
79027
|
+
var LABEL_OPTION_TO_STYLE_KEYS = ['align', 'verticalAlign', 'width', 'height', 'fontSize'];
|
|
79028
|
+
var dummyTransformable = new Transformable();
|
|
79029
|
+
var labelLayoutInnerStore = makeInner();
|
|
79030
|
+
var labelLineAnimationStore = makeInner();
|
|
79031
|
+
function extendWithKeys(target, source, keys) {
|
|
79032
|
+
for (var i = 0; i < keys.length; i++) {
|
|
79033
|
+
var key = keys[i];
|
|
79034
|
+
if (source[key] != null) {
|
|
79035
|
+
target[key] = source[key];
|
|
79036
|
+
}
|
|
79037
|
+
}
|
|
79038
|
+
}
|
|
79039
|
+
var LABEL_LAYOUT_PROPS = ['x', 'y', 'rotation'];
|
|
79040
|
+
var LabelManager = /** @class */function () {
|
|
79041
|
+
function LabelManager() {
|
|
79042
|
+
this._labelList = [];
|
|
79043
|
+
this._chartViewList = [];
|
|
79044
|
+
}
|
|
79045
|
+
LabelManager.prototype.clearLabels = function () {
|
|
79046
|
+
this._labelList = [];
|
|
79047
|
+
this._chartViewList = [];
|
|
79048
|
+
};
|
|
79049
|
+
/**
|
|
79050
|
+
* Add label to manager
|
|
79051
|
+
*/
|
|
79052
|
+
LabelManager.prototype._addLabel = function (dataIndex, dataType, seriesModel, label, layoutOptionOrCb) {
|
|
79053
|
+
var labelStyle = label.style;
|
|
79054
|
+
var hostEl = label.__hostTarget;
|
|
79055
|
+
var textConfig = hostEl.textConfig || {};
|
|
79056
|
+
// TODO: If label is in other state.
|
|
79057
|
+
var labelTransform = label.getComputedTransform();
|
|
79058
|
+
var labelRect = label.getBoundingRect().plain();
|
|
79059
|
+
BoundingRect.applyTransform(labelRect, labelRect, labelTransform);
|
|
79060
|
+
if (labelTransform) {
|
|
79061
|
+
dummyTransformable.setLocalTransform(labelTransform);
|
|
79062
|
+
} else {
|
|
79063
|
+
// Identity transform.
|
|
79064
|
+
dummyTransformable.x = dummyTransformable.y = dummyTransformable.rotation = dummyTransformable.originX = dummyTransformable.originY = 0;
|
|
79065
|
+
dummyTransformable.scaleX = dummyTransformable.scaleY = 1;
|
|
79066
|
+
}
|
|
79067
|
+
dummyTransformable.rotation = normalizeRadian(dummyTransformable.rotation);
|
|
79068
|
+
var host = label.__hostTarget;
|
|
79069
|
+
var hostRect;
|
|
79070
|
+
if (host) {
|
|
79071
|
+
hostRect = host.getBoundingRect().plain();
|
|
79072
|
+
var transform = host.getComputedTransform();
|
|
79073
|
+
BoundingRect.applyTransform(hostRect, hostRect, transform);
|
|
79074
|
+
}
|
|
79075
|
+
var labelGuide = hostRect && host.getTextGuideLine();
|
|
79076
|
+
this._labelList.push({
|
|
79077
|
+
label: label,
|
|
79078
|
+
labelLine: labelGuide,
|
|
79079
|
+
seriesModel: seriesModel,
|
|
79080
|
+
dataIndex: dataIndex,
|
|
79081
|
+
dataType: dataType,
|
|
79082
|
+
layoutOptionOrCb: layoutOptionOrCb,
|
|
79083
|
+
layoutOption: null,
|
|
79084
|
+
rect: labelRect,
|
|
79085
|
+
hostRect: hostRect,
|
|
79086
|
+
// Label with lower priority will be hidden when overlapped
|
|
79087
|
+
// Use rect size as default priority
|
|
79088
|
+
priority: hostRect ? hostRect.width * hostRect.height : 0,
|
|
79089
|
+
// Save default label attributes.
|
|
79090
|
+
// For restore if developers want get back to default value in callback.
|
|
79091
|
+
defaultAttr: {
|
|
79092
|
+
ignore: label.ignore,
|
|
79093
|
+
labelGuideIgnore: labelGuide && labelGuide.ignore,
|
|
79094
|
+
x: dummyTransformable.x,
|
|
79095
|
+
y: dummyTransformable.y,
|
|
79096
|
+
scaleX: dummyTransformable.scaleX,
|
|
79097
|
+
scaleY: dummyTransformable.scaleY,
|
|
79098
|
+
rotation: dummyTransformable.rotation,
|
|
79099
|
+
style: {
|
|
79100
|
+
x: labelStyle.x,
|
|
79101
|
+
y: labelStyle.y,
|
|
79102
|
+
align: labelStyle.align,
|
|
79103
|
+
verticalAlign: labelStyle.verticalAlign,
|
|
79104
|
+
width: labelStyle.width,
|
|
79105
|
+
height: labelStyle.height,
|
|
79106
|
+
fontSize: labelStyle.fontSize
|
|
79107
|
+
},
|
|
79108
|
+
cursor: label.cursor,
|
|
79109
|
+
attachedPos: textConfig.position,
|
|
79110
|
+
attachedRot: textConfig.rotation
|
|
79111
|
+
}
|
|
79112
|
+
});
|
|
79113
|
+
};
|
|
79114
|
+
LabelManager.prototype.addLabelsOfSeries = function (chartView) {
|
|
79115
|
+
var _this = this;
|
|
79116
|
+
this._chartViewList.push(chartView);
|
|
79117
|
+
var seriesModel = chartView.__model;
|
|
79118
|
+
var layoutOption = seriesModel.get('labelLayout');
|
|
79119
|
+
/**
|
|
79120
|
+
* Ignore layouting if it's not specified anything.
|
|
79121
|
+
*/
|
|
79122
|
+
if (!(isFunction$1(layoutOption) || keys(layoutOption).length)) {
|
|
79123
|
+
return;
|
|
79124
|
+
}
|
|
79125
|
+
chartView.group.traverse(function (child) {
|
|
79126
|
+
if (child.ignore) {
|
|
79127
|
+
return true; // Stop traverse descendants.
|
|
79128
|
+
}
|
|
79129
|
+
// Only support label being hosted on graphic elements.
|
|
79130
|
+
var textEl = child.getTextContent();
|
|
79131
|
+
var ecData = getECData(child);
|
|
79132
|
+
// Can only attach the text on the element with dataIndex
|
|
79133
|
+
if (textEl && !textEl.disableLabelLayout) {
|
|
79134
|
+
_this._addLabel(ecData.dataIndex, ecData.dataType, seriesModel, textEl, layoutOption);
|
|
79135
|
+
}
|
|
79136
|
+
});
|
|
79137
|
+
};
|
|
79138
|
+
LabelManager.prototype.updateLayoutConfig = function (api) {
|
|
79139
|
+
var width = api.getWidth();
|
|
79140
|
+
var height = api.getHeight();
|
|
79141
|
+
function createDragHandler(el, labelLineModel) {
|
|
79142
|
+
return function () {
|
|
79143
|
+
updateLabelLinePoints(el, labelLineModel);
|
|
79144
|
+
};
|
|
79145
|
+
}
|
|
79146
|
+
for (var i = 0; i < this._labelList.length; i++) {
|
|
79147
|
+
var labelItem = this._labelList[i];
|
|
79148
|
+
var label = labelItem.label;
|
|
79149
|
+
var hostEl = label.__hostTarget;
|
|
79150
|
+
var defaultLabelAttr = labelItem.defaultAttr;
|
|
79151
|
+
var layoutOption = void 0;
|
|
79152
|
+
// TODO A global layout option?
|
|
79153
|
+
if (isFunction$1(labelItem.layoutOptionOrCb)) {
|
|
79154
|
+
layoutOption = labelItem.layoutOptionOrCb(prepareLayoutCallbackParams(labelItem, hostEl));
|
|
79155
|
+
} else {
|
|
79156
|
+
layoutOption = labelItem.layoutOptionOrCb;
|
|
79157
|
+
}
|
|
79158
|
+
layoutOption = layoutOption || {};
|
|
79159
|
+
labelItem.layoutOption = layoutOption;
|
|
79160
|
+
var degreeToRadian = Math.PI / 180;
|
|
79161
|
+
// TODO hostEl should always exists.
|
|
79162
|
+
// Or label should not have parent because the x, y is all in global space.
|
|
79163
|
+
if (hostEl) {
|
|
79164
|
+
hostEl.setTextConfig({
|
|
79165
|
+
// Force to set local false.
|
|
79166
|
+
local: false,
|
|
79167
|
+
// Ignore position and rotation config on the host el if x or y is changed.
|
|
79168
|
+
position: layoutOption.x != null || layoutOption.y != null ? null : defaultLabelAttr.attachedPos,
|
|
79169
|
+
// Ignore rotation config on the host el if rotation is changed.
|
|
79170
|
+
rotation: layoutOption.rotate != null ? layoutOption.rotate * degreeToRadian : defaultLabelAttr.attachedRot,
|
|
79171
|
+
offset: [layoutOption.dx || 0, layoutOption.dy || 0]
|
|
79172
|
+
});
|
|
79173
|
+
}
|
|
79174
|
+
var needsUpdateLabelLine = false;
|
|
79175
|
+
if (layoutOption.x != null) {
|
|
79176
|
+
// TODO width of chart view.
|
|
79177
|
+
label.x = parsePercent(layoutOption.x, width);
|
|
79178
|
+
label.setStyle('x', 0); // Ignore movement in style. TODO: origin.
|
|
79179
|
+
needsUpdateLabelLine = true;
|
|
79180
|
+
} else {
|
|
79181
|
+
label.x = defaultLabelAttr.x;
|
|
79182
|
+
label.setStyle('x', defaultLabelAttr.style.x);
|
|
79183
|
+
}
|
|
79184
|
+
if (layoutOption.y != null) {
|
|
79185
|
+
// TODO height of chart view.
|
|
79186
|
+
label.y = parsePercent(layoutOption.y, height);
|
|
79187
|
+
label.setStyle('y', 0); // Ignore movement in style.
|
|
79188
|
+
needsUpdateLabelLine = true;
|
|
79189
|
+
} else {
|
|
79190
|
+
label.y = defaultLabelAttr.y;
|
|
79191
|
+
label.setStyle('y', defaultLabelAttr.style.y);
|
|
79192
|
+
}
|
|
79193
|
+
if (layoutOption.labelLinePoints) {
|
|
79194
|
+
var guideLine = hostEl.getTextGuideLine();
|
|
79195
|
+
if (guideLine) {
|
|
79196
|
+
guideLine.setShape({
|
|
79197
|
+
points: layoutOption.labelLinePoints
|
|
79198
|
+
});
|
|
79199
|
+
// Not update
|
|
79200
|
+
needsUpdateLabelLine = false;
|
|
79201
|
+
}
|
|
79202
|
+
}
|
|
79203
|
+
var labelLayoutStore = labelLayoutInnerStore(label);
|
|
79204
|
+
labelLayoutStore.needsUpdateLabelLine = needsUpdateLabelLine;
|
|
79205
|
+
label.rotation = layoutOption.rotate != null ? layoutOption.rotate * degreeToRadian : defaultLabelAttr.rotation;
|
|
79206
|
+
label.scaleX = defaultLabelAttr.scaleX;
|
|
79207
|
+
label.scaleY = defaultLabelAttr.scaleY;
|
|
79208
|
+
for (var k = 0; k < LABEL_OPTION_TO_STYLE_KEYS.length; k++) {
|
|
79209
|
+
var key = LABEL_OPTION_TO_STYLE_KEYS[k];
|
|
79210
|
+
label.setStyle(key, layoutOption[key] != null ? layoutOption[key] : defaultLabelAttr.style[key]);
|
|
79211
|
+
}
|
|
79212
|
+
if (layoutOption.draggable) {
|
|
79213
|
+
label.draggable = true;
|
|
79214
|
+
label.cursor = 'move';
|
|
79215
|
+
if (hostEl) {
|
|
79216
|
+
var hostModel = labelItem.seriesModel;
|
|
79217
|
+
if (labelItem.dataIndex != null) {
|
|
79218
|
+
var data = labelItem.seriesModel.getData(labelItem.dataType);
|
|
79219
|
+
hostModel = data.getItemModel(labelItem.dataIndex);
|
|
79220
|
+
}
|
|
79221
|
+
label.on('drag', createDragHandler(hostEl, hostModel.getModel('labelLine')));
|
|
79222
|
+
}
|
|
79223
|
+
} else {
|
|
79224
|
+
// TODO Other drag functions?
|
|
79225
|
+
label.off('drag');
|
|
79226
|
+
label.cursor = defaultLabelAttr.cursor;
|
|
79227
|
+
}
|
|
79228
|
+
}
|
|
79229
|
+
};
|
|
79230
|
+
LabelManager.prototype.layout = function (api) {
|
|
79231
|
+
var width = api.getWidth();
|
|
79232
|
+
var height = api.getHeight();
|
|
79233
|
+
var labelList = [];
|
|
79234
|
+
each$c(this._labelList, function (inputItem) {
|
|
79235
|
+
if (!inputItem.defaultAttr.ignore) {
|
|
79236
|
+
labelList.push(newLabelLayoutWithGeometry({}, inputItem));
|
|
79237
|
+
}
|
|
79238
|
+
});
|
|
79239
|
+
var labelsNeedsAdjustOnX = filter(labelList, function (item) {
|
|
79240
|
+
return item.layoutOption.moveOverlap === 'shiftX';
|
|
79241
|
+
});
|
|
79242
|
+
var labelsNeedsAdjustOnY = filter(labelList, function (item) {
|
|
79243
|
+
return item.layoutOption.moveOverlap === 'shiftY';
|
|
79244
|
+
});
|
|
79245
|
+
shiftLayoutOnXY(labelsNeedsAdjustOnX, 0, 0, width);
|
|
79246
|
+
shiftLayoutOnXY(labelsNeedsAdjustOnY, 1, 0, height);
|
|
79247
|
+
var labelsNeedsHideOverlap = filter(labelList, function (item) {
|
|
79248
|
+
return item.layoutOption.hideOverlap;
|
|
79249
|
+
});
|
|
79250
|
+
restoreIgnore(labelsNeedsHideOverlap);
|
|
79251
|
+
hideOverlap(labelsNeedsHideOverlap);
|
|
79252
|
+
};
|
|
79253
|
+
/**
|
|
79254
|
+
* Process all labels. Not only labels with layoutOption.
|
|
79255
|
+
*/
|
|
79256
|
+
LabelManager.prototype.processLabelsOverall = function () {
|
|
79257
|
+
var _this = this;
|
|
79258
|
+
each$c(this._chartViewList, function (chartView) {
|
|
79259
|
+
var seriesModel = chartView.__model;
|
|
79260
|
+
var ignoreLabelLineUpdate = chartView.ignoreLabelLineUpdate;
|
|
79261
|
+
var animationEnabled = seriesModel.isAnimationEnabled();
|
|
79262
|
+
chartView.group.traverse(function (child) {
|
|
79263
|
+
if (child.ignore && !child.forceLabelAnimation) {
|
|
79264
|
+
return true; // Stop traverse descendants.
|
|
79265
|
+
}
|
|
79266
|
+
var needsUpdateLabelLine = !ignoreLabelLineUpdate;
|
|
79267
|
+
var label = child.getTextContent();
|
|
79268
|
+
if (!needsUpdateLabelLine && label) {
|
|
79269
|
+
needsUpdateLabelLine = labelLayoutInnerStore(label).needsUpdateLabelLine;
|
|
79270
|
+
}
|
|
79271
|
+
if (needsUpdateLabelLine) {
|
|
79272
|
+
_this._updateLabelLine(child, seriesModel);
|
|
79273
|
+
}
|
|
79274
|
+
if (animationEnabled) {
|
|
79275
|
+
_this._animateLabels(child, seriesModel);
|
|
79276
|
+
}
|
|
79277
|
+
});
|
|
79278
|
+
});
|
|
79279
|
+
};
|
|
79280
|
+
LabelManager.prototype._updateLabelLine = function (el, seriesModel) {
|
|
79281
|
+
// Only support label being hosted on graphic elements.
|
|
79282
|
+
var textEl = el.getTextContent();
|
|
79283
|
+
// Update label line style.
|
|
79284
|
+
var ecData = getECData(el);
|
|
79285
|
+
var dataIndex = ecData.dataIndex;
|
|
79286
|
+
// Only support labelLine on the labels represent data.
|
|
79287
|
+
if (textEl && dataIndex != null) {
|
|
79288
|
+
var data = seriesModel.getData(ecData.dataType);
|
|
79289
|
+
var itemModel = data.getItemModel(dataIndex);
|
|
79290
|
+
var defaultStyle = {};
|
|
79291
|
+
var visualStyle = data.getItemVisual(dataIndex, 'style');
|
|
79292
|
+
if (visualStyle) {
|
|
79293
|
+
var visualType = data.getVisual('drawType');
|
|
79294
|
+
// Default to be same with main color
|
|
79295
|
+
defaultStyle.stroke = visualStyle[visualType];
|
|
79296
|
+
}
|
|
79297
|
+
var labelLineModel = itemModel.getModel('labelLine');
|
|
79298
|
+
setLabelLineStyle(el, getLabelLineStatesModels(itemModel), defaultStyle);
|
|
79299
|
+
updateLabelLinePoints(el, labelLineModel);
|
|
79300
|
+
}
|
|
79301
|
+
};
|
|
79302
|
+
LabelManager.prototype._animateLabels = function (el, seriesModel) {
|
|
79303
|
+
var textEl = el.getTextContent();
|
|
79304
|
+
var guideLine = el.getTextGuideLine();
|
|
79305
|
+
// Animate
|
|
79306
|
+
if (textEl
|
|
79307
|
+
// `forceLabelAnimation` has the highest priority
|
|
79308
|
+
&& (el.forceLabelAnimation || !textEl.ignore && !textEl.invisible && !el.disableLabelAnimation && !isElementRemoved(el))) {
|
|
79309
|
+
var layoutStore = labelLayoutInnerStore(textEl);
|
|
79310
|
+
var oldLayout = layoutStore.oldLayout;
|
|
79311
|
+
var ecData = getECData(el);
|
|
79312
|
+
var dataIndex = ecData.dataIndex;
|
|
79313
|
+
var newProps = {
|
|
79314
|
+
x: textEl.x,
|
|
79315
|
+
y: textEl.y,
|
|
79316
|
+
rotation: textEl.rotation
|
|
79317
|
+
};
|
|
79318
|
+
var data = seriesModel.getData(ecData.dataType);
|
|
79319
|
+
if (!oldLayout) {
|
|
79320
|
+
textEl.attr(newProps);
|
|
79321
|
+
// Disable fade in animation if value animation is enabled.
|
|
79322
|
+
if (!labelInner(textEl).valueAnimation) {
|
|
79323
|
+
var oldOpacity = retrieve2(textEl.style.opacity, 1);
|
|
79324
|
+
// Fade in animation
|
|
79325
|
+
textEl.style.opacity = 0;
|
|
79326
|
+
initProps(textEl, {
|
|
79327
|
+
style: {
|
|
79328
|
+
opacity: oldOpacity
|
|
79329
|
+
}
|
|
79330
|
+
}, seriesModel, dataIndex);
|
|
79331
|
+
}
|
|
79332
|
+
} else {
|
|
79333
|
+
textEl.attr(oldLayout);
|
|
79334
|
+
// Make sure the animation from is in the right status.
|
|
79335
|
+
var prevStates = el.prevStates;
|
|
79336
|
+
if (prevStates) {
|
|
79337
|
+
if (indexOf(prevStates, 'select') >= 0) {
|
|
79338
|
+
textEl.attr(layoutStore.oldLayoutSelect);
|
|
79339
|
+
}
|
|
79340
|
+
if (indexOf(prevStates, 'emphasis') >= 0) {
|
|
79341
|
+
textEl.attr(layoutStore.oldLayoutEmphasis);
|
|
79342
|
+
}
|
|
79343
|
+
}
|
|
79344
|
+
updateProps$1(textEl, newProps, seriesModel, dataIndex);
|
|
79345
|
+
}
|
|
79346
|
+
layoutStore.oldLayout = newProps;
|
|
79347
|
+
if (textEl.states.select) {
|
|
79348
|
+
var layoutSelect = layoutStore.oldLayoutSelect = {};
|
|
79349
|
+
extendWithKeys(layoutSelect, newProps, LABEL_LAYOUT_PROPS);
|
|
79350
|
+
extendWithKeys(layoutSelect, textEl.states.select, LABEL_LAYOUT_PROPS);
|
|
79351
|
+
}
|
|
79352
|
+
if (textEl.states.emphasis) {
|
|
79353
|
+
var layoutEmphasis = layoutStore.oldLayoutEmphasis = {};
|
|
79354
|
+
extendWithKeys(layoutEmphasis, newProps, LABEL_LAYOUT_PROPS);
|
|
79355
|
+
extendWithKeys(layoutEmphasis, textEl.states.emphasis, LABEL_LAYOUT_PROPS);
|
|
79356
|
+
}
|
|
79357
|
+
animateLabelValue(textEl, dataIndex, data, seriesModel, seriesModel);
|
|
79358
|
+
}
|
|
79359
|
+
if (guideLine && !guideLine.ignore && !guideLine.invisible) {
|
|
79360
|
+
var layoutStore = labelLineAnimationStore(guideLine);
|
|
79361
|
+
var oldLayout = layoutStore.oldLayout;
|
|
79362
|
+
var newLayout = {
|
|
79363
|
+
points: guideLine.shape.points
|
|
79364
|
+
};
|
|
79365
|
+
if (!oldLayout) {
|
|
79366
|
+
guideLine.setShape(newLayout);
|
|
79367
|
+
guideLine.style.strokePercent = 0;
|
|
79368
|
+
initProps(guideLine, {
|
|
79369
|
+
style: {
|
|
79370
|
+
strokePercent: 1
|
|
79371
|
+
}
|
|
79372
|
+
}, seriesModel);
|
|
79373
|
+
} else {
|
|
79374
|
+
guideLine.attr({
|
|
79375
|
+
shape: oldLayout
|
|
79376
|
+
});
|
|
79377
|
+
updateProps$1(guideLine, {
|
|
79378
|
+
shape: newLayout
|
|
79379
|
+
}, seriesModel);
|
|
79380
|
+
}
|
|
79381
|
+
layoutStore.oldLayout = newLayout;
|
|
79382
|
+
}
|
|
79383
|
+
};
|
|
79384
|
+
return LabelManager;
|
|
79385
|
+
}();
|
|
79386
|
+
|
|
79387
|
+
var getLabelManager = makeInner();
|
|
79388
|
+
function installLabelLayout(registers) {
|
|
79389
|
+
registers.registerUpdateLifecycle('series:beforeupdate', function (ecModel, api, params) {
|
|
79390
|
+
// TODO api provide an namespace that can save stuff per instance
|
|
79391
|
+
var labelManager = getLabelManager(api).labelManager;
|
|
79392
|
+
if (!labelManager) {
|
|
79393
|
+
labelManager = getLabelManager(api).labelManager = new LabelManager();
|
|
79394
|
+
}
|
|
79395
|
+
labelManager.clearLabels();
|
|
79396
|
+
});
|
|
79397
|
+
registers.registerUpdateLifecycle('series:layoutlabels', function (ecModel, api, params) {
|
|
79398
|
+
var labelManager = getLabelManager(api).labelManager;
|
|
79399
|
+
params.updatedSeries.forEach(function (series) {
|
|
79400
|
+
labelManager.addLabelsOfSeries(api.getViewOfSeriesModel(series));
|
|
79401
|
+
});
|
|
79402
|
+
labelManager.updateLayoutConfig(api);
|
|
79403
|
+
labelManager.layout(api);
|
|
79404
|
+
labelManager.processLabelsOverall();
|
|
79405
|
+
});
|
|
79406
|
+
}
|
|
79407
|
+
|
|
79408
|
+
use(installLabelLayout);
|
|
79409
|
+
|
|
79410
|
+
/*
|
|
79411
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
79412
|
+
* or more contributor license agreements. See the NOTICE file
|
|
79413
|
+
* distributed with this work for additional information
|
|
79414
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
79415
|
+
* to you under the Apache License, Version 2.0 (the
|
|
79416
|
+
* "License"); you may not use this file except in compliance
|
|
79417
|
+
* with the License. You may obtain a copy of the License at
|
|
79418
|
+
*
|
|
79419
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
79420
|
+
*
|
|
79421
|
+
* Unless required by applicable law or agreed to in writing,
|
|
79422
|
+
* software distributed under the License is distributed on an
|
|
79423
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
79424
|
+
* KIND, either express or implied. See the License for the
|
|
79425
|
+
* specific language governing permissions and limitations
|
|
79426
|
+
* under the License.
|
|
79427
|
+
*/
|
|
79428
|
+
|
|
79429
|
+
var core = /*#__PURE__*/Object.freeze({
|
|
79430
|
+
__proto__: null,
|
|
79431
|
+
Axis: Axis,
|
|
79432
|
+
ChartView: ChartView,
|
|
79433
|
+
ComponentModel: ComponentModel,
|
|
79434
|
+
ComponentView: ComponentView,
|
|
79435
|
+
List: SeriesData,
|
|
79436
|
+
Model: Model,
|
|
79437
|
+
PRIORITY: PRIORITY,
|
|
79438
|
+
SeriesModel: SeriesModel,
|
|
79439
|
+
color: color$2,
|
|
79440
|
+
connect: connect,
|
|
79441
|
+
dataTool: dataTool,
|
|
79442
|
+
dependencies: dependencies,
|
|
79443
|
+
disConnect: disConnect,
|
|
79444
|
+
disconnect: disconnect,
|
|
79445
|
+
dispose: dispose,
|
|
79446
|
+
env: env,
|
|
79447
|
+
extendChartView: extendChartView,
|
|
79448
|
+
extendComponentModel: extendComponentModel,
|
|
79449
|
+
extendComponentView: extendComponentView,
|
|
79450
|
+
extendSeriesModel: extendSeriesModel,
|
|
79451
|
+
format: format,
|
|
79452
|
+
getCoordinateSystemDimensions: getCoordinateSystemDimensions,
|
|
79453
|
+
getInstanceByDom: getInstanceByDom,
|
|
79454
|
+
getInstanceById: getInstanceById,
|
|
79455
|
+
getMap: getMap,
|
|
79456
|
+
graphic: graphic$1,
|
|
79457
|
+
helper: helper,
|
|
79458
|
+
init: init,
|
|
79459
|
+
innerDrawElementOnCanvas: brushSingle,
|
|
79460
|
+
matrix: matrix,
|
|
79461
|
+
number: number,
|
|
79462
|
+
parseGeoJSON: parseGeoJSON,
|
|
79463
|
+
parseGeoJson: parseGeoJSON,
|
|
79464
|
+
registerAction: registerAction,
|
|
79465
|
+
registerCoordinateSystem: registerCoordinateSystem,
|
|
79466
|
+
registerCustomSeries: registerCustomSeries,
|
|
79467
|
+
registerLayout: registerLayout,
|
|
79468
|
+
registerLoading: registerLoading,
|
|
79469
|
+
registerLocale: registerLocale,
|
|
79470
|
+
registerMap: registerMap$1,
|
|
79471
|
+
registerPostInit: registerPostInit,
|
|
79472
|
+
registerPostUpdate: registerPostUpdate,
|
|
79473
|
+
registerPreprocessor: registerPreprocessor,
|
|
79474
|
+
registerProcessor: registerProcessor,
|
|
79475
|
+
registerTheme: registerTheme,
|
|
79476
|
+
registerTransform: registerTransform,
|
|
79477
|
+
registerUpdateLifecycle: registerUpdateLifecycle,
|
|
79478
|
+
registerVisual: registerVisual,
|
|
79479
|
+
setCanvasCreator: setCanvasCreator,
|
|
79480
|
+
setPlatformAPI: setPlatformAPI,
|
|
79481
|
+
throttle: throttle,
|
|
79482
|
+
time: time,
|
|
79483
|
+
use: use,
|
|
79484
|
+
util: util,
|
|
79485
|
+
vector: vector,
|
|
79486
|
+
version: version$1,
|
|
79487
|
+
zrUtil: util$1,
|
|
79488
|
+
zrender: zrender
|
|
79489
|
+
});
|
|
79490
|
+
|
|
78140
79491
|
var LineSeriesModel = /** @class */function (_super) {
|
|
78141
79492
|
__extends(LineSeriesModel, _super);
|
|
78142
79493
|
function LineSeriesModel() {
|
|
@@ -83900,8 +85251,7 @@ function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultO
|
|
|
83900
85251
|
return this.__ordinalMeta;
|
|
83901
85252
|
};
|
|
83902
85253
|
AxisModel.prototype.updateAxisBreaks = function (payload) {
|
|
83903
|
-
|
|
83904
|
-
return axisBreakHelper ? axisBreakHelper.updateModelAxisBreak(this, payload) : {
|
|
85254
|
+
return {
|
|
83905
85255
|
breaks: []
|
|
83906
85256
|
};
|
|
83907
85257
|
};
|
|
@@ -84592,7 +85942,7 @@ var builders = {
|
|
|
84592
85942
|
y: pos.y,
|
|
84593
85943
|
rotation: labelLayout.rotation,
|
|
84594
85944
|
silent: AxisBuilder.isLabelSilent(axisModel),
|
|
84595
|
-
style: createTextStyle(textStyleModel, {
|
|
85945
|
+
style: createTextStyle$1(textStyleModel, {
|
|
84596
85946
|
text: name,
|
|
84597
85947
|
font: textFont,
|
|
84598
85948
|
overflow: 'truncate',
|
|
@@ -84945,7 +86295,7 @@ function buildAxisLabel(cfg, local, group, kind, axisModel, api) {
|
|
|
84945
86295
|
// --- transform props end ---
|
|
84946
86296
|
silent: AxisBuilder.isLabelSilent(axisModel),
|
|
84947
86297
|
z2: z2,
|
|
84948
|
-
style: createTextStyle(itemLabelModel, {
|
|
86298
|
+
style: createTextStyle$1(itemLabelModel, {
|
|
84949
86299
|
text: formattedLabel,
|
|
84950
86300
|
align: index === 0 ? alignMin : index === labels.length - 1 ? alignMax : align,
|
|
84951
86301
|
verticalAlign: index === 0 ? verticalAlignMin : index === labels.length - 1 ? verticalAlignMax : verticalAlign,
|
|
@@ -92710,7 +94060,7 @@ var Breadcrumb = /** @class */function () {
|
|
|
92710
94060
|
lineJoin: 'bevel'
|
|
92711
94061
|
}),
|
|
92712
94062
|
textContent: new ZRText({
|
|
92713
|
-
style: createTextStyle(textStyleModel, {
|
|
94063
|
+
style: createTextStyle$1(textStyleModel, {
|
|
92714
94064
|
text: text
|
|
92715
94065
|
})
|
|
92716
94066
|
}),
|
|
@@ -92721,7 +94071,7 @@ var Breadcrumb = /** @class */function () {
|
|
|
92721
94071
|
onclick: curry$1(onSelect, itemNode)
|
|
92722
94072
|
});
|
|
92723
94073
|
el.disableLabelAnimation = true;
|
|
92724
|
-
el.getTextContent().ensureState('emphasis').style = createTextStyle(emphasisTextStyleModel, {
|
|
94074
|
+
el.getTextContent().ensureState('emphasis').style = createTextStyle$1(emphasisTextStyleModel, {
|
|
92725
94075
|
text: text
|
|
92726
94076
|
});
|
|
92727
94077
|
el.ensureState('emphasis').style = emphasisItemStyle;
|
|
@@ -96917,7 +98267,7 @@ function formatLabel(value, labelFormatter) {
|
|
|
96917
98267
|
}
|
|
96918
98268
|
if (rotate === 0) {
|
|
96919
98269
|
group.add(new ZRText({
|
|
96920
|
-
style: createTextStyle(labelModel, {
|
|
98270
|
+
style: createTextStyle$1(labelModel, {
|
|
96921
98271
|
text: label,
|
|
96922
98272
|
x: textStyleX,
|
|
96923
98273
|
y: textStyleY,
|
|
@@ -96930,7 +98280,7 @@ function formatLabel(value, labelFormatter) {
|
|
|
96930
98280
|
}));
|
|
96931
98281
|
} else {
|
|
96932
98282
|
group.add(new ZRText({
|
|
96933
|
-
style: createTextStyle(labelModel, {
|
|
98283
|
+
style: createTextStyle$1(labelModel, {
|
|
96934
98284
|
text: label,
|
|
96935
98285
|
x: textStyleX,
|
|
96936
98286
|
y: textStyleY,
|
|
@@ -97190,7 +98540,7 @@ function formatLabel(value, labelFormatter) {
|
|
|
97190
98540
|
var labelEl = newTitleEls[idx];
|
|
97191
98541
|
labelEl.attr({
|
|
97192
98542
|
z2: showPointerAbove ? 0 : 2,
|
|
97193
|
-
style: createTextStyle(itemTitleModel, {
|
|
98543
|
+
style: createTextStyle$1(itemTitleModel, {
|
|
97194
98544
|
x: titleX,
|
|
97195
98545
|
y: titleY,
|
|
97196
98546
|
text: data.getName(idx),
|
|
@@ -97214,7 +98564,7 @@ function formatLabel(value, labelFormatter) {
|
|
|
97214
98564
|
var formatter_1 = itemDetailModel.get('formatter');
|
|
97215
98565
|
labelEl.attr({
|
|
97216
98566
|
z2: showPointerAbove ? 0 : 2,
|
|
97217
|
-
style: createTextStyle(itemDetailModel, {
|
|
98567
|
+
style: createTextStyle$1(itemDetailModel, {
|
|
97218
98568
|
x: detailX,
|
|
97219
98569
|
y: detailY,
|
|
97220
98570
|
text: formatLabel(value, formatter_1),
|
|
@@ -103201,7 +104551,7 @@ var SunburstPiece = /** @class */function (_super) {
|
|
|
103201
104551
|
if (isNormal) {
|
|
103202
104552
|
text = text || _this.node.name;
|
|
103203
104553
|
}
|
|
103204
|
-
state.style = createTextStyle(labelStateModel, {}, null, stateName !== 'normal', true);
|
|
104554
|
+
state.style = createTextStyle$1(labelStateModel, {}, null, stateName !== 'normal', true);
|
|
103205
104555
|
if (text) {
|
|
103206
104556
|
state.style.text = text;
|
|
103207
104557
|
}
|
|
@@ -105106,7 +106456,7 @@ function makeRenderItem(customSeries, data, ecModel, api) {
|
|
|
105106
106456
|
// Now that the feature of "auto adjust text fill/stroke" has been migrated to zrender
|
|
105107
106457
|
// since ec5, we should set `isAttached` as `false` here and make compat in
|
|
105108
106458
|
// `convertToEC4StyleForCustomSerise`.
|
|
105109
|
-
var textStyle = createTextStyle(labelModel, null, opt, false, true);
|
|
106459
|
+
var textStyle = createTextStyle$1(labelModel, null, opt, false, true);
|
|
105110
106460
|
textStyle.text = labelModel.getShallow('show') ? retrieve2(customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null;
|
|
105111
106461
|
var textConfig = createTextConfig(labelModel, opt, false);
|
|
105112
106462
|
preFetchFromExtra(userProps, itemStyle);
|
|
@@ -105127,7 +106477,7 @@ function makeRenderItem(customSeries, data, ecModel, api) {
|
|
|
105127
106477
|
dataIndexInside == null && (dataIndexInside = currDataIndexInside);
|
|
105128
106478
|
var itemStyle = getItemStyleModel(dataIndexInside, EMPHASIS).getItemStyle();
|
|
105129
106479
|
var labelModel = getLabelModel(dataIndexInside, EMPHASIS);
|
|
105130
|
-
var textStyle = createTextStyle(labelModel, null, null, true, true);
|
|
106480
|
+
var textStyle = createTextStyle$1(labelModel, null, null, true, true);
|
|
105131
106481
|
textStyle.text = labelModel.getShallow('show') ? retrieve3(customSeries.getFormattedLabel(dataIndexInside, EMPHASIS), customSeries.getFormattedLabel(dataIndexInside, NORMAL), getDefaultLabel(data, dataIndexInside)) : null;
|
|
105132
106482
|
var textConfig = createTextConfig(labelModel, null, true);
|
|
105133
106483
|
preFetchFromExtra(userProps, itemStyle);
|
|
@@ -105924,7 +107274,7 @@ function buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos
|
|
|
105924
107274
|
// shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},
|
|
105925
107275
|
x: position[0],
|
|
105926
107276
|
y: position[1],
|
|
105927
|
-
style: createTextStyle(labelModel, {
|
|
107277
|
+
style: createTextStyle$1(labelModel, {
|
|
105928
107278
|
text: text,
|
|
105929
107279
|
font: font,
|
|
105930
107280
|
fill: labelModel.getTextColor(),
|
|
@@ -107131,7 +108481,7 @@ var angelAxisElementsBuilders = {
|
|
|
107131
108481
|
}
|
|
107132
108482
|
var textEl = new ZRText({
|
|
107133
108483
|
silent: AxisBuilder.isLabelSilent(angleAxisModel),
|
|
107134
|
-
style: createTextStyle(labelModel, {
|
|
108484
|
+
style: createTextStyle$1(labelModel, {
|
|
107135
108485
|
x: p[0],
|
|
107136
108486
|
y: p[1],
|
|
107137
108487
|
fill: labelModel.getTextColor() || angleAxisModel.get(['axisLine', 'lineStyle', 'color']),
|
|
@@ -108056,7 +109406,7 @@ function mergeAndNormalizeLayoutParams$1(target, raw) {
|
|
|
108056
109406
|
var content = this._formatterLabel(formatter, params);
|
|
108057
109407
|
var yearText = new ZRText({
|
|
108058
109408
|
z2: 30,
|
|
108059
|
-
style: createTextStyle(yearLabel, {
|
|
109409
|
+
style: createTextStyle$1(yearLabel, {
|
|
108060
109410
|
text: content
|
|
108061
109411
|
}),
|
|
108062
109412
|
silent: yearLabel.get('silent')
|
|
@@ -108137,7 +109487,7 @@ function mergeAndNormalizeLayoutParams$1(target, raw) {
|
|
|
108137
109487
|
var content = this._formatterLabel(formatter, params);
|
|
108138
109488
|
var monthText = new ZRText({
|
|
108139
109489
|
z2: 30,
|
|
108140
|
-
style: extend(createTextStyle(monthLabel, {
|
|
109490
|
+
style: extend(createTextStyle$1(monthLabel, {
|
|
108141
109491
|
text: content
|
|
108142
109492
|
}), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin)),
|
|
108143
109493
|
silent: labelSilent
|
|
@@ -108202,7 +109552,7 @@ function mergeAndNormalizeLayoutParams$1(target, raw) {
|
|
|
108202
109552
|
day = Math.abs((i + firstDayOfWeek) % 7);
|
|
108203
109553
|
var weekText = new ZRText({
|
|
108204
109554
|
z2: 30,
|
|
108205
|
-
style: extend(createTextStyle(dayLabel, {
|
|
109555
|
+
style: extend(createTextStyle$1(dayLabel, {
|
|
108206
109556
|
text: nameMap[day]
|
|
108207
109557
|
}), this._weekTextPositionControl(point, orient, pos, margin, cellSize)),
|
|
108208
109558
|
silent: labelSilent
|
|
@@ -113546,7 +114896,7 @@ var TooltipView = /** @class */function (_super) {
|
|
|
113546
114896
|
var isTimeAxis = params0 && params0.axisType && params0.axisType.indexOf('time') >= 0;
|
|
113547
114897
|
html = formatter;
|
|
113548
114898
|
if (isTimeAxis) {
|
|
113549
|
-
html = format(params0.axisValue, html, useUTC);
|
|
114899
|
+
html = format$1(params0.axisValue, html, useUTC);
|
|
113550
114900
|
}
|
|
113551
114901
|
html = formatTpl(html, params, true);
|
|
113552
114902
|
} else if (isFunction$1(formatter)) {
|
|
@@ -114683,7 +116033,7 @@ var TitleView = /** @class */function (_super) {
|
|
|
114683
116033
|
var textAlign = titleModel.get('textAlign');
|
|
114684
116034
|
var textVerticalAlign = retrieve2(titleModel.get('textBaseline'), titleModel.get('textVerticalAlign'));
|
|
114685
116035
|
var textEl = new ZRText({
|
|
114686
|
-
style: createTextStyle(textStyleModel, {
|
|
116036
|
+
style: createTextStyle$1(textStyleModel, {
|
|
114687
116037
|
text: titleModel.get('text'),
|
|
114688
116038
|
fill: textStyleModel.getTextColor()
|
|
114689
116039
|
}, {
|
|
@@ -114694,7 +116044,7 @@ var TitleView = /** @class */function (_super) {
|
|
|
114694
116044
|
var textRect = textEl.getBoundingRect();
|
|
114695
116045
|
var subText = titleModel.get('subtext');
|
|
114696
116046
|
var subTextEl = new ZRText({
|
|
114697
|
-
style: createTextStyle(subtextStyleModel, {
|
|
116047
|
+
style: createTextStyle$1(subtextStyleModel, {
|
|
114698
116048
|
text: subText,
|
|
114699
116049
|
fill: subtextStyleModel.getTextColor(),
|
|
114700
116050
|
y: textRect.height + titleModel.get('itemGap'),
|
|
@@ -115392,14 +116742,14 @@ var labelDataIndexStore = makeInner();
|
|
|
115392
116742
|
rotation: layoutInfo.labelRotation - layoutInfo.rotation,
|
|
115393
116743
|
onclick: bind$1(_this._changeTimeline, _this, dataIndex),
|
|
115394
116744
|
silent: false,
|
|
115395
|
-
style: createTextStyle(normalLabelModel, {
|
|
116745
|
+
style: createTextStyle$1(normalLabelModel, {
|
|
115396
116746
|
text: labelItem.formattedLabel,
|
|
115397
116747
|
align: layoutInfo.labelAlign,
|
|
115398
116748
|
verticalAlign: layoutInfo.labelBaseline
|
|
115399
116749
|
})
|
|
115400
116750
|
});
|
|
115401
|
-
textEl.ensureState('emphasis').style = createTextStyle(hoverLabelModel);
|
|
115402
|
-
textEl.ensureState('progress').style = createTextStyle(progressLabelModel);
|
|
116751
|
+
textEl.ensureState('emphasis').style = createTextStyle$1(hoverLabelModel);
|
|
116752
|
+
textEl.ensureState('progress').style = createTextStyle$1(progressLabelModel);
|
|
115403
116753
|
group.add(textEl);
|
|
115404
116754
|
enableHoverEmphasis(textEl);
|
|
115405
116755
|
labelDataIndexStore(textEl).dataIndex = dataIndex;
|
|
@@ -117467,7 +118817,7 @@ var LegendView = /** @class */function (_super) {
|
|
|
117467
118817
|
}
|
|
117468
118818
|
var textColor = isSelected ? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor');
|
|
117469
118819
|
itemGroup.add(new ZRText({
|
|
117470
|
-
style: createTextStyle(textStyleModel, {
|
|
118820
|
+
style: createTextStyle$1(textStyleModel, {
|
|
117471
118821
|
text: content,
|
|
117472
118822
|
x: textX,
|
|
117473
118823
|
y: itemHeight / 2,
|
|
@@ -119179,7 +120529,7 @@ var SliderZoomView = /** @class */function (_super) {
|
|
|
119179
120529
|
thisGroup.add(handleLabels[handleIndex] = new ZRText({
|
|
119180
120530
|
silent: true,
|
|
119181
120531
|
invisible: !handleLabelShow,
|
|
119182
|
-
style: createTextStyle(textStyleModel, {
|
|
120532
|
+
style: createTextStyle$1(textStyleModel, {
|
|
119183
120533
|
x: 0,
|
|
119184
120534
|
y: 0,
|
|
119185
120535
|
text: '',
|
|
@@ -120386,7 +121736,7 @@ var ContinuousView = /** @class */function (_super) {
|
|
|
120386
121736
|
var orient = this._orient;
|
|
120387
121737
|
var textStyleModel = this.visualMapModel.textStyleModel;
|
|
120388
121738
|
this.group.add(new ZRText({
|
|
120389
|
-
style: createTextStyle(textStyleModel, {
|
|
121739
|
+
style: createTextStyle$1(textStyleModel, {
|
|
120390
121740
|
x: position[0],
|
|
120391
121741
|
y: position[1],
|
|
120392
121742
|
verticalAlign: textStyleModel.get('verticalAlign') || (orient === 'horizontal' ? 'middle' : align),
|
|
@@ -120470,7 +121820,7 @@ var ContinuousView = /** @class */function (_super) {
|
|
|
120470
121820
|
stop(e.event);
|
|
120471
121821
|
},
|
|
120472
121822
|
ondragend: onDragEnd,
|
|
120473
|
-
style: createTextStyle(textStyleModel, {
|
|
121823
|
+
style: createTextStyle$1(textStyleModel, {
|
|
120474
121824
|
x: 0,
|
|
120475
121825
|
y: 0,
|
|
120476
121826
|
text: ''
|
|
@@ -120517,7 +121867,7 @@ var ContinuousView = /** @class */function (_super) {
|
|
|
120517
121867
|
var indicatorLabel = new ZRText({
|
|
120518
121868
|
silent: true,
|
|
120519
121869
|
invisible: true,
|
|
120520
|
-
style: createTextStyle(textStyleModel, {
|
|
121870
|
+
style: createTextStyle$1(textStyleModel, {
|
|
120521
121871
|
x: 0,
|
|
120522
121872
|
y: 0,
|
|
120523
121873
|
text: ''
|
|
@@ -121542,7 +122892,7 @@ var PiecewiseVisualMapView = /** @class */function (_super) {
|
|
|
121542
122892
|
var visualState = this.visualMapModel.getValueState(representValue);
|
|
121543
122893
|
var align = textStyleModel.get('align') || itemAlign;
|
|
121544
122894
|
itemGroup.add(new ZRText({
|
|
121545
|
-
style: createTextStyle(textStyleModel, {
|
|
122895
|
+
style: createTextStyle$1(textStyleModel, {
|
|
121546
122896
|
x: align === 'right' ? -textGap : itemSize[0] + textGap,
|
|
121547
122897
|
y: itemSize[1] / 2,
|
|
121548
122898
|
text: piece.text,
|
|
@@ -121597,7 +122947,7 @@ var PiecewiseVisualMapView = /** @class */function (_super) {
|
|
|
121597
122947
|
var itemGroup = new Group$3();
|
|
121598
122948
|
var textStyleModel = this.visualMapModel.textStyleModel;
|
|
121599
122949
|
itemGroup.add(new ZRText({
|
|
121600
|
-
style: createTextStyle(textStyleModel, {
|
|
122950
|
+
style: createTextStyle$1(textStyleModel, {
|
|
121601
122951
|
x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2,
|
|
121602
122952
|
y: itemSize[1] / 2,
|
|
121603
122953
|
verticalAlign: 'middle',
|
|
@@ -123054,6 +124404,7 @@ const useChartOps = () => ({
|
|
|
123054
124404
|
"#FFAF20"
|
|
123055
124405
|
]
|
|
123056
124406
|
});
|
|
124407
|
+
const MENU_RESIZE_DELAYS = [50, 100, 200];
|
|
123057
124408
|
const RESIZE_DEBOUNCE_DELAY = 100;
|
|
123058
124409
|
function useChart(options = {}) {
|
|
123059
124410
|
const { initOptions, initDelay = 0, threshold = 0.1, autoTheme = true } = options;
|
|
@@ -123093,8 +124444,18 @@ function useChart(options = {}) {
|
|
|
123093
124444
|
resizeTimeoutId = null;
|
|
123094
124445
|
}, RESIZE_DEBOUNCE_DELAY);
|
|
123095
124446
|
};
|
|
124447
|
+
const multiDelayResize = (delays) => {
|
|
124448
|
+
nextTick(requestAnimationResize);
|
|
124449
|
+
delays.forEach((delay) => {
|
|
124450
|
+
setTimeout(requestAnimationResize, delay);
|
|
124451
|
+
});
|
|
124452
|
+
};
|
|
123096
124453
|
let menuOpenStopHandle = null;
|
|
123097
124454
|
let menuTypeStopHandle = null;
|
|
124455
|
+
const setupMenuWatchers = () => {
|
|
124456
|
+
nextTick(requestAnimationResize);
|
|
124457
|
+
setTimeout(() => multiDelayResize(MENU_RESIZE_DELAYS), 0);
|
|
124458
|
+
};
|
|
123098
124459
|
const cleanupMenuWatchers = () => {
|
|
123099
124460
|
menuOpenStopHandle?.();
|
|
123100
124461
|
menuTypeStopHandle?.();
|
|
@@ -123306,6 +124667,7 @@ function useChart(options = {}) {
|
|
|
123306
124667
|
const performChartInit = (options2) => {
|
|
123307
124668
|
if (!chart && chartRef.value && !isDestroyed) {
|
|
123308
124669
|
chart = init(chartRef.value);
|
|
124670
|
+
setupMenuWatchers();
|
|
123309
124671
|
}
|
|
123310
124672
|
if (chart && !isDestroyed) {
|
|
123311
124673
|
chart.setOption(options2);
|
|
@@ -146091,4 +147453,4 @@ const version = "1.0.0";
|
|
|
146091
147453
|
|
|
146092
147454
|
const install = installer.install;
|
|
146093
147455
|
|
|
146094
|
-
export { AccountTypeEnum, AppItem, FmAddressParsing, FmAutocomplete, FmButton, FmDragImg, FmHBarChart, FmLogin, FmMoreChoose, FmNoticeBar, FmQueryCondition, FmRenderCol, FmRenderComp, FmSelectTable, FmTransfer, FmTree, Fmdatepicker, Fminputdropdown, Fminputtable, Fmselect, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, addressparsing, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone$4 as clone, commonFunction, commonFunctionObj, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, elSvg, emitter, feature, fileToBase64, formatAxis, formatDate, formatPast, getAppItemData, getAppItemText, getBdate, getCountryCode, getEdate, getFileName, getFileUrl, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, i18n, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate$1 as removeDuplicate, request2, service, setIntroduction, setupI18n, showFileUrl, signatureByKSort, tansParams, urlToBase64, useApi, useBaseApi, useChangeColor, useChart, useChartComponent, useChartOps, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };
|
|
147456
|
+
export { AccountTypeEnum, AppItem, FmAddressParsing, FmAutocomplete, FmButton, FmDragImg, FmHBarChart, FmLogin, FmMoreChoose, FmNoticeBar, FmQueryCondition, FmRenderCol, FmRenderComp, FmSelectTable, FmTransfer, FmTree, Fmdatepicker, Fminputdropdown, Fminputtable, Fmselect, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, addressparsing, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone$4 as clone, commonFunction, commonFunctionObj, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, core as echarts, elSvg, emitter, feature, fileToBase64, formatAxis, formatDate, formatPast, getAppItemData, getAppItemText, getBdate, getCountryCode, getEdate, getFileName, getFileUrl, getJWTDate, getToken, getWeek, graphic, hAuth, hAuthAll, hAuths, i18n, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate$1 as removeDuplicate, request2, service, setIntroduction, setupI18n, showFileUrl, signatureByKSort, tansParams, urlToBase64, useApi, useBaseApi, useChangeColor, useChart, useChartComponent, useChartOps, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };
|