@visactor/vrender-components 0.20.15 → 0.20.17

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.
Files changed (66) hide show
  1. package/cjs/axis/type.d.ts +2 -2
  2. package/cjs/axis/type.js.map +1 -1
  3. package/cjs/data-zoom/type.d.ts +1 -1
  4. package/cjs/data-zoom/type.js.map +1 -1
  5. package/cjs/index.d.ts +1 -1
  6. package/cjs/index.js +1 -1
  7. package/cjs/index.js.map +1 -1
  8. package/cjs/interface.js.map +1 -1
  9. package/cjs/label/base.js +12 -7
  10. package/cjs/label/base.js.map +1 -1
  11. package/cjs/label/overlap/place.d.ts +6 -1
  12. package/cjs/label/overlap/place.js +4 -4
  13. package/cjs/label/overlap/place.js.map +1 -1
  14. package/cjs/label/overlap/shiftY.d.ts +10 -4
  15. package/cjs/label/overlap/shiftY.js +103 -27
  16. package/cjs/label/overlap/shiftY.js.map +1 -1
  17. package/cjs/legend/color/type.d.ts +2 -2
  18. package/cjs/legend/color/type.js.map +1 -1
  19. package/cjs/legend/discrete/type.d.ts +1 -1
  20. package/cjs/legend/discrete/type.js.map +1 -1
  21. package/cjs/marker/config.js +32 -0
  22. package/cjs/marker/config.js.map +1 -1
  23. package/cjs/marker/point.js +9 -4
  24. package/cjs/marker/point.js.map +1 -1
  25. package/cjs/marker/type.d.ts +11 -3
  26. package/cjs/marker/type.js +6 -2
  27. package/cjs/marker/type.js.map +1 -1
  28. package/cjs/player/type/discrete-player.d.ts +3 -3
  29. package/cjs/player/type/discrete-player.js.map +1 -1
  30. package/cjs/player/type/index.d.ts +2 -2
  31. package/cjs/player/type/index.js.map +1 -1
  32. package/cjs/timeline/type.js.map +1 -1
  33. package/dist/index.es.js +651 -454
  34. package/es/axis/type.d.ts +2 -2
  35. package/es/axis/type.js.map +1 -1
  36. package/es/data-zoom/type.d.ts +1 -1
  37. package/es/data-zoom/type.js.map +1 -1
  38. package/es/index.d.ts +1 -1
  39. package/es/index.js +1 -1
  40. package/es/index.js.map +1 -1
  41. package/es/interface.js.map +1 -1
  42. package/es/label/base.js +12 -7
  43. package/es/label/base.js.map +1 -1
  44. package/es/label/overlap/place.d.ts +6 -1
  45. package/es/label/overlap/place.js +4 -4
  46. package/es/label/overlap/place.js.map +1 -1
  47. package/es/label/overlap/shiftY.d.ts +10 -4
  48. package/es/label/overlap/shiftY.js +99 -24
  49. package/es/label/overlap/shiftY.js.map +1 -1
  50. package/es/legend/color/type.d.ts +2 -2
  51. package/es/legend/color/type.js.map +1 -1
  52. package/es/legend/discrete/type.d.ts +1 -1
  53. package/es/legend/discrete/type.js.map +1 -1
  54. package/es/marker/config.js +32 -0
  55. package/es/marker/config.js.map +1 -1
  56. package/es/marker/point.js +7 -3
  57. package/es/marker/point.js.map +1 -1
  58. package/es/marker/type.d.ts +11 -3
  59. package/es/marker/type.js +6 -2
  60. package/es/marker/type.js.map +1 -1
  61. package/es/player/type/discrete-player.d.ts +3 -3
  62. package/es/player/type/discrete-player.js.map +1 -1
  63. package/es/player/type/index.d.ts +2 -2
  64. package/es/player/type/index.js.map +1 -1
  65. package/es/timeline/type.js.map +1 -1
  66. package/package.json +10 -9
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, Point, PointService, abs, max, min, atan2, epsilon, Matrix, pi2, Logger, isNumberClose, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, cos, sin, pi, isArray, pointAt, isNumber, getDecimalPlaces, isNil, Color, OBBBounds, has, normalTransform, isValidUrl, isBase64, acos, sqrt, transformBoundsWithMatrix, arrayEqual, getContextFont, rotatePoint, clampAngleByRadian, asin, Bounds, getRectIntersect, isRectIntersect, isPlainObject, merge, clamp, clampRange, normalizePadding, debounce, throttle, hexToRgb, crossProduct, isValid, isEmpty, rectInsideAnotherRect, radianToDegree, getAngleByPoint, polarToCartesian, array, isValidNumber, calculateAnchorOfBounds, computeQuadrant, isGreater, isLess, normalizeAngle, flattenArray, cloneDeep, get, last, isRotateAABBIntersect, mixin, isEqual, interpolateString, minInArray, maxInArray, binaryFuzzySearchInNumberRange, polygonContainPoint } from '@visactor/vutils';
1
+ import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, Point, PointService, abs, max, min, atan2, epsilon, Matrix, pi2, Logger, pi, isArray, isNumberClose, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, cos, sin, pointAt, isNumber, getDecimalPlaces, isNil, Color, OBBBounds, has, normalTransform, isValidUrl, isBase64, acos, sqrt, transformBoundsWithMatrix, arrayEqual, getContextFont, rotatePoint, clampAngleByRadian, asin, Bounds, getRectIntersect, isRectIntersect, isPlainObject, merge, clamp, clampRange, normalizePadding, debounce, throttle, hexToRgb, crossProduct, isValid, isEmpty, rectInsideAnotherRect, radianToDegree, getAngleByPoint, polarToCartesian, array, isValidNumber, calculateAnchorOfBounds, computeQuadrant, isGreater, isLess, normalizeAngle, flattenArray, cloneDeep, get, last, isRotateAABBIntersect, mixin, isEqual, interpolateString, minInArray, maxInArray, binaryFuzzySearchInNumberRange, polygonContainPoint } from '@visactor/vutils';
2
2
  import { isContinuous, isDiscrete, LinearScale } from '@visactor/vscale';
3
3
 
4
4
  class Generator {
@@ -2231,6 +2231,292 @@ const DefaultRichTextIconAttribute = Object.assign(Object.assign({}, DefaultImag
2231
2231
  class Application {}
2232
2232
  const application = new Application();
2233
2233
 
2234
+ const parse = function () {
2235
+ const tokens = {
2236
+ linearGradient: /^(linear\-gradient)/i,
2237
+ radialGradient: /^(radial\-gradient)/i,
2238
+ conicGradient: /^(conic\-gradient)/i,
2239
+ sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,
2240
+ extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,
2241
+ positionKeywords: /^(left|center|right|top|bottom)/i,
2242
+ pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,
2243
+ percentageValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,
2244
+ emValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,
2245
+ angleValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
2246
+ fromAngleValue: /^from\s*(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
2247
+ startCall: /^\(/,
2248
+ endCall: /^\)/,
2249
+ comma: /^,/,
2250
+ hexColor: /(^\#[0-9a-fA-F]+)/,
2251
+ literalColor: /^([a-zA-Z]+)/,
2252
+ rgbColor: /^(rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\))/i,
2253
+ rgbaColor: /^(rgba\(\d{1,3},\s*\d{1,3},\s*\d{1,3},\s*((\d\.\d+)|\d{1,3})\))/i,
2254
+ number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/
2255
+ };
2256
+ let input = "";
2257
+ function error(msg) {
2258
+ const err = new Error(input + ": " + msg);
2259
+ throw err.source = input, err;
2260
+ }
2261
+ function getAST() {
2262
+ const ast = matchListing(matchDefinition);
2263
+ return input.length > 0 && error("Invalid input not EOF"), ast;
2264
+ }
2265
+ function matchDefinition() {
2266
+ return matchGradient("linear", tokens.linearGradient, matchLinearOrientation) || matchGradient("radial", tokens.radialGradient, matchListRadialOrientations) || matchGradient("conic", tokens.conicGradient, matchConicalOrientation);
2267
+ }
2268
+ function matchGradient(gradientType, pattern, orientationMatcher) {
2269
+ return function (pattern, callback) {
2270
+ const captures = scan(pattern);
2271
+ if (captures) {
2272
+ scan(tokens.startCall) || error("Missing (");
2273
+ const result = callback(captures);
2274
+ return scan(tokens.endCall) || error("Missing )"), result;
2275
+ }
2276
+ }(pattern, function (captures) {
2277
+ const orientation = orientationMatcher();
2278
+ return orientation && (scan(tokens.comma) || error("Missing comma before color stops")), {
2279
+ type: gradientType,
2280
+ orientation: orientation,
2281
+ colorStops: matchListing(matchColorStop)
2282
+ };
2283
+ });
2284
+ }
2285
+ function matchLinearOrientation() {
2286
+ return match("directional", tokens.sideOrCorner, 1) || match("angular", tokens.angleValue, 1);
2287
+ }
2288
+ function matchConicalOrientation() {
2289
+ return match("angular", tokens.fromAngleValue, 1);
2290
+ }
2291
+ function matchListRadialOrientations() {
2292
+ let radialOrientations,
2293
+ lookaheadCache,
2294
+ radialOrientation = matchRadialOrientation();
2295
+ return radialOrientation && (radialOrientations = [], radialOrientations.push(radialOrientation), lookaheadCache = input, scan(tokens.comma) && (radialOrientation = matchRadialOrientation(), radialOrientation ? radialOrientations.push(radialOrientation) : input = lookaheadCache)), radialOrientations;
2296
+ }
2297
+ function matchRadialOrientation() {
2298
+ let radialType = function () {
2299
+ const circle = match("shape", /^(circle)/i, 0);
2300
+ circle && (circle.style = matchLength() || matchExtentKeyword());
2301
+ return circle;
2302
+ }() || function () {
2303
+ const ellipse = match("shape", /^(ellipse)/i, 0);
2304
+ ellipse && (ellipse.style = matchDistance() || matchExtentKeyword());
2305
+ return ellipse;
2306
+ }();
2307
+ if (radialType) radialType.at = matchAtPosition();else {
2308
+ const extent = matchExtentKeyword();
2309
+ if (extent) {
2310
+ radialType = extent;
2311
+ const positionAt = matchAtPosition();
2312
+ positionAt && (radialType.at = positionAt);
2313
+ } else {
2314
+ const defaultPosition = matchPositioning();
2315
+ defaultPosition && (radialType = {
2316
+ type: "default-radial",
2317
+ at: defaultPosition
2318
+ });
2319
+ }
2320
+ }
2321
+ return radialType;
2322
+ }
2323
+ function matchExtentKeyword() {
2324
+ return match("extent-keyword", tokens.extentKeywords, 1);
2325
+ }
2326
+ function matchAtPosition() {
2327
+ if (match("position", /^at/, 0)) {
2328
+ const positioning = matchPositioning();
2329
+ return positioning || error("Missing positioning value"), positioning;
2330
+ }
2331
+ }
2332
+ function matchPositioning() {
2333
+ const location = {
2334
+ x: matchDistance(),
2335
+ y: matchDistance()
2336
+ };
2337
+ if (location.x || location.y) return {
2338
+ type: "position",
2339
+ value: location
2340
+ };
2341
+ }
2342
+ function matchListing(matcher) {
2343
+ let captures = matcher();
2344
+ const result = [];
2345
+ if (captures) for (result.push(captures); scan(tokens.comma);) captures = matcher(), captures ? result.push(captures) : error("One extra comma");
2346
+ return result;
2347
+ }
2348
+ function matchColorStop() {
2349
+ const color = match("hex", tokens.hexColor, 1) || match("rgba", tokens.rgbaColor, 1) || match("rgb", tokens.rgbColor, 1) || match("literal", tokens.literalColor, 0);
2350
+ return color || error("Expected color definition"), color.length = matchDistance(), color;
2351
+ }
2352
+ function matchDistance() {
2353
+ return match("%", tokens.percentageValue, 1) || match("position-keyword", tokens.positionKeywords, 1) || matchLength();
2354
+ }
2355
+ function matchLength() {
2356
+ return match("px", tokens.pixelValue, 1) || match("em", tokens.emValue, 1);
2357
+ }
2358
+ function match(type, pattern, captureIndex) {
2359
+ const captures = scan(pattern);
2360
+ if (captures) return {
2361
+ type: type,
2362
+ value: captures[captureIndex]
2363
+ };
2364
+ }
2365
+ function scan(regexp) {
2366
+ const blankCaptures = /^[\n\r\t\s]+/.exec(input);
2367
+ blankCaptures && consume(blankCaptures[0].length);
2368
+ const captures = regexp.exec(input);
2369
+ return captures && consume(captures[0].length), captures;
2370
+ }
2371
+ function consume(size) {
2372
+ input = input.substr(size);
2373
+ }
2374
+ return function (code) {
2375
+ return input = code.toString(), getAST();
2376
+ };
2377
+ }();
2378
+ class GradientParser {
2379
+ static IsGradient(c) {
2380
+ return !("string" == typeof c && !c.includes("gradient"));
2381
+ }
2382
+ static IsGradientStr(c) {
2383
+ return "string" == typeof c && c.includes("gradient");
2384
+ }
2385
+ static Parse(c) {
2386
+ if (GradientParser.IsGradientStr(c)) try {
2387
+ const datum = parse(c)[0];
2388
+ if (datum) {
2389
+ if ("linear" === datum.type) return GradientParser.ParseLinear(datum);
2390
+ if ("radial" === datum.type) return GradientParser.ParseRadial(datum);
2391
+ if ("conic" === datum.type) return GradientParser.ParseConic(datum);
2392
+ }
2393
+ } catch (err) {
2394
+ return c;
2395
+ }
2396
+ return c;
2397
+ }
2398
+ static ParseConic(datum) {
2399
+ const {
2400
+ orientation: orientation,
2401
+ colorStops = []
2402
+ } = datum,
2403
+ halfPi = pi / 2,
2404
+ sa = parseFloat(orientation.value) / 180 * pi - halfPi;
2405
+ return {
2406
+ gradient: "conical",
2407
+ x: .5,
2408
+ y: .5,
2409
+ startAngle: sa,
2410
+ endAngle: sa + pi2,
2411
+ stops: colorStops.map(item => ({
2412
+ color: item.value,
2413
+ offset: parseFloat(item.length.value) / 100
2414
+ }))
2415
+ };
2416
+ }
2417
+ static ParseRadial(datum) {
2418
+ const {
2419
+ colorStops = []
2420
+ } = datum;
2421
+ return {
2422
+ gradient: "radial",
2423
+ x0: .5,
2424
+ y0: .5,
2425
+ x1: .5,
2426
+ y1: .5,
2427
+ r0: 0,
2428
+ r1: 1,
2429
+ stops: colorStops.map(item => ({
2430
+ color: item.value,
2431
+ offset: parseFloat(item.length.value) / 100
2432
+ }))
2433
+ };
2434
+ }
2435
+ static ParseLinear(datum) {
2436
+ const {
2437
+ orientation: orientation,
2438
+ colorStops = []
2439
+ } = datum,
2440
+ halfPi = pi / 2;
2441
+ let angle = "angular" === orientation.type ? parseFloat(orientation.value) / 180 * pi : 0;
2442
+ for (; angle < 0;) angle += pi2;
2443
+ for (; angle >= pi2;) angle -= pi2;
2444
+ let x0 = 0,
2445
+ y0 = 0,
2446
+ x1 = 0,
2447
+ y1 = 0;
2448
+ return angle < halfPi ? (x0 = 0, y0 = 1, x1 = Math.sin(angle), y1 = y0 - Math.cos(angle)) : angle < pi ? (x0 = 0, y0 = 0, x1 = Math.cos(angle - halfPi), y1 = Math.sin(angle - halfPi)) : angle < pi + halfPi ? (x0 = 1, y0 = 0, x1 = x0 - Math.sin(angle - pi), y1 = Math.cos(angle - pi)) : (x0 = 1, x1 = x0 - Math.cos(angle - halfPi - pi), y1 -= Math.sin(angle - halfPi - pi)), {
2449
+ gradient: "linear",
2450
+ x0: x0,
2451
+ y0: y0,
2452
+ x1: x1,
2453
+ y1: y1,
2454
+ stops: colorStops.map(item => ({
2455
+ color: item.value,
2456
+ offset: parseFloat(item.length.value) / 100
2457
+ }))
2458
+ };
2459
+ }
2460
+ }
2461
+
2462
+ function getScaledStroke(context, width, dpr) {
2463
+ let strokeWidth = width;
2464
+ const {
2465
+ a: a,
2466
+ b: b,
2467
+ c: c,
2468
+ d: d
2469
+ } = context.currentMatrix,
2470
+ scaleX = Math.sign(a) * Math.sqrt(a * a + b * b),
2471
+ scaleY = Math.sign(d) * Math.sqrt(c * c + d * d);
2472
+ return scaleX + scaleY === 0 ? 0 : (strokeWidth = strokeWidth / Math.abs(scaleX + scaleY) * 2 * dpr, strokeWidth);
2473
+ }
2474
+ function createColor(context, c, params) {
2475
+ let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
2476
+ let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
2477
+ if (!c || !0 === c) return "black";
2478
+ let result, color;
2479
+ if (isArray(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
2480
+ if (color = GradientParser.Parse(color), "string" == typeof color) return color;
2481
+ if (params.AABBBounds && (!params.attribute || 0 !== params.attribute.scaleX || 0 !== params.attribute.scaleY)) {
2482
+ const bounds = params.AABBBounds;
2483
+ let w = bounds.x2 - bounds.x1,
2484
+ h = bounds.y2 - bounds.y1,
2485
+ x = bounds.x1 - offsetX,
2486
+ y = bounds.y1 - offsetY;
2487
+ if (params.attribute) {
2488
+ const {
2489
+ scaleX = 1,
2490
+ scaleY = 1
2491
+ } = params.attribute;
2492
+ w /= scaleX, h /= scaleY, x /= scaleX, y /= scaleY;
2493
+ }
2494
+ "linear" === color.gradient ? result = createLinearGradient(context, color, x, y, w, h) : "conical" === color.gradient ? result = createConicGradient(context, color, x, y, w, h) : "radial" === color.gradient && (result = createRadialGradient(context, color, x, y, w, h));
2495
+ }
2496
+ return result || "orange";
2497
+ }
2498
+ function createLinearGradient(context, color, x, y, w, h) {
2499
+ var _a, _b, _c, _d;
2500
+ const canvasGradient = context.createLinearGradient(x + (null !== (_a = color.x0) && void 0 !== _a ? _a : 0) * w, y + (null !== (_b = color.y0) && void 0 !== _b ? _b : 0) * h, x + (null !== (_c = color.x1) && void 0 !== _c ? _c : 1) * w, y + (null !== (_d = color.y1) && void 0 !== _d ? _d : 0) * h);
2501
+ return color.stops.forEach(stop => {
2502
+ canvasGradient.addColorStop(stop.offset, stop.color);
2503
+ }), canvasGradient;
2504
+ }
2505
+ function createRadialGradient(context, color, x, y, w, h) {
2506
+ var _a, _b, _c, _d, _e, _f;
2507
+ const canvasGradient = context.createRadialGradient(x + (null !== (_a = color.x0) && void 0 !== _a ? _a : .5) * w, y + (null !== (_b = color.y0) && void 0 !== _b ? _b : .5) * h, Math.max(w, h) * (null !== (_c = color.r0) && void 0 !== _c ? _c : 0), x + (null !== (_d = color.x1) && void 0 !== _d ? _d : .5) * w, y + (null !== (_e = color.y1) && void 0 !== _e ? _e : .5) * h, Math.max(w, h) * (null !== (_f = color.r1) && void 0 !== _f ? _f : .5));
2508
+ return color.stops.forEach(stop => {
2509
+ canvasGradient.addColorStop(stop.offset, stop.color);
2510
+ }), canvasGradient;
2511
+ }
2512
+ function createConicGradient(context, color, x, y, w, h) {
2513
+ var _a, _b;
2514
+ const canvasGradient = context.createConicGradient(x + (null !== (_a = color.x) && void 0 !== _a ? _a : 0) * w, y + (null !== (_b = color.y) && void 0 !== _b ? _b : 0) * h, color.startAngle, color.endAngle);
2515
+ return color.stops.forEach(stop => {
2516
+ canvasGradient.addColorStop(stop.offset, stop.color);
2517
+ }), canvasGradient.GetPattern(w + x, h + y, undefined);
2518
+ }
2519
+
2234
2520
  const DIRECTION_KEY = {
2235
2521
  horizontal: {
2236
2522
  width: "width",
@@ -2282,14 +2568,16 @@ const setTextStyle = (ctx, character) => {
2282
2568
  fontFamily: character.fontFamily || "sans-serif"
2283
2569
  });
2284
2570
  };
2285
- function applyFillStyle(ctx, character) {
2571
+ function applyFillStyle(ctx, character, b) {
2286
2572
  const fillStyle = character && character.fill || defaultFormatting.fill;
2287
2573
  if (!fillStyle) return void (ctx.globalAlpha = 0);
2288
2574
  const {
2289
2575
  fillOpacity = 1,
2290
2576
  opacity = 1
2291
2577
  } = character;
2292
- ctx.globalAlpha = fillOpacity * opacity, ctx.fillStyle = fillStyle, setTextStyle(ctx, character);
2578
+ ctx.globalAlpha = fillOpacity * opacity, ctx.fillStyle = b ? createColor(ctx, fillStyle, {
2579
+ AABBBounds: b
2580
+ }) : fillStyle, setTextStyle(ctx, character);
2293
2581
  }
2294
2582
  function applyStrokeStyle(ctx, character) {
2295
2583
  const strokeStyle = character && character.stroke || defaultFormatting.stroke;
@@ -6455,350 +6743,64 @@ class BaseRender {
6455
6743
  } else context.transformFromMatrix(graphic.transMatrix, !0), result.x = 0, result.y = 0, result.z = 0;
6456
6744
  return result;
6457
6745
  }
6458
- transformUseContext2d(graphic, graphicAttribute, z, context) {
6459
- const camera = context.camera;
6460
- if (this.camera = camera, camera) {
6461
- const bounds = graphic.AABBBounds,
6462
- width = bounds.x2 - bounds.x1,
6463
- height = bounds.y2 - bounds.y1,
6464
- p1 = context.project(0, 0, z),
6465
- p2 = context.project(width, 0, z),
6466
- p3 = context.project(width, height, z),
6467
- _p1 = {
6468
- x: 0,
6469
- y: 0
6470
- },
6471
- _p2 = {
6472
- x: width,
6473
- y: 0
6474
- },
6475
- _p3 = {
6476
- x: width,
6477
- y: height
6478
- };
6479
- context.camera = null;
6480
- const denom = 1 / (_p1.x * (_p3.y - _p2.y) - _p2.x * _p3.y + _p3.x * _p2.y + (_p2.x - _p3.x) * _p1.y),
6481
- m11 = -(_p1.y * (p3.x - p2.x) - _p2.y * p3.x + _p3.y * p2.x + (_p2.y - _p3.y) * p1.x) * denom,
6482
- m12 = (_p2.y * p3.y + _p1.y * (p2.y - p3.y) - _p3.y * p2.y + (_p3.y - _p2.y) * p1.y) * denom,
6483
- m21 = (_p1.x * (p3.x - p2.x) - _p2.x * p3.x + _p3.x * p2.x + (_p2.x - _p3.x) * p1.x) * denom,
6484
- m22 = -(_p2.x * p3.y + _p1.x * (p2.y - p3.y) - _p3.x * p2.y + (_p3.x - _p2.x) * p1.y) * denom,
6485
- dx = (_p1.x * (_p3.y * p2.x - _p2.y * p3.x) + _p1.y * (_p2.x * p3.x - _p3.x * p2.x) + (_p3.x * _p2.y - _p2.x * _p3.y) * p1.x) * denom,
6486
- dy = (_p1.x * (_p3.y * p2.y - _p2.y * p3.y) + _p1.y * (_p2.x * p3.y - _p3.x * p2.y) + (_p3.x * _p2.y - _p2.x * _p3.y) * p1.y) * denom;
6487
- context.setTransform(m11, m12, m21, m22, dx, dy, !0);
6488
- }
6489
- }
6490
- restoreTransformUseContext2d(graphic, graphicAttribute, z, context) {
6491
- this.camera && (context.camera = this.camera);
6492
- }
6493
- transformWithoutTranslate(context, x, y, z, scaleX, scaleY, angle) {
6494
- const p = context.project(x, y, z);
6495
- context.translate(p.x, p.y, !1), context.scale(scaleX, scaleY, !1), context.rotate(angle, !1), context.translate(-p.x, -p.y, !1), context.setTransformForCurrent();
6496
- }
6497
- _draw(graphic, defaultAttr, computed3dMatrix, drawContext, params) {
6498
- const {
6499
- context: context
6500
- } = drawContext;
6501
- if (!context) return;
6502
- const {
6503
- renderable: renderable
6504
- } = graphic.attribute;
6505
- if (!1 === renderable) return;
6506
- context.highPerformanceSave();
6507
- const data = this.transform(graphic, defaultAttr, context, computed3dMatrix),
6508
- {
6509
- x: x,
6510
- y: y,
6511
- z: z,
6512
- lastModelMatrix: lastModelMatrix
6513
- } = data;
6514
- this.z = z, drawPathProxy(graphic, context, x, y, drawContext, params) || (this.drawShape(graphic, context, x, y, drawContext, params), this.z = 0, context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix), context.highPerformanceRestore();
6515
- }
6516
- }
6517
-
6518
- const parse = function () {
6519
- const tokens = {
6520
- linearGradient: /^(linear\-gradient)/i,
6521
- radialGradient: /^(radial\-gradient)/i,
6522
- conicGradient: /^(conic\-gradient)/i,
6523
- sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,
6524
- extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,
6525
- positionKeywords: /^(left|center|right|top|bottom)/i,
6526
- pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,
6527
- percentageValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,
6528
- emValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,
6529
- angleValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
6530
- fromAngleValue: /^from\s*(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
6531
- startCall: /^\(/,
6532
- endCall: /^\)/,
6533
- comma: /^,/,
6534
- hexColor: /(^\#[0-9a-fA-F]+)/,
6535
- literalColor: /^([a-zA-Z]+)/,
6536
- rgbColor: /^(rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\))/i,
6537
- rgbaColor: /^(rgba\(\d{1,3},\s*\d{1,3},\s*\d{1,3},\s*((\d\.\d+)|\d{1,3})\))/i,
6538
- number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/
6539
- };
6540
- let input = "";
6541
- function error(msg) {
6542
- const err = new Error(input + ": " + msg);
6543
- throw err.source = input, err;
6544
- }
6545
- function getAST() {
6546
- const ast = matchListing(matchDefinition);
6547
- return input.length > 0 && error("Invalid input not EOF"), ast;
6548
- }
6549
- function matchDefinition() {
6550
- return matchGradient("linear", tokens.linearGradient, matchLinearOrientation) || matchGradient("radial", tokens.radialGradient, matchListRadialOrientations) || matchGradient("conic", tokens.conicGradient, matchConicalOrientation);
6551
- }
6552
- function matchGradient(gradientType, pattern, orientationMatcher) {
6553
- return function (pattern, callback) {
6554
- const captures = scan(pattern);
6555
- if (captures) {
6556
- scan(tokens.startCall) || error("Missing (");
6557
- const result = callback(captures);
6558
- return scan(tokens.endCall) || error("Missing )"), result;
6559
- }
6560
- }(pattern, function (captures) {
6561
- const orientation = orientationMatcher();
6562
- return orientation && (scan(tokens.comma) || error("Missing comma before color stops")), {
6563
- type: gradientType,
6564
- orientation: orientation,
6565
- colorStops: matchListing(matchColorStop)
6566
- };
6567
- });
6568
- }
6569
- function matchLinearOrientation() {
6570
- return match("directional", tokens.sideOrCorner, 1) || match("angular", tokens.angleValue, 1);
6571
- }
6572
- function matchConicalOrientation() {
6573
- return match("angular", tokens.fromAngleValue, 1);
6574
- }
6575
- function matchListRadialOrientations() {
6576
- let radialOrientations,
6577
- lookaheadCache,
6578
- radialOrientation = matchRadialOrientation();
6579
- return radialOrientation && (radialOrientations = [], radialOrientations.push(radialOrientation), lookaheadCache = input, scan(tokens.comma) && (radialOrientation = matchRadialOrientation(), radialOrientation ? radialOrientations.push(radialOrientation) : input = lookaheadCache)), radialOrientations;
6580
- }
6581
- function matchRadialOrientation() {
6582
- let radialType = function () {
6583
- const circle = match("shape", /^(circle)/i, 0);
6584
- circle && (circle.style = matchLength() || matchExtentKeyword());
6585
- return circle;
6586
- }() || function () {
6587
- const ellipse = match("shape", /^(ellipse)/i, 0);
6588
- ellipse && (ellipse.style = matchDistance() || matchExtentKeyword());
6589
- return ellipse;
6590
- }();
6591
- if (radialType) radialType.at = matchAtPosition();else {
6592
- const extent = matchExtentKeyword();
6593
- if (extent) {
6594
- radialType = extent;
6595
- const positionAt = matchAtPosition();
6596
- positionAt && (radialType.at = positionAt);
6597
- } else {
6598
- const defaultPosition = matchPositioning();
6599
- defaultPosition && (radialType = {
6600
- type: "default-radial",
6601
- at: defaultPosition
6602
- });
6603
- }
6604
- }
6605
- return radialType;
6606
- }
6607
- function matchExtentKeyword() {
6608
- return match("extent-keyword", tokens.extentKeywords, 1);
6609
- }
6610
- function matchAtPosition() {
6611
- if (match("position", /^at/, 0)) {
6612
- const positioning = matchPositioning();
6613
- return positioning || error("Missing positioning value"), positioning;
6614
- }
6615
- }
6616
- function matchPositioning() {
6617
- const location = {
6618
- x: matchDistance(),
6619
- y: matchDistance()
6620
- };
6621
- if (location.x || location.y) return {
6622
- type: "position",
6623
- value: location
6624
- };
6625
- }
6626
- function matchListing(matcher) {
6627
- let captures = matcher();
6628
- const result = [];
6629
- if (captures) for (result.push(captures); scan(tokens.comma);) captures = matcher(), captures ? result.push(captures) : error("One extra comma");
6630
- return result;
6631
- }
6632
- function matchColorStop() {
6633
- const color = match("hex", tokens.hexColor, 1) || match("rgba", tokens.rgbaColor, 1) || match("rgb", tokens.rgbColor, 1) || match("literal", tokens.literalColor, 0);
6634
- return color || error("Expected color definition"), color.length = matchDistance(), color;
6635
- }
6636
- function matchDistance() {
6637
- return match("%", tokens.percentageValue, 1) || match("position-keyword", tokens.positionKeywords, 1) || matchLength();
6638
- }
6639
- function matchLength() {
6640
- return match("px", tokens.pixelValue, 1) || match("em", tokens.emValue, 1);
6641
- }
6642
- function match(type, pattern, captureIndex) {
6643
- const captures = scan(pattern);
6644
- if (captures) return {
6645
- type: type,
6646
- value: captures[captureIndex]
6647
- };
6648
- }
6649
- function scan(regexp) {
6650
- const blankCaptures = /^[\n\r\t\s]+/.exec(input);
6651
- blankCaptures && consume(blankCaptures[0].length);
6652
- const captures = regexp.exec(input);
6653
- return captures && consume(captures[0].length), captures;
6654
- }
6655
- function consume(size) {
6656
- input = input.substr(size);
6657
- }
6658
- return function (code) {
6659
- return input = code.toString(), getAST();
6660
- };
6661
- }();
6662
- class GradientParser {
6663
- static IsGradient(c) {
6664
- return !("string" == typeof c && !c.includes("gradient"));
6665
- }
6666
- static IsGradientStr(c) {
6667
- return "string" == typeof c && c.includes("gradient");
6668
- }
6669
- static Parse(c) {
6670
- if (GradientParser.IsGradientStr(c)) try {
6671
- const datum = parse(c)[0];
6672
- if (datum) {
6673
- if ("linear" === datum.type) return GradientParser.ParseLinear(datum);
6674
- if ("radial" === datum.type) return GradientParser.ParseRadial(datum);
6675
- if ("conic" === datum.type) return GradientParser.ParseConic(datum);
6676
- }
6677
- } catch (err) {
6678
- return c;
6746
+ transformUseContext2d(graphic, graphicAttribute, z, context) {
6747
+ const camera = context.camera;
6748
+ if (this.camera = camera, camera) {
6749
+ const bounds = graphic.AABBBounds,
6750
+ width = bounds.x2 - bounds.x1,
6751
+ height = bounds.y2 - bounds.y1,
6752
+ p1 = context.project(0, 0, z),
6753
+ p2 = context.project(width, 0, z),
6754
+ p3 = context.project(width, height, z),
6755
+ _p1 = {
6756
+ x: 0,
6757
+ y: 0
6758
+ },
6759
+ _p2 = {
6760
+ x: width,
6761
+ y: 0
6762
+ },
6763
+ _p3 = {
6764
+ x: width,
6765
+ y: height
6766
+ };
6767
+ context.camera = null;
6768
+ const denom = 1 / (_p1.x * (_p3.y - _p2.y) - _p2.x * _p3.y + _p3.x * _p2.y + (_p2.x - _p3.x) * _p1.y),
6769
+ m11 = -(_p1.y * (p3.x - p2.x) - _p2.y * p3.x + _p3.y * p2.x + (_p2.y - _p3.y) * p1.x) * denom,
6770
+ m12 = (_p2.y * p3.y + _p1.y * (p2.y - p3.y) - _p3.y * p2.y + (_p3.y - _p2.y) * p1.y) * denom,
6771
+ m21 = (_p1.x * (p3.x - p2.x) - _p2.x * p3.x + _p3.x * p2.x + (_p2.x - _p3.x) * p1.x) * denom,
6772
+ m22 = -(_p2.x * p3.y + _p1.x * (p2.y - p3.y) - _p3.x * p2.y + (_p3.x - _p2.x) * p1.y) * denom,
6773
+ dx = (_p1.x * (_p3.y * p2.x - _p2.y * p3.x) + _p1.y * (_p2.x * p3.x - _p3.x * p2.x) + (_p3.x * _p2.y - _p2.x * _p3.y) * p1.x) * denom,
6774
+ dy = (_p1.x * (_p3.y * p2.y - _p2.y * p3.y) + _p1.y * (_p2.x * p3.y - _p3.x * p2.y) + (_p3.x * _p2.y - _p2.x * _p3.y) * p1.y) * denom;
6775
+ context.setTransform(m11, m12, m21, m22, dx, dy, !0);
6679
6776
  }
6680
- return c;
6681
6777
  }
6682
- static ParseConic(datum) {
6683
- const {
6684
- orientation: orientation,
6685
- colorStops = []
6686
- } = datum,
6687
- halfPi = pi / 2,
6688
- sa = parseFloat(orientation.value) / 180 * pi - halfPi;
6689
- return {
6690
- gradient: "conical",
6691
- x: .5,
6692
- y: .5,
6693
- startAngle: sa,
6694
- endAngle: sa + pi2,
6695
- stops: colorStops.map(item => ({
6696
- color: item.value,
6697
- offset: parseFloat(item.length.value) / 100
6698
- }))
6699
- };
6778
+ restoreTransformUseContext2d(graphic, graphicAttribute, z, context) {
6779
+ this.camera && (context.camera = this.camera);
6700
6780
  }
6701
- static ParseRadial(datum) {
6702
- const {
6703
- colorStops = []
6704
- } = datum;
6705
- return {
6706
- gradient: "radial",
6707
- x0: .5,
6708
- y0: .5,
6709
- x1: .5,
6710
- y1: .5,
6711
- r0: 0,
6712
- r1: 1,
6713
- stops: colorStops.map(item => ({
6714
- color: item.value,
6715
- offset: parseFloat(item.length.value) / 100
6716
- }))
6717
- };
6781
+ transformWithoutTranslate(context, x, y, z, scaleX, scaleY, angle) {
6782
+ const p = context.project(x, y, z);
6783
+ context.translate(p.x, p.y, !1), context.scale(scaleX, scaleY, !1), context.rotate(angle, !1), context.translate(-p.x, -p.y, !1), context.setTransformForCurrent();
6718
6784
  }
6719
- static ParseLinear(datum) {
6785
+ _draw(graphic, defaultAttr, computed3dMatrix, drawContext, params) {
6720
6786
  const {
6721
- orientation: orientation,
6722
- colorStops = []
6723
- } = datum,
6724
- halfPi = pi / 2;
6725
- let angle = "angular" === orientation.type ? parseFloat(orientation.value) / 180 * pi : 0;
6726
- for (; angle < 0;) angle += pi2;
6727
- for (; angle > pi2;) angle -= pi2;
6728
- let x0 = 0,
6729
- y0 = 0,
6730
- x1 = 0,
6731
- y1 = 0;
6732
- return angle < halfPi ? (x0 = 0, y0 = 1, x1 = Math.sin(angle), y1 = Math.cos(angle)) : angle < pi ? (x0 = 0, y0 = 0, x1 = Math.cos(angle - halfPi), y1 = Math.sin(angle - halfPi)) : angle < pi + halfPi ? (x0 = 1, y0 = 0, x1 = x0 - Math.sin(angle - pi), y1 = Math.cos(angle - pi)) : (x0 = 1, x1 = x0 - Math.cos(angle - halfPi - pi), y1 -= Math.sin(angle - halfPi - pi)), {
6733
- gradient: "linear",
6734
- x0: x0,
6735
- y0: y0,
6736
- x1: x1,
6737
- y1: y1,
6738
- stops: colorStops.map(item => ({
6739
- color: item.value,
6740
- offset: parseFloat(item.length.value) / 100
6741
- }))
6742
- };
6743
- }
6744
- }
6745
-
6746
- function getScaledStroke(context, width, dpr) {
6747
- let strokeWidth = width;
6748
- const {
6749
- a: a,
6750
- b: b,
6751
- c: c,
6752
- d: d
6753
- } = context.currentMatrix,
6754
- scaleX = Math.sign(a) * Math.sqrt(a * a + b * b),
6755
- scaleY = Math.sign(d) * Math.sqrt(c * c + d * d);
6756
- return scaleX + scaleY === 0 ? 0 : (strokeWidth = strokeWidth / Math.abs(scaleX + scaleY) * 2 * dpr, strokeWidth);
6757
- }
6758
- function createColor(context, c, params) {
6759
- let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
6760
- let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
6761
- if (!c || !0 === c) return "black";
6762
- let result, color;
6763
- if (isArray(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
6764
- if (color = GradientParser.Parse(color), "string" == typeof color) return color;
6765
- if (params.AABBBounds && (!params.attribute || 0 !== params.attribute.scaleX || 0 !== params.attribute.scaleY)) {
6766
- const bounds = params.AABBBounds;
6767
- let w = bounds.x2 - bounds.x1,
6768
- h = bounds.y2 - bounds.y1,
6769
- x = bounds.x1 - offsetX,
6770
- y = bounds.y1 - offsetY;
6771
- if (params.attribute) {
6772
- const {
6773
- scaleX = 1,
6774
- scaleY = 1
6775
- } = params.attribute;
6776
- w /= scaleX, h /= scaleY, x /= scaleX, y /= scaleY;
6777
- }
6778
- "linear" === color.gradient ? result = createLinearGradient(context, color, x, y, w, h) : "conical" === color.gradient ? result = createConicGradient(context, color, x, y, w, h) : "radial" === color.gradient && (result = createRadialGradient(context, color, x, y, w, h));
6787
+ context: context
6788
+ } = drawContext;
6789
+ if (!context) return;
6790
+ const {
6791
+ renderable: renderable
6792
+ } = graphic.attribute;
6793
+ if (!1 === renderable) return;
6794
+ context.highPerformanceSave();
6795
+ const data = this.transform(graphic, defaultAttr, context, computed3dMatrix),
6796
+ {
6797
+ x: x,
6798
+ y: y,
6799
+ z: z,
6800
+ lastModelMatrix: lastModelMatrix
6801
+ } = data;
6802
+ this.z = z, drawPathProxy(graphic, context, x, y, drawContext, params) || (this.drawShape(graphic, context, x, y, drawContext, params), this.z = 0, context.modelMatrix !== lastModelMatrix && mat4Allocate.free(context.modelMatrix), context.modelMatrix = lastModelMatrix), context.highPerformanceRestore();
6779
6803
  }
6780
- return result || "orange";
6781
- }
6782
- function createLinearGradient(context, color, x, y, w, h) {
6783
- var _a, _b, _c, _d;
6784
- const canvasGradient = context.createLinearGradient(x + (null !== (_a = color.x0) && void 0 !== _a ? _a : 0) * w, y + (null !== (_b = color.y0) && void 0 !== _b ? _b : 0) * h, x + (null !== (_c = color.x1) && void 0 !== _c ? _c : 1) * w, y + (null !== (_d = color.y1) && void 0 !== _d ? _d : 0) * h);
6785
- return color.stops.forEach(stop => {
6786
- canvasGradient.addColorStop(stop.offset, stop.color);
6787
- }), canvasGradient;
6788
- }
6789
- function createRadialGradient(context, color, x, y, w, h) {
6790
- var _a, _b, _c, _d, _e, _f;
6791
- const canvasGradient = context.createRadialGradient(x + (null !== (_a = color.x0) && void 0 !== _a ? _a : .5) * w, y + (null !== (_b = color.y0) && void 0 !== _b ? _b : .5) * h, Math.max(w, h) * (null !== (_c = color.r0) && void 0 !== _c ? _c : 0), x + (null !== (_d = color.x1) && void 0 !== _d ? _d : .5) * w, y + (null !== (_e = color.y1) && void 0 !== _e ? _e : .5) * h, Math.max(w, h) * (null !== (_f = color.r1) && void 0 !== _f ? _f : .5));
6792
- return color.stops.forEach(stop => {
6793
- canvasGradient.addColorStop(stop.offset, stop.color);
6794
- }), canvasGradient;
6795
- }
6796
- function createConicGradient(context, color, x, y, w, h) {
6797
- var _a, _b;
6798
- const canvasGradient = context.createConicGradient(x + (null !== (_a = color.x) && void 0 !== _a ? _a : 0) * w, y + (null !== (_b = color.y) && void 0 !== _b ? _b : 0) * h, color.startAngle, color.endAngle);
6799
- return color.stops.forEach(stop => {
6800
- canvasGradient.addColorStop(stop.offset, stop.color);
6801
- }), canvasGradient.GetPattern(w + x, h + y, undefined);
6802
6804
  }
6803
6805
 
6804
6806
  var __decorate$I = undefined && undefined.__decorate || function (decorators, target, key, desc) {
@@ -7679,7 +7681,7 @@ function drawEachCurve(path, curve, lastCurve, defined0, offsetX, offsetY, offse
7679
7681
  originP2: originP2
7680
7682
  } = curve;
7681
7683
  let validP;
7682
- if (originP1 && !1 !== originP1.defined ? validP = p0 : originP1 && !1 !== originP2.defined && (validP = null !== (_a = curve.p3) && void 0 !== _a ? _a : curve.p1), defined0) {
7684
+ if (originP1 && !1 !== originP1.defined && !lastCurve ? validP = p0 : originP1 && !1 !== originP2.defined && (validP = null !== (_a = curve.p3) && void 0 !== _a ? _a : curve.p1), defined0) {
7683
7685
  newDefined0 = !defined0;
7684
7686
  const x = validP ? validP.x : curve.p0.x,
7685
7687
  y = validP ? validP.y : curve.p0.y;
@@ -9197,7 +9199,10 @@ class ShadowRootDrawItemInterceptorContribution {
9197
9199
  const {
9198
9200
  context: context
9199
9201
  } = drawContext;
9200
- if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
9202
+ context.highPerformanceSave();
9203
+ const t1 = graphic.parent.globalTransMatrix,
9204
+ t2 = graphic.stage.window.getViewBoxTransform().clone().multiply(t1.a, t1.b, t1.c, t1.d, t1.e, t1.f);
9205
+ if (graphic.parent && context.setTransformFromMatrix(t2, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
9201
9206
  tempDirtyBounds.copy(drawContribution.dirtyBounds), tempBackupDirtyBounds.copy(drawContribution.backupDirtyBounds);
9202
9207
  const m = graphic.globalTransMatrix.getInverse();
9203
9208
  drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m), drawContribution.backupDirtyBounds.copy(drawContribution.dirtyBounds);
@@ -10217,6 +10222,9 @@ class BaseSymbol {
10217
10222
  bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
10218
10223
  } else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
10219
10224
  }
10225
+ parseSize(size) {
10226
+ return isNumber(size) ? size : Math.min(size[0], size[1]);
10227
+ }
10220
10228
  }
10221
10229
 
10222
10230
  function circle(ctx, r, x, y, z) {
@@ -10227,13 +10235,13 @@ class CircleSymbol extends BaseSymbol {
10227
10235
  super(...arguments), this.type = "circle", this.pathStr = "M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0";
10228
10236
  }
10229
10237
  draw(ctx, size, x, y, z) {
10230
- return circle(ctx, size / 2, x, y, z);
10238
+ return circle(ctx, this.parseSize(size) / 2, x, y, z);
10231
10239
  }
10232
10240
  drawOffset(ctx, size, x, y, offset, z) {
10233
- return circle(ctx, size / 2 + offset, x, y, z);
10241
+ return circle(ctx, this.parseSize(size) / 2 + offset, x, y, z);
10234
10242
  }
10235
10243
  drawToSvgPath(size, x, y, z) {
10236
- const r = size / 2;
10244
+ const r = this.parseSize(size) / 2;
10237
10245
  return `M ${x - r}, ${y} a ${r},${r} 0 1,0 ${2 * r},0 a ${r},${r} 0 1,0 -${2 * r},0`;
10238
10246
  }
10239
10247
  }
@@ -10250,10 +10258,10 @@ class CrossSymbol extends BaseSymbol {
10250
10258
  super(...arguments), this.type = "cross", this.pathStr = "M-0.5,-0.2L-0.5,0.2L-0.2,0.2L-0.2,0.5L0.2,0.5L0.2,0.2L0.5,0.2L0.5,-0.2L0.2,-0.2L0.2,-0.5L-0.2,-0.5L-0.2,-0.2Z";
10251
10259
  }
10252
10260
  draw(ctx, size, x, y, z) {
10253
- return cross(ctx, size / 6, x, y, z);
10261
+ return cross(ctx, this.parseSize(size) / 6, x, y, z);
10254
10262
  }
10255
10263
  drawOffset(ctx, size, x, y, offset, z) {
10256
- return crossOffset(ctx, size / 6, x, y, offset, z);
10264
+ return crossOffset(ctx, this.parseSize(size) / 6, x, y, offset, z);
10257
10265
  }
10258
10266
  }
10259
10267
  var cross$1 = new CrossSymbol();
@@ -10266,13 +10274,13 @@ class DiamondSymbol extends BaseSymbol {
10266
10274
  super(...arguments), this.type = "diamond", this.pathStr = "M-0.5,0L0,-0.5L0.5,0L0,0.5Z";
10267
10275
  }
10268
10276
  draw(ctx, size, x, y, z) {
10269
- return diamond(ctx, size / 2, x, y, z);
10277
+ return diamond(ctx, this.parseSize(size) / 2, x, y, z);
10270
10278
  }
10271
10279
  drawFitDir(ctx, size, x, y, z) {
10272
- return diamond(ctx, size / 2, x, y, z);
10280
+ return diamond(ctx, this.parseSize(size) / 2, x, y, z);
10273
10281
  }
10274
10282
  drawOffset(ctx, size, x, y, offset, z) {
10275
- return diamond(ctx, size / 2 + offset, x, y, z);
10283
+ return diamond(ctx, this.parseSize(size) / 2 + offset, x, y, z);
10276
10284
  }
10277
10285
  }
10278
10286
  var diamond$1 = new DiamondSymbol();
@@ -10286,10 +10294,10 @@ class SquareSymbol extends BaseSymbol {
10286
10294
  super(...arguments), this.type = "square", this.pathStr = "M-0.5,-0.5h1v1h-1Z";
10287
10295
  }
10288
10296
  draw(ctx, size, x, y) {
10289
- return square(ctx, size / 2, x, y);
10297
+ return square(ctx, this.parseSize(size) / 2, x, y);
10290
10298
  }
10291
10299
  drawOffset(ctx, size, x, y, offset) {
10292
- return square(ctx, size / 2 + offset, x, y);
10300
+ return square(ctx, this.parseSize(size) / 2 + offset, x, y);
10293
10301
  }
10294
10302
  }
10295
10303
  var square$1 = new SquareSymbol();
@@ -10303,10 +10311,10 @@ class TriangleUpSymbol extends BaseSymbol {
10303
10311
  super(...arguments), this.type = "triangleUp", this.pathStr = "M0.5,0.5 L-0.5,0.5 L0,-0.5 Z";
10304
10312
  }
10305
10313
  draw(ctx, size, x, y) {
10306
- return trianglUpOffset(ctx, size / 2, x, y);
10314
+ return trianglUpOffset(ctx, this.parseSize(size) / 2, x, y);
10307
10315
  }
10308
10316
  drawOffset(ctx, size, x, y, offset) {
10309
- return trianglUpOffset(ctx, size / 2, x, y, offset);
10317
+ return trianglUpOffset(ctx, this.parseSize(size) / 2, x, y, offset);
10310
10318
  }
10311
10319
  }
10312
10320
  var triangleUp = new TriangleUpSymbol();
@@ -10338,10 +10346,10 @@ class StarSymbol extends BaseSymbol {
10338
10346
  super(...arguments), this.type = "star", this.pathStr = "M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z";
10339
10347
  }
10340
10348
  draw(ctx, size, transX, transY) {
10341
- return star(ctx, size / 2, transX, transY);
10349
+ return star(ctx, this.parseSize(size) / 2, transX, transY);
10342
10350
  }
10343
10351
  drawOffset(ctx, size, transX, transY, offset) {
10344
- return star(ctx, size / 2 + offset, transX, transY);
10352
+ return star(ctx, this.parseSize(size) / 2 + offset, transX, transY);
10345
10353
  }
10346
10354
  }
10347
10355
  var star$1 = new StarSymbol();
@@ -10359,10 +10367,10 @@ class ArrowSymbol extends BaseSymbol {
10359
10367
  super(...arguments), this.type = "arrow", this.pathStr = "M-0.07142857142857142,0.5L0.07142857142857142,0.5L0.07142857142857142,-0.0625L0.2,-0.0625L0,-0.5L-0.2,-0.0625L-0.07142857142857142,-0.0625Z";
10360
10368
  }
10361
10369
  draw(ctx, size, transX, transY) {
10362
- return arrow(ctx, size / 2, transX, transY);
10370
+ return arrow(ctx, this.parseSize(size) / 2, transX, transY);
10363
10371
  }
10364
10372
  drawOffset(ctx, size, transX, transY, offset) {
10365
- return arrow(ctx, size / 2 + offset, transX, transY);
10373
+ return arrow(ctx, this.parseSize(size) / 2 + offset, transX, transY);
10366
10374
  }
10367
10375
  }
10368
10376
  var arrow$1 = new ArrowSymbol();
@@ -10376,10 +10384,10 @@ class WedgeSymbol extends BaseSymbol {
10376
10384
  super(...arguments), this.type = "wedge", this.pathStr = "M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z";
10377
10385
  }
10378
10386
  draw(ctx, size, transX, transY) {
10379
- return wedge(ctx, size / 2, transX, transY);
10387
+ return wedge(ctx, this.parseSize(size) / 2, transX, transY);
10380
10388
  }
10381
10389
  drawOffset(ctx, size, transX, transY, offset) {
10382
- return wedge(ctx, size / 2 + offset, transX, transY);
10390
+ return wedge(ctx, this.parseSize(size) / 2 + offset, transX, transY);
10383
10391
  }
10384
10392
  }
10385
10393
  var wedge$1 = new WedgeSymbol();
@@ -10392,10 +10400,10 @@ class StrokeSymbol extends BaseSymbol {
10392
10400
  super(...arguments), this.type = "stroke", this.pathStr = "";
10393
10401
  }
10394
10402
  draw(ctx, size, transX, transY) {
10395
- return stroke(ctx, size / 2, transX, transY);
10403
+ return stroke(ctx, this.parseSize(size) / 2, transX, transY);
10396
10404
  }
10397
10405
  drawOffset(ctx, size, transX, transY, offset) {
10398
- return stroke(ctx, size / 2 + offset, transX, transY);
10406
+ return stroke(ctx, this.parseSize(size) / 2 + offset, transX, transY);
10399
10407
  }
10400
10408
  }
10401
10409
  var stroke$1 = new StrokeSymbol();
@@ -10417,10 +10425,10 @@ class WyeSymbol extends BaseSymbol {
10417
10425
  super(...arguments), this.type = "wye", this.pathStr = "M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z";
10418
10426
  }
10419
10427
  draw(ctx, size, transX, transY) {
10420
- return wye(ctx, size / 2, transX, transY);
10428
+ return wye(ctx, this.parseSize(size) / 2, transX, transY);
10421
10429
  }
10422
10430
  drawOffset(ctx, size, transX, transY, offset) {
10423
- return wye(ctx, size / 2 + offset, transX, transY);
10431
+ return wye(ctx, this.parseSize(size) / 2 + offset, transX, transY);
10424
10432
  }
10425
10433
  }
10426
10434
  var wye$1 = new WyeSymbol();
@@ -10433,10 +10441,10 @@ class TriangleLeftSymbol extends BaseSymbol {
10433
10441
  super(...arguments), this.type = "triangleLeft", this.pathStr = "M-0.5,0 L0.5,0.5 L0.5,-0.5 Z";
10434
10442
  }
10435
10443
  draw(ctx, size, x, y) {
10436
- return trianglLeftOffset(ctx, size / 2, x, y, 0);
10444
+ return trianglLeftOffset(ctx, this.parseSize(size) / 2, x, y, 0);
10437
10445
  }
10438
10446
  drawOffset(ctx, size, x, y, offset) {
10439
- return trianglLeftOffset(ctx, size / 2, x, y, offset);
10447
+ return trianglLeftOffset(ctx, this.parseSize(size) / 2, x, y, offset);
10440
10448
  }
10441
10449
  }
10442
10450
  var triangleLeft = new TriangleLeftSymbol();
@@ -10450,10 +10458,10 @@ class TriangleRightSymbol extends BaseSymbol {
10450
10458
  super(...arguments), this.type = "triangleRight", this.pathStr = "M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z";
10451
10459
  }
10452
10460
  draw(ctx, size, x, y) {
10453
- return trianglRightOffset(ctx, size / 2, x, y);
10461
+ return trianglRightOffset(ctx, this.parseSize(size) / 2, x, y);
10454
10462
  }
10455
10463
  drawOffset(ctx, size, x, y, offset) {
10456
- return trianglRightOffset(ctx, size / 2, x, y, offset);
10464
+ return trianglRightOffset(ctx, this.parseSize(size) / 2, x, y, offset);
10457
10465
  }
10458
10466
  }
10459
10467
  var triangleRight = new TriangleRightSymbol();
@@ -10467,10 +10475,10 @@ class TriangleDownSymbol extends BaseSymbol {
10467
10475
  super(...arguments), this.type = "triangleDown", this.pathStr = "M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z";
10468
10476
  }
10469
10477
  draw(ctx, size, x, y) {
10470
- return trianglDownOffset(ctx, size / 2, x, y);
10478
+ return trianglDownOffset(ctx, this.parseSize(size) / 2, x, y);
10471
10479
  }
10472
10480
  drawOffset(ctx, size, x, y, offset) {
10473
- return trianglDownOffset(ctx, size / 2, x, y, offset);
10481
+ return trianglDownOffset(ctx, this.parseSize(size) / 2, x, y, offset);
10474
10482
  }
10475
10483
  }
10476
10484
  var triangleDown = new TriangleDownSymbol();
@@ -10485,10 +10493,10 @@ class ThinTriangleSymbol extends BaseSymbol {
10485
10493
  super(...arguments), this.type = "thinTriangle", this.pathStr = "M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z";
10486
10494
  }
10487
10495
  draw(ctx, size, x, y) {
10488
- return thinTriangle(ctx, size / 2 / sqrt3, x, y);
10496
+ return thinTriangle(ctx, this.parseSize(size) / 2 / sqrt3, x, y);
10489
10497
  }
10490
10498
  drawOffset(ctx, size, x, y, offset) {
10491
- return thinTriangle(ctx, size / 2 / sqrt3 + offset, x, y);
10499
+ return thinTriangle(ctx, this.parseSize(size) / 2 / sqrt3 + offset, x, y);
10492
10500
  }
10493
10501
  }
10494
10502
  var thinTriangle$1 = new ThinTriangleSymbol();
@@ -10502,10 +10510,10 @@ class Arrow2LeftSymbol extends BaseSymbol {
10502
10510
  super(...arguments), this.type = "arrow2Left", this.pathStr = "M 0.25 -0.5 L -0.25 0 l 0.25 0.5";
10503
10511
  }
10504
10512
  draw(ctx, size, transX, transY) {
10505
- return arrow2Left(ctx, size / 4, transX, transY);
10513
+ return arrow2Left(ctx, this.parseSize(size) / 4, transX, transY);
10506
10514
  }
10507
10515
  drawOffset(ctx, size, transX, transY, offset) {
10508
- return arrow2Left(ctx, size / 4 + offset, transX, transY);
10516
+ return arrow2Left(ctx, this.parseSize(size) / 4 + offset, transX, transY);
10509
10517
  }
10510
10518
  }
10511
10519
  var arrow2Left$1 = new Arrow2LeftSymbol();
@@ -10519,10 +10527,10 @@ class Arrow2RightSymbol extends BaseSymbol {
10519
10527
  super(...arguments), this.type = "arrow2Right", this.pathStr = "M -0.25 -0.5 l 0.25 0 l -0.25 0.5";
10520
10528
  }
10521
10529
  draw(ctx, size, transX, transY) {
10522
- return arrow2Right(ctx, size / 4, transX, transY);
10530
+ return arrow2Right(ctx, this.parseSize(size) / 4, transX, transY);
10523
10531
  }
10524
10532
  drawOffset(ctx, size, transX, transY, offset) {
10525
- return arrow2Right(ctx, size / 4 + offset, transX, transY);
10533
+ return arrow2Right(ctx, this.parseSize(size) / 4 + offset, transX, transY);
10526
10534
  }
10527
10535
  }
10528
10536
  var arrow2Right$1 = new Arrow2RightSymbol();
@@ -10536,10 +10544,10 @@ class Arrow2UpSymbol extends BaseSymbol {
10536
10544
  super(...arguments), this.type = "arrow2Up", this.pathStr = "M -0.5 0.25 L 0 -0.25 l 0.5 0.25";
10537
10545
  }
10538
10546
  draw(ctx, size, transX, transY) {
10539
- return arrow2Up(ctx, size / 4, transX, transY);
10547
+ return arrow2Up(ctx, this.parseSize(size) / 4, transX, transY);
10540
10548
  }
10541
10549
  drawOffset(ctx, size, transX, transY, offset) {
10542
- return arrow2Up(ctx, size / 4 + offset, transX, transY);
10550
+ return arrow2Up(ctx, this.parseSize(size) / 4 + offset, transX, transY);
10543
10551
  }
10544
10552
  }
10545
10553
  var arrow2Up$1 = new Arrow2UpSymbol();
@@ -10553,10 +10561,10 @@ class Arrow2DownSymbol extends BaseSymbol {
10553
10561
  super(...arguments), this.type = "arrow2Down", this.pathStr = "M -0.5 -0.25 L 0 0.25 l 0.5 -0.25";
10554
10562
  }
10555
10563
  draw(ctx, size, transX, transY) {
10556
- return arrow2Down(ctx, size / 4, transX, transY);
10564
+ return arrow2Down(ctx, this.parseSize(size) / 4, transX, transY);
10557
10565
  }
10558
10566
  drawOffset(ctx, size, transX, transY, offset) {
10559
- return arrow2Down(ctx, size / 4 + offset, transX, transY);
10567
+ return arrow2Down(ctx, this.parseSize(size) / 4 + offset, transX, transY);
10560
10568
  }
10561
10569
  }
10562
10570
  var arrow2Down$1 = new Arrow2DownSymbol();
@@ -10569,13 +10577,13 @@ class LineVSymbol extends BaseSymbol {
10569
10577
  super(...arguments), this.type = "lineV", this.pathStr = "M0,-0.5L0,0.5";
10570
10578
  }
10571
10579
  draw(ctx, size, x, y, z) {
10572
- return lineV(ctx, size / 2, x, y);
10580
+ return lineV(ctx, this.parseSize(size) / 2, x, y);
10573
10581
  }
10574
10582
  drawOffset(ctx, size, x, y, offset, z) {
10575
- return lineV(ctx, size / 2 + offset, x, y);
10583
+ return lineV(ctx, this.parseSize(size) / 2 + offset, x, y);
10576
10584
  }
10577
10585
  drawToSvgPath(size, x, y, z) {
10578
- const r = size / 2;
10586
+ const r = this.parseSize(size) / 2;
10579
10587
  return `M ${x}, ${y - r} L ${x},${y + r}`;
10580
10588
  }
10581
10589
  }
@@ -10589,13 +10597,13 @@ class LineHSymbol extends BaseSymbol {
10589
10597
  super(...arguments), this.type = "lineH", this.pathStr = "M-0.5,0L0.5,0";
10590
10598
  }
10591
10599
  draw(ctx, size, x, y, z) {
10592
- return lineH(ctx, size / 2, x, y);
10600
+ return lineH(ctx, this.parseSize(size) / 2, x, y);
10593
10601
  }
10594
10602
  drawOffset(ctx, size, x, y, offset, z) {
10595
- return lineH(ctx, size / 2 + offset, x, y);
10603
+ return lineH(ctx, this.parseSize(size) / 2 + offset, x, y);
10596
10604
  }
10597
10605
  drawToSvgPath(size, x, y, z) {
10598
- const r = size / 2;
10606
+ const r = this.parseSize(size) / 2;
10599
10607
  return `M ${x - r}, ${y} L ${x + r},${y}`;
10600
10608
  }
10601
10609
  }
@@ -10609,13 +10617,13 @@ class CloseSymbol extends BaseSymbol {
10609
10617
  super(...arguments), this.type = "close", this.pathStr = "M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5";
10610
10618
  }
10611
10619
  draw(ctx, size, x, y, z) {
10612
- return close(ctx, size / 2, x, y);
10620
+ return close(ctx, this.parseSize(size) / 2, x, y);
10613
10621
  }
10614
10622
  drawOffset(ctx, size, x, y, offset, z) {
10615
- return close(ctx, size / 2 + offset, x, y);
10623
+ return close(ctx, this.parseSize(size) / 2 + offset, x, y);
10616
10624
  }
10617
10625
  drawToSvgPath(size, x, y, z) {
10618
- const r = size / 2;
10626
+ const r = this.parseSize(size) / 2;
10619
10627
  return `M ${x - r}, ${y - r} L ${x + r},${y + r} M ${x + r}, ${y - r} L ${x - r},${y + r}`;
10620
10628
  }
10621
10629
  }
@@ -10649,15 +10657,18 @@ class CustomSymbolClass {
10649
10657
  this.pathStr = "", this.type = type, isArray(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
10650
10658
  }
10651
10659
  drawOffset(ctx, size, x, y, offset, z, cb) {
10652
- return this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
10660
+ return size = this.parseSize(size), this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
10653
10661
  ctx.beginPath(), renderCommandList(item.path.commandList, ctx, x, y, size, size), cb && cb(item.path, item.attribute);
10654
10662
  }), !1) : (renderCommandList(this.path.commandList, ctx, x, y, size + offset, size + offset), !1);
10655
10663
  }
10656
10664
  draw(ctx, size, x, y, z, cb) {
10657
- return this.drawOffset(ctx, size, x, y, 0, z, cb);
10665
+ return size = this.parseSize(size), this.drawOffset(ctx, size, x, y, 0, z, cb);
10666
+ }
10667
+ parseSize(size) {
10668
+ return isNumber(size) ? size : Math.min(size[0], size[1]);
10658
10669
  }
10659
10670
  bounds(size, bounds) {
10660
- if (this.isSvg) {
10671
+ if (size = this.parseSize(size), this.isSvg) {
10661
10672
  if (!this.svgCache) return;
10662
10673
  return bounds.clear(), void this.svgCache.forEach(_ref => {
10663
10674
  let {
@@ -11161,7 +11172,11 @@ class Paragraph {
11161
11172
  case "sub":
11162
11173
  baseline += this.descent / 2;
11163
11174
  }
11164
- "vertical" === direction && (ctx.save(), ctx.rotateAbout(Math.PI / 2, left, baseline), ctx.translate(-this.heightOrigin || -this.lineHeight / 2, -this.descent / 2), ctx.translate(left, baseline), left = 0, baseline = 0), this.character.stroke && (applyStrokeStyle(ctx, this.character), ctx.strokeText(text, left, baseline)), applyFillStyle(ctx, this.character), this.character.fill && ctx.fillText(text, left, baseline), this.character.fill && ("boolean" == typeof this.character.lineThrough || "boolean" == typeof this.character.underline ? (this.character.underline && ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1), this.character.lineThrough && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)) : "underline" === this.character.textDecoration ? ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1) : "line-through" === this.character.textDecoration && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)), "vertical" === direction && ctx.restore();
11175
+ "vertical" === direction && (ctx.save(), ctx.rotateAbout(Math.PI / 2, left, baseline), ctx.translate(-this.heightOrigin || -this.lineHeight / 2, -this.descent / 2), ctx.translate(left, baseline), left = 0, baseline = 0);
11176
+ const {
11177
+ lineWidth = 1
11178
+ } = this.character;
11179
+ this.character.stroke && lineWidth && ctx.strokeText(text, left, baseline), this.character.fill && ctx.fillText(text, left, baseline), this.character.fill && ("boolean" == typeof this.character.lineThrough || "boolean" == typeof this.character.underline ? (this.character.underline && ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1), this.character.lineThrough && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)) : "underline" === this.character.textDecoration ? ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1) : "line-through" === this.character.textDecoration && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)), "vertical" === direction && ctx.restore();
11165
11180
  }
11166
11181
  getWidthWithEllips(direction) {
11167
11182
  let text = this.text;
@@ -11384,12 +11399,18 @@ class Line {
11384
11399
  paragraph.ellipsis = "hide", otherParagraphWidth += paragraph.width;
11385
11400
  }
11386
11401
  }
11387
- this.paragraphs.map((paragraph, index) => {
11402
+ this.paragraphs.forEach((paragraph, index) => {
11388
11403
  if (paragraph instanceof RichTextIcon) return paragraph.setAttributes({
11389
11404
  x: x + paragraph._x,
11390
11405
  y: y + paragraph._y
11391
11406
  }), void drawIcon(paragraph, ctx, x + paragraph._x, y + paragraph._y, this.ascent);
11392
- paragraph.draw(ctx, y + this.ascent, x, 0 === index, this.textAlign);
11407
+ const b = {
11408
+ x1: this.left,
11409
+ y1: this.top,
11410
+ x2: this.left + this.actualWidth,
11411
+ y2: this.top + this.height
11412
+ };
11413
+ applyStrokeStyle(ctx, paragraph.character), applyFillStyle(ctx, paragraph.character, b), paragraph.draw(ctx, y + this.ascent, x, 0 === index, this.textAlign);
11393
11414
  });
11394
11415
  }
11395
11416
  getWidthWithEllips(ellipsis) {
@@ -11412,7 +11433,7 @@ class Line {
11412
11433
  paragraph.ellipsis = "hide", otherParagraphWidth += paragraph.width;
11413
11434
  }
11414
11435
  let width = 0;
11415
- return this.paragraphs.map((paragraph, index) => {
11436
+ return this.paragraphs.forEach((paragraph, index) => {
11416
11437
  width += paragraph instanceof RichTextIcon ? paragraph.width : paragraph.getWidthWithEllips(this.direction);
11417
11438
  }), width;
11418
11439
  }
@@ -11452,7 +11473,7 @@ class Wrapper {
11452
11473
  }
11453
11474
  }
11454
11475
 
11455
- const RICHTEXT_UPDATE_TAG_KEY = ["width", "height", "ellipsis", "wordBreak", "verticalDirection", "maxHeight", "maxWidth", "textAlign", "textBaseline", "textConfig", "layoutDirection", "fill", "stroke", "fontSize", ...GRAPHIC_UPDATE_TAG_KEY];
11476
+ const RICHTEXT_UPDATE_TAG_KEY = ["width", "height", "ellipsis", "wordBreak", "verticalDirection", "maxHeight", "maxWidth", "textAlign", "textBaseline", "textConfig", "layoutDirection", "fill", "stroke", "fontSize", "fontFamily", "fontStyle", "fontWeight", "lineWidth", "opacity", "fillOpacity", "strokeOpacity", ...GRAPHIC_UPDATE_TAG_KEY];
11456
11477
  class RichText extends Graphic {
11457
11478
  constructor(params) {
11458
11479
  super(params), this.type = "richtext", this._currentHoverIcon = null, this.numberType = RICHTEXT_NUMBER_TYPE, this.onBeforeAttributeUpdate = (val, attributes, key) => {
@@ -15996,24 +16017,29 @@ function defaultLabelPosition(type) {
15996
16017
  return DefaultPositions;
15997
16018
  }
15998
16019
  }
15999
- function clampText(text, width, height) {
16020
+ function clampText(text, width, height, padding = {}) {
16000
16021
  const { x1, x2, y1, y2 } = text.AABBBounds;
16022
+ const { top = 0, left = 0, right = 0, bottom = 0 } = padding;
16001
16023
  const minX = Math.min(x1, x2);
16002
16024
  const maxX = Math.max(x1, x2);
16003
16025
  const minY = Math.min(y1, y2);
16004
16026
  const maxY = Math.max(y1, y2);
16027
+ const minXWithPadding = 0 - left;
16028
+ const maxXWithPadding = width + right;
16029
+ const minYWithPadding = 0 - top;
16030
+ const maxYWithPadding = height + bottom;
16005
16031
  let dx = 0;
16006
16032
  let dy = 0;
16007
- if (minX < 0 && maxX - minX <= width) {
16033
+ if (minX < minXWithPadding && maxX - minX <= width) {
16008
16034
  dx = -minX;
16009
16035
  }
16010
- else if (maxX > width && minX - (maxX - width) >= 0) {
16036
+ else if (maxX > maxXWithPadding && minX - (maxX - width) >= minXWithPadding) {
16011
16037
  dx = width - maxX;
16012
16038
  }
16013
- if (minY < 0 && maxY - minY <= height) {
16039
+ if (minY < minYWithPadding && maxY - minY <= height) {
16014
16040
  dy = -minY;
16015
16041
  }
16016
- else if (maxY > height && minY - (maxY - height) >= 0) {
16042
+ else if (maxY > maxYWithPadding && minY - (maxY - height) >= minYWithPadding) {
16017
16043
  dy = height - maxY;
16018
16044
  }
16019
16045
  return { dx, dy };
@@ -16313,69 +16339,177 @@ function loadLabelComponent() {
16313
16339
  registerLine();
16314
16340
  }
16315
16341
 
16316
- function shiftY(texts, option = {}) {
16317
- const { maxIterations = 10, maxError = 0.1, padding = 1, maxY = Number.MAX_VALUE } = option;
16342
+ const isIntersect = (top, bottom) => {
16343
+ return Math.ceil(top) > Math.floor(bottom);
16344
+ };
16345
+ const isXIntersect = ([a, b], [c, d]) => {
16346
+ return d > a && b > c;
16347
+ };
16348
+ function getIntersectionLength(range1, range2) {
16349
+ const [start1, end1] = range1;
16350
+ const [start2, end2] = range2;
16351
+ const start = Math.max(start1, start2);
16352
+ const end = Math.min(end1, end2);
16353
+ return Math.max(0, end - start);
16354
+ }
16355
+ function shiftY(texts, option) {
16356
+ const { maxY = Number.MAX_VALUE, labelling, globalShiftY = { enable: true, maxIterations: 10, maxError: 0.1, padding: 1 } } = option;
16318
16357
  const n = texts.length;
16319
16358
  if (n <= 1) {
16320
16359
  return texts;
16321
16360
  }
16322
- const isIntersect = ([a, b], [c, d]) => {
16323
- return d > a && b > c;
16324
- };
16361
+ const xMap = new Map();
16325
16362
  const textInformation = new Map();
16326
- const getY0 = (text) => textInformation.get(text).y0;
16327
- const getY = (text) => textInformation.get(text).y;
16363
+ const getY1Initial = (text) => textInformation.get(text).y1Initial;
16328
16364
  const getHeight = (text) => textInformation.get(text).height;
16365
+ const getY1 = (text) => textInformation.get(text).y1;
16366
+ const getY = (text) => textInformation.get(text).y;
16367
+ const getX = (text) => textInformation.get(text).x;
16329
16368
  const getX1 = (text) => textInformation.get(text).x1;
16330
16369
  const getX2 = (text) => textInformation.get(text).x2;
16331
- const setY = (text, y) => {
16332
- textInformation.get(text).y = y;
16370
+ const getAdjustAttempts = (text) => textInformation.get(text).attempts;
16371
+ const setY1 = (text, y) => {
16372
+ textInformation.get(text).y1 = y;
16333
16373
  };
16374
+ const setAdjustAttempts = (text, attempts) => {
16375
+ textInformation.get(text).attempts = attempts;
16376
+ };
16377
+ function adjustPositionInOneGroup(texts) {
16378
+ if (texts.length === 1) {
16379
+ return;
16380
+ }
16381
+ for (let i = texts.length - 1; i > 0; i--) {
16382
+ const curText = texts[i];
16383
+ const upperText = texts[i - 1];
16384
+ const lowerText = texts[i + 1];
16385
+ if (isIntersect(getY1(upperText) + getHeight(upperText), getY1(curText))) {
16386
+ const { y } = labelling(curText);
16387
+ if (!lowerText || !isIntersect(y + getHeight(curText) / 2, getY1(lowerText))) {
16388
+ if (y + getHeight(curText) / 2 <= maxY) {
16389
+ setY1(curText, getY1(curText) + y - getY(curText));
16390
+ }
16391
+ }
16392
+ }
16393
+ }
16394
+ }
16395
+ texts.sort((a, b) => a.attribute.x - b.attribute.x);
16334
16396
  for (const text of texts) {
16335
16397
  const { y1, y2, x1, x2 } = text.AABBBounds;
16336
- textInformation.set(text, { y0: y1, y: y1, height: y2 - y1, x1, x2 });
16398
+ const { x, y } = text.attribute;
16399
+ textInformation.set(text, { y1Initial: y1, y1, y2, y, height: y2 - y1, x1, x2, x, attempts: 0 });
16400
+ let hasRange = false;
16401
+ for (const [range, xGroupTexts] of xMap) {
16402
+ const { start, end } = range;
16403
+ if (x1 >= start && x2 <= end) {
16404
+ xGroupTexts.push(text);
16405
+ hasRange = true;
16406
+ }
16407
+ else if (isNumberClose(x, getX(xGroupTexts[0]), undefined, 5)) {
16408
+ const newRange = { start: Math.min(start, x1), end: Math.max(end, x2) };
16409
+ xGroupTexts.push(text);
16410
+ xMap.set(newRange, xGroupTexts);
16411
+ xMap.delete(range);
16412
+ hasRange = true;
16413
+ }
16414
+ else if (getIntersectionLength([start, end], [x1, x2]) / (end - start) > 0.5) {
16415
+ const newRange = { start: Math.min(start, x1), end: Math.max(end, x2) };
16416
+ xGroupTexts.push(text);
16417
+ xMap.set(newRange, xGroupTexts);
16418
+ xMap.delete(range);
16419
+ hasRange = true;
16420
+ }
16421
+ if (hasRange) {
16422
+ break;
16423
+ }
16424
+ }
16425
+ if (!hasRange) {
16426
+ xMap.set({ start: x1, end: x2 }, [text]);
16427
+ }
16337
16428
  }
16338
- for (let iter = 0; iter < maxIterations; iter++) {
16339
- texts.sort((a, b) => getY(a) - getY(b));
16340
- let error = 0;
16341
- for (let i = 0; i < n - 1; i++) {
16342
- const curText = texts[i];
16343
- let j = i + 1;
16344
- let nextText;
16345
- while ((nextText = texts[j]) &&
16346
- !isIntersect([getX1(curText), getX2(curText)], [getX1(nextText), getX2(nextText)])) {
16347
- j += 1;
16348
- }
16349
- if (nextText) {
16350
- const y0 = getY(curText);
16351
- const h0 = getHeight(curText);
16352
- const y1 = getY(nextText);
16353
- const delta = y1 - (y0 + h0);
16354
- if (delta < padding) {
16355
- const newDelta = (padding - delta) / 2;
16356
- error = Math.max(error, newDelta);
16357
- if (y1 + newDelta + getHeight(nextText) > maxY) {
16358
- setY(curText, y0 - (padding - delta));
16359
- }
16360
- else if (y0 - newDelta < 0) {
16361
- setY(nextText, y1 + (padding - delta));
16362
- }
16363
- else {
16364
- setY(curText, y0 - newDelta);
16365
- setY(nextText, y1 + newDelta);
16429
+ for (const xTexts of xMap.values()) {
16430
+ xTexts.sort((a, b) => getY1Initial(a) - getY1Initial(b));
16431
+ adjustPositionInOneGroup(xTexts);
16432
+ }
16433
+ if (globalShiftY.enable !== false) {
16434
+ const { maxIterations = 10, maxError = 0.1, padding = 1, maxAttempts = 1000, deltaYTolerance = Number.MAX_VALUE } = globalShiftY;
16435
+ for (let iter = 0; iter < maxIterations; iter++) {
16436
+ texts.sort((a, b) => getY1(a) - getY1(b));
16437
+ let error = 0;
16438
+ for (let i = 0; i < n - 1; i++) {
16439
+ const curText = texts[i];
16440
+ if (getAdjustAttempts(curText) >= maxAttempts) {
16441
+ continue;
16442
+ }
16443
+ let j = i + 1;
16444
+ let nextText;
16445
+ while ((nextText = texts[j]) &&
16446
+ !isXIntersect([getX1(curText), getX2(curText)], [getX1(nextText), getX2(nextText)])) {
16447
+ j += 1;
16448
+ }
16449
+ if (nextText) {
16450
+ const y1 = getY1(curText);
16451
+ const h0 = getHeight(curText);
16452
+ const nextY1 = getY1(nextText);
16453
+ const delta = nextY1 - (y1 + h0);
16454
+ if (delta < padding) {
16455
+ const newDelta = (padding - delta) / 2;
16456
+ error = Math.max(error, newDelta);
16457
+ if (y1 + newDelta + getHeight(nextText) > maxY) {
16458
+ const newY1 = y1 - (padding - delta);
16459
+ const curTextDelta = getY1Initial(curText) - newY1;
16460
+ if (Math.abs(curTextDelta) <= deltaYTolerance) {
16461
+ setY1(curText, newY1);
16462
+ setAdjustAttempts(curText, getAdjustAttempts(curText) + 1);
16463
+ }
16464
+ }
16465
+ else if (y1 - newDelta < 0) {
16466
+ const newY1 = nextY1 + (padding - delta);
16467
+ const nextTextDelta = getY1Initial(nextText) - newY1;
16468
+ if (Math.abs(nextTextDelta) <= deltaYTolerance) {
16469
+ setY1(nextText, newY1);
16470
+ setAdjustAttempts(nextText, getAdjustAttempts(nextText) + 1);
16471
+ }
16472
+ }
16473
+ else {
16474
+ const newCurY1 = y1 - newDelta;
16475
+ const curTextDelta = getY1Initial(curText) - newCurY1;
16476
+ const newNextY1 = nextY1 + newDelta;
16477
+ const nextTextDelta = getY1Initial(nextText) - newNextY1;
16478
+ if (Math.abs(curTextDelta) <= deltaYTolerance && Math.abs(nextTextDelta) <= deltaYTolerance) {
16479
+ setY1(curText, newCurY1);
16480
+ setY1(nextText, newNextY1);
16481
+ setAdjustAttempts(curText, getAdjustAttempts(curText) + 1);
16482
+ setAdjustAttempts(nextText, getAdjustAttempts(nextText) + 1);
16483
+ }
16484
+ }
16366
16485
  }
16367
16486
  }
16368
16487
  }
16369
- }
16370
- if (error < maxError) {
16371
- break;
16488
+ if (error < maxError) {
16489
+ break;
16490
+ }
16372
16491
  }
16373
16492
  }
16374
16493
  for (const text of texts) {
16375
- const finalY = text.attribute.y + getY(text) - getY0(text);
16494
+ const finalY = text.attribute.y + getY1(text) - getY1Initial(text);
16376
16495
  text.setAttribute('y', finalY);
16377
16496
  }
16378
- return texts;
16497
+ const result = [];
16498
+ texts.sort((a, b) => a.attribute.x - b.attribute.x);
16499
+ let start = 0;
16500
+ let end = texts.length - 1;
16501
+ while (start <= end) {
16502
+ if (start === end) {
16503
+ result.push(texts[start]);
16504
+ }
16505
+ else {
16506
+ result.push(texts[start]);
16507
+ result.push(texts[end]);
16508
+ }
16509
+ start++;
16510
+ end--;
16511
+ }
16512
+ return result;
16379
16513
  }
16380
16514
 
16381
16515
  loadLabelComponent();
@@ -16721,18 +16855,25 @@ class LabelBase extends AbstractComponent {
16721
16855
  if (clampForce) {
16722
16856
  for (let i = 0; i < result.length; i++) {
16723
16857
  const text = labels[i];
16724
- const { dx = 0, dy = 0 } = clampText(text, bmpTool.width, bmpTool.height);
16858
+ const { dx = 0, dy = 0 } = clampText(text, bmpTool.width, bmpTool.height, bmpTool.padding);
16725
16859
  if (dx !== 0 || dy !== 0) {
16726
16860
  text.setAttributes({ x: text.attribute.x + dx, y: text.attribute.y + dy });
16861
+ text._isClamped = true;
16727
16862
  }
16728
16863
  }
16729
16864
  }
16730
- result = shiftY(result, Object.assign({ maxY: bmpTool.height }, strategy));
16865
+ result = shiftY(result, Object.assign(Object.assign({ maxY: bmpTool.height }, strategy), { labelling: (text) => {
16866
+ const baseMark = this.getRelatedGraphic(text.attribute);
16867
+ const graphicBound = this._isCollectionBase
16868
+ ? this.getGraphicBounds(null, this._idToPoint.get(text.attribute.id))
16869
+ : this.getGraphicBounds(baseMark, text);
16870
+ return this.labeling(text.AABBBounds, graphicBound, 'bottom', this.attribute.offset);
16871
+ } }));
16731
16872
  for (let i = 0; i < result.length; i++) {
16732
16873
  const text = result[i];
16733
16874
  const bounds = text.AABBBounds;
16734
16875
  const range = boundToRange(bmpTool, bounds, true);
16735
- if (canPlace(bmpTool, bitmap, bounds, clampForce, overlapPadding)) {
16876
+ if (canPlace(bmpTool, bitmap, bounds, clampForce, text._isClamped ? 0 : overlapPadding)) {
16736
16877
  bitmap.setRange(range);
16737
16878
  }
16738
16879
  else {
@@ -16805,7 +16946,7 @@ class LabelBase extends AbstractComponent {
16805
16946
  }
16806
16947
  }
16807
16948
  if (!hasPlace && clampForce) {
16808
- const { dx = 0, dy = 0 } = clampText(text, bmpTool.width, bmpTool.height);
16949
+ const { dx = 0, dy = 0 } = clampText(text, bmpTool.width, bmpTool.height, bmpTool.padding);
16809
16950
  if (dx === 0 && dy === 0) {
16810
16951
  if (canPlace(bmpTool, bitmap, text.AABBBounds)) {
16811
16952
  bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, true));
@@ -22366,11 +22507,19 @@ var IMarkAreaLabelPosition;
22366
22507
  IMarkAreaLabelPosition["right"] = "right";
22367
22508
  IMarkAreaLabelPosition["top"] = "top";
22368
22509
  IMarkAreaLabelPosition["bottom"] = "bottom";
22510
+ IMarkAreaLabelPosition["topLeft"] = "topLeft";
22511
+ IMarkAreaLabelPosition["topRight"] = "topRight";
22512
+ IMarkAreaLabelPosition["bottomLeft"] = "bottomLeft";
22513
+ IMarkAreaLabelPosition["bottomRight"] = "bottomRight";
22369
22514
  IMarkAreaLabelPosition["middle"] = "middle";
22370
22515
  IMarkAreaLabelPosition["insideLeft"] = "insideLeft";
22371
22516
  IMarkAreaLabelPosition["insideRight"] = "insideRight";
22372
22517
  IMarkAreaLabelPosition["insideTop"] = "insideTop";
22373
22518
  IMarkAreaLabelPosition["insideBottom"] = "insideBottom";
22519
+ IMarkAreaLabelPosition["insideTopLeft"] = "insideTopLeft";
22520
+ IMarkAreaLabelPosition["insideTopRight"] = "insideTopRight";
22521
+ IMarkAreaLabelPosition["insideBottomLeft"] = "insideBottomLeft";
22522
+ IMarkAreaLabelPosition["insideBottomRight"] = "insideBottomRight";
22374
22523
  })(IMarkAreaLabelPosition || (IMarkAreaLabelPosition = {}));
22375
22524
  var IMarkCommonArcLabelPosition;
22376
22525
  (function (IMarkCommonArcLabelPosition) {
@@ -23200,6 +23349,38 @@ const DEFAULT_CARTESIAN_MARK_AREA_TEXT_STYLE_MAP = {
23200
23349
  middle: {
23201
23350
  textAlign: 'center',
23202
23351
  textBaseline: 'middle'
23352
+ },
23353
+ topLeft: {
23354
+ textAlign: 'right',
23355
+ textBaseline: 'top'
23356
+ },
23357
+ insideTopLeft: {
23358
+ textAlign: 'left',
23359
+ textBaseline: 'top'
23360
+ },
23361
+ topRight: {
23362
+ textAlign: 'left',
23363
+ textBaseline: 'top'
23364
+ },
23365
+ insideTopRight: {
23366
+ textAlign: 'right',
23367
+ textBaseline: 'top'
23368
+ },
23369
+ bottomLeft: {
23370
+ textAlign: 'right',
23371
+ textBaseline: 'bottom'
23372
+ },
23373
+ insideBottomLeft: {
23374
+ textAlign: 'left',
23375
+ textBaseline: 'bottom'
23376
+ },
23377
+ bottomRight: {
23378
+ textAlign: 'left',
23379
+ textBaseline: 'bottom'
23380
+ },
23381
+ insideBottomRight: {
23382
+ textAlign: 'right',
23383
+ textBaseline: 'bottom'
23203
23384
  }
23204
23385
  };
23205
23386
  const DEFAULT_MARK_POINT_THEME = {
@@ -23931,7 +24112,7 @@ class MarkPoint extends Marker {
23931
24112
  this._isStraightLine =
23932
24113
  fuzzyEqualNumber(itemOffsetX, 0, FUZZY_EQUAL_DELTA) || fuzzyEqualNumber(itemOffsetY, 0, FUZZY_EQUAL_DELTA);
23933
24114
  if (this._isArcLine) {
23934
- const { x: x1, y: y1 } = newPosition;
24115
+ const { x: x1, y: y1 } = this.attribute.position;
23935
24116
  const { x: x2, y: y2 } = newItemPosition;
23936
24117
  const x0 = (x1 + x2) / 2;
23937
24118
  const y0 = (y1 + y2) / 2;
@@ -23944,6 +24125,10 @@ class MarkPoint extends Marker {
23944
24125
  startAngle = deltaXYToAngle(y1 - centerY, x1 - centerX);
23945
24126
  endAngle = deltaXYToAngle(y2 - centerY, x2 - centerX);
23946
24127
  center = { x: centerX, y: centerY };
24128
+ const R = Math.sqrt((centerX - x1) * (centerX - x1) + (centerY - y1) * (centerY - y1));
24129
+ const r = this.attribute.targetSymbol.style.size / 2;
24130
+ const deltaAngle = Math.acos(Math.sqrt(1 - (r * r) / (4 * R * R))) * 2;
24131
+ startAngle = startAngle + deltaAngle;
23947
24132
  if (arcRatio > 0) {
23948
24133
  if (endAngle < startAngle) {
23949
24134
  endAngle += Math.PI * 2;
@@ -24094,11 +24279,23 @@ class MarkPoint extends Marker {
24094
24279
  }
24095
24280
  computeNewPositionAfterTargetItem(position) {
24096
24281
  var _a, _b;
24097
- const { itemContent = {}, targetSymbol } = this.attribute;
24282
+ const { itemContent = {}, targetSymbol, itemLine } = this.attribute;
24098
24283
  const { offsetX: itemContentOffsetX = 0, offsetY: itemContentOffsetY = 0 } = itemContent;
24099
24284
  const { offset: targetSymbolOffset = 0, style: targetSymbolStyle, visible: targetItemvisible = false, size: targetSymbolSize } = targetSymbol;
24100
24285
  const targetSize = targetItemvisible ? (_b = (_a = targetSymbolStyle.size) !== null && _a !== void 0 ? _a : targetSymbolSize) !== null && _b !== void 0 ? _b : 20 : 0;
24101
- const targetOffsetAngle = deltaXYToAngle(itemContentOffsetY, itemContentOffsetX);
24286
+ let targetOffsetAngle;
24287
+ if (itemLine.type === 'type-do') {
24288
+ targetOffsetAngle = deltaXYToAngle(itemContentOffsetY, itemContentOffsetX / 2);
24289
+ }
24290
+ else if (itemLine.type === 'type-po') {
24291
+ targetOffsetAngle = deltaXYToAngle(0, itemContentOffsetX);
24292
+ }
24293
+ else if (itemLine.type === 'type-op') {
24294
+ targetOffsetAngle = deltaXYToAngle(itemContentOffsetY, 0);
24295
+ }
24296
+ else {
24297
+ targetOffsetAngle = deltaXYToAngle(itemContentOffsetY, itemContentOffsetX);
24298
+ }
24102
24299
  const newPosition = {
24103
24300
  x: position.x + (targetSize / 2 + targetSymbolOffset) * Math.cos(targetOffsetAngle),
24104
24301
  y: position.y + (targetSize / 2 + targetSymbolOffset) * Math.sin(targetOffsetAngle)
@@ -29555,6 +29752,6 @@ EmptyTip.defaultAttributes = {
29555
29752
  }
29556
29753
  };
29557
29754
 
29558
- const version = "0.20.15";
29755
+ const version = "0.20.17";
29559
29756
 
29560
29757
  export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };