@visactor/vrender-components 0.19.5-alpha.2 → 0.19.6-alpha.0
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/cjs/axis/index.d.ts +1 -0
- package/cjs/axis/index.js +2 -1
- package/cjs/axis/index.js.map +1 -1
- package/cjs/axis/tick-data/continuous.d.ts +4 -0
- package/cjs/axis/tick-data/continuous.js +61 -0
- package/cjs/axis/tick-data/continuous.js.map +1 -0
- package/cjs/axis/tick-data/discrete/linear.d.ts +6 -0
- package/cjs/axis/tick-data/discrete/linear.js +101 -0
- package/cjs/axis/tick-data/discrete/linear.js.map +1 -0
- package/cjs/axis/tick-data/discrete/polar-angle.d.ts +3 -0
- package/cjs/axis/tick-data/discrete/polar-angle.js +53 -0
- package/cjs/axis/tick-data/discrete/polar-angle.js.map +1 -0
- package/cjs/axis/tick-data/index.d.ts +5 -0
- package/cjs/axis/tick-data/index.js +26 -0
- package/cjs/axis/tick-data/index.js.map +1 -0
- package/cjs/axis/tick-data/util.d.ts +13 -0
- package/cjs/axis/tick-data/util.js +91 -0
- package/cjs/axis/tick-data/util.js.map +1 -0
- package/cjs/axis/type.d.ts +41 -1
- package/cjs/axis/type.js.map +1 -1
- package/cjs/axis/util.d.ts +11 -0
- package/cjs/axis/util.js +21 -2
- package/cjs/axis/util.js.map +1 -1
- package/cjs/brush/brush.js +2 -1
- package/cjs/brush/type.js +1 -2
- package/cjs/constant.d.ts +2 -2
- package/cjs/constant.js +2 -2
- package/cjs/constant.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/marker/common-line.js +1 -1
- package/cjs/marker/common-line.js.map +1 -1
- package/cjs/marker/line.js +5 -9
- package/cjs/marker/line.js.map +1 -1
- package/cjs/marker/point.d.ts +4 -3
- package/cjs/marker/point.js +29 -27
- package/cjs/marker/point.js.map +1 -1
- package/cjs/segment/arc-segment.js +4 -4
- package/cjs/segment/arc-segment.js.map +1 -1
- package/cjs/segment/segment.js +5 -5
- package/cjs/segment/segment.js.map +1 -1
- package/cjs/util/common.d.ts +7 -2
- package/cjs/util/common.js +17 -7
- package/cjs/util/common.js.map +1 -1
- package/cjs/util/text.d.ts +1 -1
- package/cjs/util/text.js +3 -3
- package/cjs/util/text.js.map +1 -1
- package/dist/index.es.js +611 -94
- package/es/axis/index.d.ts +1 -0
- package/es/axis/index.js +2 -0
- package/es/axis/index.js.map +1 -1
- package/es/axis/tick-data/continuous.d.ts +4 -0
- package/es/axis/tick-data/continuous.js +56 -0
- package/es/axis/tick-data/continuous.js.map +1 -0
- package/es/axis/tick-data/discrete/linear.d.ts +6 -0
- package/es/axis/tick-data/discrete/linear.js +90 -0
- package/es/axis/tick-data/discrete/linear.js.map +1 -0
- package/es/axis/tick-data/discrete/polar-angle.d.ts +3 -0
- package/es/axis/tick-data/discrete/polar-angle.js +45 -0
- package/es/axis/tick-data/discrete/polar-angle.js.map +1 -0
- package/es/axis/tick-data/index.d.ts +5 -0
- package/es/axis/tick-data/index.js +21 -0
- package/es/axis/tick-data/index.js.map +1 -0
- package/es/axis/tick-data/util.d.ts +13 -0
- package/es/axis/tick-data/util.js +80 -0
- package/es/axis/tick-data/util.js.map +1 -0
- package/es/axis/type.d.ts +41 -1
- package/es/axis/type.js.map +1 -1
- package/es/axis/util.d.ts +11 -0
- package/es/axis/util.js +19 -1
- package/es/axis/util.js.map +1 -1
- package/es/brush/brush.js +2 -1
- package/es/brush/type.js +1 -2
- package/es/constant.d.ts +2 -2
- package/es/constant.js +2 -2
- package/es/constant.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/marker/common-line.js +1 -1
- package/es/marker/common-line.js.map +1 -1
- package/es/marker/line.js +4 -10
- package/es/marker/line.js.map +1 -1
- package/es/marker/point.d.ts +4 -3
- package/es/marker/point.js +26 -26
- package/es/marker/point.js.map +1 -1
- package/es/segment/arc-segment.js +4 -4
- package/es/segment/arc-segment.js.map +1 -1
- package/es/segment/segment.js +5 -5
- package/es/segment/segment.js.map +1 -1
- package/es/util/common.d.ts +7 -2
- package/es/util/common.js +14 -4
- package/es/util/common.js.map +1 -1
- package/es/util/text.d.ts +1 -1
- package/es/util/text.js +3 -3
- package/es/util/text.js.map +1 -1
- package/package.json +8 -8
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, Point, PointService, abs, max, min, atan2, Matrix, Logger, pi2, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, isArray, cos, sin, pi, pointAt, isNumber, getDecimalPlaces, isNil, Color, has, normalTransform, isValidUrl, isBase64, epsilon, acos, sqrt, LRU, clampAngleByRadian, asin, transformBoundsWithMatrix, arrayEqual, Bounds, getRectIntersect, isRectIntersect, isPlainObject, merge, clamp, clampRange, normalizePadding, debounce, throttle, hexToRgb, isEmpty, isValid, rectInsideAnotherRect, radianToDegree, getAngleByPoint, polarToCartesian as polarToCartesian$1, array, isValidNumber, calculateAnchorOfBounds, isGreater, isLess, isNumberClose, flattenArray, cloneDeep, get, isRotateAABBIntersect, last, mixin, isEqual, interpolateString, minInArray, polygonContainPoint } from '@visactor/vutils';
|
|
2
|
-
import { LinearScale } from '@visactor/vscale';
|
|
1
|
+
import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, Point, PointService, abs, max, min, atan2, Matrix, Logger, pi2, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, isArray, cos, sin, pi, pointAt, isNumber, getDecimalPlaces, isNil, Color, has, normalTransform, isValidUrl, isBase64, epsilon, acos, sqrt, LRU, clampAngleByRadian, asin, transformBoundsWithMatrix, arrayEqual, Bounds, getRectIntersect, isRectIntersect, isPlainObject, merge, clamp, clampRange, normalizePadding, debounce, throttle, hexToRgb, isEmpty, isValid, rectInsideAnotherRect, radianToDegree, getAngleByPoint, polarToCartesian as polarToCartesian$1, array, isValidNumber, calculateAnchorOfBounds, isGreater, isLess, isNumberClose, flattenArray, normalizeAngle as normalizeAngle$1, cloneDeep, get, isRotateAABBIntersect, last, mixin, isEqual, interpolateString, minInArray, maxInArray, binaryFuzzySearchInNumberRange, polygonContainPoint } from '@visactor/vutils';
|
|
2
|
+
import { isContinuous, isDiscrete, LinearScale } from '@visactor/vscale';
|
|
3
3
|
|
|
4
4
|
function _toPrimitive(t, r) {
|
|
5
5
|
if ("object" != typeof t || !t) return t;
|
|
@@ -6004,7 +6004,7 @@ function drawPathProxy(graphic, context, x, y, drawContext, params, fillCb, stro
|
|
|
6004
6004
|
const path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
|
|
6005
6005
|
return renderCommandList(path.commandList, context, x, y), context.setShadowBlendStyle && context.setShadowBlendStyle(graphic, graphic.attribute, themeAttributes), doStroke && (strokeCb ? strokeCb(context, graphic.attribute, themeAttributes) : sVisible && (context.setStrokeStyle(graphic, graphic.attribute, x - originX, y - originY, themeAttributes), context.stroke())), doFill && (fillCb ? fillCb(context, graphic.attribute, themeAttributes) : fVisible && (context.setCommonStyle(graphic, graphic.attribute, x - originX, y - originY, themeAttributes), context.fill())), !0;
|
|
6006
6006
|
}
|
|
6007
|
-
function intersect$
|
|
6007
|
+
function intersect$2(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
6008
6008
|
const x10 = x1 - x0,
|
|
6009
6009
|
y10 = y1 - y0,
|
|
6010
6010
|
x32 = x3 - x2,
|
|
@@ -6083,7 +6083,7 @@ function drawArcPath(arc, context, cx, cy, outerRadius, innerRadius, partStroke)
|
|
|
6083
6083
|
yire = innerRadius * sin(innerEndAngle);
|
|
6084
6084
|
let xore, yore, xirs, yirs;
|
|
6085
6085
|
if ((maxInnerCornerRadius > epsilon || maxOuterCornerRadius > epsilon) && (xore = outerRadius * cos(outerEndAngle), yore = outerRadius * sin(outerEndAngle), xirs = innerRadius * cos(innerStartAngle), yirs = innerRadius * sin(innerStartAngle), deltaAngle < pi)) {
|
|
6086
|
-
const oc = intersect$
|
|
6086
|
+
const oc = intersect$2(xors, yors, xirs, yirs, xore, yore, xire, yire);
|
|
6087
6087
|
if (oc) {
|
|
6088
6088
|
const ax = xors - oc[0],
|
|
6089
6089
|
ay = yors - oc[1],
|
|
@@ -10863,7 +10863,7 @@ let DefaultCanvasArcRender = class DefaultCanvasArcRender extends BaseRender {
|
|
|
10863
10863
|
yire = innerRadius * sin(innerEndAngle);
|
|
10864
10864
|
let xore, yore, xirs, yirs;
|
|
10865
10865
|
if ((maxInnerCornerRadius > epsilon || maxOuterCornerRadius > epsilon) && (xore = outerRadius * cos(outerEndAngle), yore = outerRadius * sin(outerEndAngle), xirs = innerRadius * cos(innerStartAngle), yirs = innerRadius * sin(innerStartAngle), deltaAngle < pi)) {
|
|
10866
|
-
const oc = intersect$
|
|
10866
|
+
const oc = intersect$2(xors, yors, xirs, yirs, xore, yore, xire, yire);
|
|
10867
10867
|
if (oc) {
|
|
10868
10868
|
const ax = xors - oc[0],
|
|
10869
10869
|
ay = yors - oc[1],
|
|
@@ -15155,8 +15155,8 @@ function loadScrollbarComponent() {
|
|
|
15155
15155
|
|
|
15156
15156
|
const POLAR_START_ANGLE = -0.5 * Math.PI;
|
|
15157
15157
|
const POLAR_END_ANGLE = 1.5 * Math.PI;
|
|
15158
|
-
const DEFAULT_TEXT_FONT_FAMILY = 'PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,
|
|
15159
|
-
const DEFAULT_TEXT_FONT_SIZE =
|
|
15158
|
+
const DEFAULT_TEXT_FONT_FAMILY = 'PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol';
|
|
15159
|
+
const DEFAULT_TEXT_FONT_SIZE = 14;
|
|
15160
15160
|
var StateValue;
|
|
15161
15161
|
(function (StateValue) {
|
|
15162
15162
|
StateValue["selected"] = "selected";
|
|
@@ -15541,14 +15541,33 @@ function removeRepeatPoint(points) {
|
|
|
15541
15541
|
}
|
|
15542
15542
|
return result;
|
|
15543
15543
|
}
|
|
15544
|
-
function
|
|
15545
|
-
return angle >
|
|
15544
|
+
function isPostiveXAxis(angle) {
|
|
15545
|
+
return (angle >= 0 && angle < Math.PI / 2) || (angle > (Math.PI * 3) / 2 && angle <= Math.PI * 2);
|
|
15546
15546
|
}
|
|
15547
|
-
function
|
|
15548
|
-
|
|
15549
|
-
|
|
15547
|
+
function fuzzyEqualNumber(a, b, delta) {
|
|
15548
|
+
return Math.abs(a - b) < delta;
|
|
15549
|
+
}
|
|
15550
|
+
function getTextAlignAttrOfVerticalDir(autoRotate, lineEndAngle, itemPosition) {
|
|
15551
|
+
if (autoRotate) {
|
|
15552
|
+
return {
|
|
15553
|
+
textAlign: 'right',
|
|
15554
|
+
textBaseline: 'middle'
|
|
15555
|
+
};
|
|
15550
15556
|
}
|
|
15551
|
-
return
|
|
15557
|
+
return {
|
|
15558
|
+
textAlign: (lineEndAngle < Math.PI && itemPosition.toLocaleLowerCase().includes('top')) ||
|
|
15559
|
+
(lineEndAngle > Math.PI && itemPosition.toLocaleLowerCase().includes('bottom'))
|
|
15560
|
+
? 'left'
|
|
15561
|
+
:
|
|
15562
|
+
(lineEndAngle < Math.PI && itemPosition.toLocaleLowerCase().includes('bottom')) ||
|
|
15563
|
+
(lineEndAngle > Math.PI && itemPosition.toLocaleLowerCase().includes('top'))
|
|
15564
|
+
? 'right'
|
|
15565
|
+
: 'center',
|
|
15566
|
+
textBaseline: (lineEndAngle < Math.PI && itemPosition.includes('inside')) ||
|
|
15567
|
+
(lineEndAngle > Math.PI && !itemPosition.includes('inside'))
|
|
15568
|
+
? 'bottom'
|
|
15569
|
+
: 'top'
|
|
15570
|
+
};
|
|
15552
15571
|
}
|
|
15553
15572
|
|
|
15554
15573
|
const defaultAlternativeColors = ['#ffffff', '#000000'];
|
|
@@ -15708,11 +15727,8 @@ function angleTo(v1, v2, direct) {
|
|
|
15708
15727
|
return Math.PI * 2 - ang;
|
|
15709
15728
|
}
|
|
15710
15729
|
|
|
15711
|
-
const initTextMeasure = (textSpec, option, useNaiveCanvas) => {
|
|
15712
|
-
return new TextMeasure(Object.assign({ defaultFontParams: {
|
|
15713
|
-
fontFamily: DEFAULT_TEXT_FONT_FAMILY,
|
|
15714
|
-
fontSize: DEFAULT_TEXT_FONT_SIZE
|
|
15715
|
-
}, getTextBounds: useNaiveCanvas ? undefined : getTextBounds, specialCharSet: '-/: .,@%\'"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase() }, (option !== null && option !== void 0 ? option : {})), textSpec);
|
|
15730
|
+
const initTextMeasure = (textSpec, option, useNaiveCanvas, defaultFontParams) => {
|
|
15731
|
+
return new TextMeasure(Object.assign({ defaultFontParams: Object.assign({ fontFamily: DEFAULT_TEXT_FONT_FAMILY, fontSize: DEFAULT_TEXT_FONT_SIZE }, defaultFontParams), getTextBounds: useNaiveCanvas ? undefined : getTextBounds, specialCharSet: '-/: .,@%\'"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase() }, (option !== null && option !== void 0 ? option : {})), textSpec);
|
|
15716
15732
|
};
|
|
15717
15733
|
function measureTextSize(text, textSpec, defaultTextTheme = {}) {
|
|
15718
15734
|
if (!text) {
|
|
@@ -18836,10 +18852,18 @@ function loadArcSegmentComponent() {
|
|
|
18836
18852
|
loadSegmentComponent();
|
|
18837
18853
|
class Segment extends AbstractComponent {
|
|
18838
18854
|
getStartAngle() {
|
|
18839
|
-
return this._startAngle
|
|
18855
|
+
return this._startAngle < 0
|
|
18856
|
+
? this._startAngle + Math.PI * 2
|
|
18857
|
+
: this._startAngle > Math.PI * 2
|
|
18858
|
+
? this._startAngle - Math.PI * 2
|
|
18859
|
+
: this._startAngle;
|
|
18840
18860
|
}
|
|
18841
18861
|
getEndAngle() {
|
|
18842
|
-
return this._endAngle
|
|
18862
|
+
return this._endAngle < 0
|
|
18863
|
+
? this._endAngle + Math.PI * 2
|
|
18864
|
+
: this._endAngle > Math.PI * 2
|
|
18865
|
+
? this._endAngle - Math.PI * 2
|
|
18866
|
+
: this._endAngle;
|
|
18843
18867
|
}
|
|
18844
18868
|
getMainSegmentPoints() {
|
|
18845
18869
|
return this._mainSegmentPoints;
|
|
@@ -18914,8 +18938,8 @@ class Segment extends AbstractComponent {
|
|
|
18914
18938
|
const { autoRotate = true } = attribute;
|
|
18915
18939
|
let symbol;
|
|
18916
18940
|
if (attribute && attribute.visible) {
|
|
18917
|
-
const startAngle = this.
|
|
18918
|
-
const endAngle = this.
|
|
18941
|
+
const startAngle = this.getStartAngle();
|
|
18942
|
+
const endAngle = this.getEndAngle();
|
|
18919
18943
|
const { state } = this.attribute;
|
|
18920
18944
|
const start = points[0];
|
|
18921
18945
|
const end = points[points.length - 1];
|
|
@@ -18929,14 +18953,14 @@ class Segment extends AbstractComponent {
|
|
|
18929
18953
|
y: start.y +
|
|
18930
18954
|
(isValidNumber(startAngle) ? refX * Math.sin(startAngle) + refY * Math.sin(startAngle - Math.PI / 2) : 0)
|
|
18931
18955
|
};
|
|
18932
|
-
rotate = this._computeStartRotate(
|
|
18956
|
+
rotate = this._computeStartRotate(this._startAngle);
|
|
18933
18957
|
}
|
|
18934
18958
|
else {
|
|
18935
18959
|
position = {
|
|
18936
18960
|
x: end.x + (isValidNumber(endAngle) ? refX * Math.cos(endAngle) + refY * Math.cos(endAngle - Math.PI / 2) : 0),
|
|
18937
18961
|
y: end.y + (isValidNumber(endAngle) ? refX * Math.sin(endAngle) + refY * Math.sin(endAngle - Math.PI / 2) : 0)
|
|
18938
18962
|
};
|
|
18939
|
-
rotate = this._computeEndRotate(
|
|
18963
|
+
rotate = this._computeEndRotate(this._endAngle);
|
|
18940
18964
|
}
|
|
18941
18965
|
symbol = graphicCreator.symbol(Object.assign(Object.assign(Object.assign({}, position), { symbolType: symbolType, size, angle: autoRotate ? rotate + refAngle : 0, strokeBoundsBuffer: 0 }), style));
|
|
18942
18966
|
symbol.name = `${this.name}-${dim}-symbol`;
|
|
@@ -19066,12 +19090,12 @@ class ArcSegment extends Segment {
|
|
|
19066
19090
|
this.isReverseArc = false;
|
|
19067
19091
|
}
|
|
19068
19092
|
getStartAngle() {
|
|
19069
|
-
const
|
|
19070
|
-
return
|
|
19093
|
+
const tangAng = this.isReverseArc ? this._startAngle + Math.PI / 2 : this._startAngle - Math.PI / 2;
|
|
19094
|
+
return tangAng < 0 ? tangAng + Math.PI * 2 : tangAng > Math.PI * 2 ? tangAng - Math.PI * 2 : tangAng;
|
|
19071
19095
|
}
|
|
19072
19096
|
getEndAngle() {
|
|
19073
|
-
const
|
|
19074
|
-
return
|
|
19097
|
+
const tangAng = this.isReverseArc ? this._endAngle - Math.PI / 2 : this._endAngle + Math.PI / 2;
|
|
19098
|
+
return tangAng < 0 ? tangAng + Math.PI * 2 : tangAng > Math.PI * 2 ? tangAng - Math.PI * 2 : tangAng;
|
|
19075
19099
|
}
|
|
19076
19100
|
getMainSegmentPoints() {
|
|
19077
19101
|
return this._mainSegmentPoints;
|
|
@@ -19278,6 +19302,36 @@ function getCircleVerticalVector(offset, point, center, inside = false, axisInsi
|
|
|
19278
19302
|
const vector = [point.x - center.x, point.y - center.y];
|
|
19279
19303
|
return scale(vector, ((inside ? -1 : 1) * (axisInside ? -1 : 1) * offset) / length(vector));
|
|
19280
19304
|
}
|
|
19305
|
+
function angleLabelOrientAttribute(angle) {
|
|
19306
|
+
let align = 'center';
|
|
19307
|
+
let baseline = 'middle';
|
|
19308
|
+
angle = normalizeAngle$1(angle);
|
|
19309
|
+
if (angle >= Math.PI * (5 / 3) || angle <= Math.PI * (1 / 3)) {
|
|
19310
|
+
align = 'left';
|
|
19311
|
+
}
|
|
19312
|
+
else if (angle >= Math.PI * (2 / 3) && angle <= Math.PI * (4 / 3)) {
|
|
19313
|
+
align = 'right';
|
|
19314
|
+
}
|
|
19315
|
+
else {
|
|
19316
|
+
align = 'center';
|
|
19317
|
+
}
|
|
19318
|
+
if (angle >= Math.PI * (7 / 6) && angle <= Math.PI * (11 / 6)) {
|
|
19319
|
+
baseline = 'bottom';
|
|
19320
|
+
}
|
|
19321
|
+
else if (angle >= Math.PI * (1 / 6) && angle <= Math.PI * (5 / 6)) {
|
|
19322
|
+
baseline = 'top';
|
|
19323
|
+
}
|
|
19324
|
+
else {
|
|
19325
|
+
baseline = 'middle';
|
|
19326
|
+
}
|
|
19327
|
+
return { align, baseline };
|
|
19328
|
+
}
|
|
19329
|
+
function getPolarAngleLabelPosition(angle, center, radius, labelOffset, inside, text, style) {
|
|
19330
|
+
const point = polarToCartesian$1({ x: 0, y: 0 }, radius, angle);
|
|
19331
|
+
const labelPoint = getVerticalCoord(point, getCircleVerticalVector(labelOffset, point, center, inside));
|
|
19332
|
+
const vector = getCircleVerticalVector(labelOffset || 1, labelPoint, center, inside);
|
|
19333
|
+
return getCircleLabelPosition(labelPoint, vector, text, style);
|
|
19334
|
+
}
|
|
19281
19335
|
|
|
19282
19336
|
const dispatchHoverState = (e, container, lastHover) => {
|
|
19283
19337
|
const target = e.target;
|
|
@@ -19760,14 +19814,14 @@ function itemIntersect(item1, item2) {
|
|
|
19760
19814
|
: true));
|
|
19761
19815
|
}
|
|
19762
19816
|
|
|
19763
|
-
const methods = {
|
|
19817
|
+
const methods$1 = {
|
|
19764
19818
|
parity: function (items) {
|
|
19765
19819
|
return items.filter((item, i) => (i % 2 ? item.setAttribute('opacity', 0) : 1));
|
|
19766
19820
|
},
|
|
19767
19821
|
greedy: function (items, sep) {
|
|
19768
19822
|
let a;
|
|
19769
19823
|
return items.filter((b, i) => {
|
|
19770
|
-
if (!i || !intersect(a, b, sep)) {
|
|
19824
|
+
if (!i || !intersect$1(a, b, sep)) {
|
|
19771
19825
|
a = b;
|
|
19772
19826
|
return 1;
|
|
19773
19827
|
}
|
|
@@ -19775,7 +19829,7 @@ const methods = {
|
|
|
19775
19829
|
});
|
|
19776
19830
|
}
|
|
19777
19831
|
};
|
|
19778
|
-
function intersect(textA, textB, sep) {
|
|
19832
|
+
function intersect$1(textA, textB, sep) {
|
|
19779
19833
|
const a = textA.AABBBounds;
|
|
19780
19834
|
const b = textB.AABBBounds;
|
|
19781
19835
|
return (sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2) &&
|
|
@@ -19784,9 +19838,9 @@ function intersect(textA, textB, sep) {
|
|
|
19784
19838
|
Math.max(textB.rotatedBounds.x1 - textA.rotatedBounds.x2, textA.rotatedBounds.x1 - textB.rotatedBounds.x2, textB.rotatedBounds.y1 - textA.rotatedBounds.y2, textA.rotatedBounds.y1 - textB.rotatedBounds.y2)
|
|
19785
19839
|
: true));
|
|
19786
19840
|
}
|
|
19787
|
-
function hasOverlap(items, pad) {
|
|
19841
|
+
function hasOverlap$1(items, pad) {
|
|
19788
19842
|
for (let i = 1, n = items.length, a = items[0], b; i < n; a = b, ++i) {
|
|
19789
|
-
if (intersect(a, (b = items[i]), pad)) {
|
|
19843
|
+
if (intersect$1(a, (b = items[i]), pad)) {
|
|
19790
19844
|
return true;
|
|
19791
19845
|
}
|
|
19792
19846
|
}
|
|
@@ -19811,11 +19865,11 @@ function autoHide(labels, config) {
|
|
|
19811
19865
|
items = reset(source);
|
|
19812
19866
|
genRotateBounds(items);
|
|
19813
19867
|
const { method = 'parity', separation: sep = 0 } = config;
|
|
19814
|
-
const reduce = isFunction(method) ? method : methods[method] || methods.parity;
|
|
19815
|
-
if (items.length >= 3 && hasOverlap(items, sep)) {
|
|
19868
|
+
const reduce = isFunction(method) ? method : methods$1[method] || methods$1.parity;
|
|
19869
|
+
if (items.length >= 3 && hasOverlap$1(items, sep)) {
|
|
19816
19870
|
do {
|
|
19817
19871
|
items = reduce(items, sep);
|
|
19818
|
-
} while (items.length >= 3 && hasOverlap(items, sep));
|
|
19872
|
+
} while (items.length >= 3 && hasOverlap$1(items, sep));
|
|
19819
19873
|
const checkLast = items.length < 3 || config.lastVisible;
|
|
19820
19874
|
if (checkLast) {
|
|
19821
19875
|
const lastSourceItem = last(source);
|
|
@@ -19824,7 +19878,7 @@ function autoHide(labels, config) {
|
|
|
19824
19878
|
if (remainLength > 1) {
|
|
19825
19879
|
lastSourceItem.setAttribute('opacity', 1);
|
|
19826
19880
|
for (let i = remainLength - 1; i >= 0; i--) {
|
|
19827
|
-
if (intersect(items[i], lastSourceItem, sep)) {
|
|
19881
|
+
if (intersect$1(items[i], lastSourceItem, sep)) {
|
|
19828
19882
|
items[i].setAttribute('opacity', 0);
|
|
19829
19883
|
}
|
|
19830
19884
|
else {
|
|
@@ -20871,6 +20925,482 @@ class GroupFadeOut extends ACustomAnimate {
|
|
|
20871
20925
|
}
|
|
20872
20926
|
}
|
|
20873
20927
|
|
|
20928
|
+
const convertDomainToTickData = (domain) => {
|
|
20929
|
+
const ticks = domain.map((t, index) => {
|
|
20930
|
+
return {
|
|
20931
|
+
index,
|
|
20932
|
+
value: t
|
|
20933
|
+
};
|
|
20934
|
+
});
|
|
20935
|
+
return ticks;
|
|
20936
|
+
};
|
|
20937
|
+
const labelOverlap = (prevLabel, nextLabel, gap = 0) => {
|
|
20938
|
+
const prevBounds = new AABBBounds(prevLabel).expand(gap / 2);
|
|
20939
|
+
const nextBounds = new AABBBounds(nextLabel).expand(gap / 2);
|
|
20940
|
+
return prevBounds.intersects(nextBounds);
|
|
20941
|
+
};
|
|
20942
|
+
function intersect(a, b, sep) {
|
|
20943
|
+
return sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2);
|
|
20944
|
+
}
|
|
20945
|
+
function hasOverlap(items, pad) {
|
|
20946
|
+
for (let i = 1, n = items.length, a = items[0], b; i < n; a = b, ++i) {
|
|
20947
|
+
b = items[i];
|
|
20948
|
+
if (intersect(a.AABBBounds, b.AABBBounds, pad)) {
|
|
20949
|
+
return true;
|
|
20950
|
+
}
|
|
20951
|
+
}
|
|
20952
|
+
return false;
|
|
20953
|
+
}
|
|
20954
|
+
const MIN_TICK_GAP = 12;
|
|
20955
|
+
const calculateFlushPos = (basePosition, size, rangePosition, otherEnd) => {
|
|
20956
|
+
return rangePosition < basePosition
|
|
20957
|
+
? Math.max(basePosition - size / 2, rangePosition)
|
|
20958
|
+
: rangePosition > basePosition
|
|
20959
|
+
? Math.min(basePosition - size / 2, rangePosition - size)
|
|
20960
|
+
: rangePosition < otherEnd
|
|
20961
|
+
? rangePosition
|
|
20962
|
+
: rangePosition - size;
|
|
20963
|
+
};
|
|
20964
|
+
const getCartesianLabelBounds = (scale, domain, op) => {
|
|
20965
|
+
var _a;
|
|
20966
|
+
const { labelStyle, axisOrientType, labelFlush, labelFormatter, startAngle = 0 } = op;
|
|
20967
|
+
let labelAngle = (_a = labelStyle.angle) !== null && _a !== void 0 ? _a : 0;
|
|
20968
|
+
if (labelStyle.direction === 'vertical') {
|
|
20969
|
+
labelAngle += degreeToRadian(90);
|
|
20970
|
+
}
|
|
20971
|
+
const isHorizontal = ['bottom', 'top'].includes(axisOrientType);
|
|
20972
|
+
const isVertical = ['left', 'right'].includes(axisOrientType);
|
|
20973
|
+
let scaleX = 1;
|
|
20974
|
+
let scaleY = 0;
|
|
20975
|
+
if (isHorizontal) ;
|
|
20976
|
+
else if (isVertical) {
|
|
20977
|
+
scaleX = 0;
|
|
20978
|
+
scaleY = 1;
|
|
20979
|
+
}
|
|
20980
|
+
else if (startAngle) {
|
|
20981
|
+
scaleX = Math.cos(startAngle);
|
|
20982
|
+
scaleY = -Math.sin(startAngle);
|
|
20983
|
+
}
|
|
20984
|
+
const textMeasure = initTextMeasure(labelStyle);
|
|
20985
|
+
const range = scale.range();
|
|
20986
|
+
const labelBoundsList = domain.map((v, i) => {
|
|
20987
|
+
var _a, _b;
|
|
20988
|
+
const str = labelFormatter ? labelFormatter(v) : `${v}`;
|
|
20989
|
+
const { width, height } = textMeasure.quickMeasure(str);
|
|
20990
|
+
const textWidth = Math.max(width, MIN_TICK_GAP);
|
|
20991
|
+
const textHeight = Math.max(height, MIN_TICK_GAP);
|
|
20992
|
+
const pos = scale.scale(v);
|
|
20993
|
+
const baseTextX = scaleX * pos;
|
|
20994
|
+
const baseTextY = scaleY * pos;
|
|
20995
|
+
let textX = baseTextX;
|
|
20996
|
+
let textY = baseTextY;
|
|
20997
|
+
let align;
|
|
20998
|
+
if (labelFlush && isHorizontal && i === 0) {
|
|
20999
|
+
textX = calculateFlushPos(baseTextX, textWidth, range[0], range[range.length - 1]);
|
|
21000
|
+
}
|
|
21001
|
+
else if (labelFlush && isHorizontal && i === domain.length - 1) {
|
|
21002
|
+
textX = calculateFlushPos(baseTextX, textWidth, range[range.length - 1], range[0]);
|
|
21003
|
+
}
|
|
21004
|
+
else {
|
|
21005
|
+
align = (_a = labelStyle.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
21006
|
+
}
|
|
21007
|
+
if (align === 'right') {
|
|
21008
|
+
textX -= textWidth;
|
|
21009
|
+
}
|
|
21010
|
+
else if (align === 'center') {
|
|
21011
|
+
textX -= textWidth / 2;
|
|
21012
|
+
}
|
|
21013
|
+
let baseline;
|
|
21014
|
+
if (labelFlush && isVertical && i === 0) {
|
|
21015
|
+
textY = calculateFlushPos(baseTextY, textHeight, range[0], range[range.length - 1]);
|
|
21016
|
+
}
|
|
21017
|
+
else if (labelFlush && isVertical && i === domain.length - 1) {
|
|
21018
|
+
textY = calculateFlushPos(baseTextY, textHeight, range[range.length - 1], range[0]);
|
|
21019
|
+
}
|
|
21020
|
+
else {
|
|
21021
|
+
baseline = (_b = labelStyle.textBaseline) !== null && _b !== void 0 ? _b : 'middle';
|
|
21022
|
+
}
|
|
21023
|
+
if (baseline === 'bottom') {
|
|
21024
|
+
textY -= textHeight;
|
|
21025
|
+
}
|
|
21026
|
+
else if (baseline === 'middle') {
|
|
21027
|
+
textY -= textHeight / 2;
|
|
21028
|
+
}
|
|
21029
|
+
const bounds = new AABBBounds().set(textX, textY, textX + textWidth, textY + textHeight);
|
|
21030
|
+
if (labelAngle) {
|
|
21031
|
+
bounds.rotate(labelAngle, baseTextX, baseTextY);
|
|
21032
|
+
}
|
|
21033
|
+
return bounds;
|
|
21034
|
+
});
|
|
21035
|
+
return labelBoundsList;
|
|
21036
|
+
};
|
|
21037
|
+
const getPolarAngleLabelBounds = (scale, domain, op) => {
|
|
21038
|
+
var _a;
|
|
21039
|
+
const { labelStyle, getRadius, labelOffset, labelFormatter, inside } = op;
|
|
21040
|
+
const radius = getRadius === null || getRadius === void 0 ? void 0 : getRadius();
|
|
21041
|
+
const labelAngle = (_a = labelStyle.angle) !== null && _a !== void 0 ? _a : 0;
|
|
21042
|
+
const textMeasure = initTextMeasure(labelStyle);
|
|
21043
|
+
const labelBoundsList = domain.map((v) => {
|
|
21044
|
+
var _a, _b;
|
|
21045
|
+
const str = labelFormatter ? labelFormatter(v) : `${v}`;
|
|
21046
|
+
const { width, height } = textMeasure.quickMeasure(str);
|
|
21047
|
+
const textWidth = Math.max(width, MIN_TICK_GAP);
|
|
21048
|
+
const textHeight = Math.max(height, MIN_TICK_GAP);
|
|
21049
|
+
const angle = scale.scale(v);
|
|
21050
|
+
let textX = 0;
|
|
21051
|
+
let textY = 0;
|
|
21052
|
+
const orient = {
|
|
21053
|
+
align: (_a = labelStyle.textAlign) !== null && _a !== void 0 ? _a : 'center',
|
|
21054
|
+
baseline: (_b = labelStyle.textBaseline) !== null && _b !== void 0 ? _b : 'middle'
|
|
21055
|
+
};
|
|
21056
|
+
const { x, y } = getPolarAngleLabelPosition(angle, { x: 0, y: 0 }, radius, labelOffset, inside, str, labelStyle);
|
|
21057
|
+
textX = x + (orient.align === 'right' ? -textWidth : orient.align === 'center' ? -textWidth / 2 : 0);
|
|
21058
|
+
textY = y + (orient.baseline === 'bottom' ? -textHeight : orient.baseline === 'middle' ? -textHeight / 2 : 0);
|
|
21059
|
+
const bounds = new AABBBounds()
|
|
21060
|
+
.set(textX, textY, textX + textWidth, textY + textHeight)
|
|
21061
|
+
.rotate(labelAngle, textX + textWidth / 2, textY + textHeight / 2);
|
|
21062
|
+
return bounds;
|
|
21063
|
+
});
|
|
21064
|
+
return labelBoundsList;
|
|
21065
|
+
};
|
|
21066
|
+
const isAxisHorizontal = (axisOrientType) => {
|
|
21067
|
+
return ['bottom', 'top', 'z'].includes(axisOrientType);
|
|
21068
|
+
};
|
|
21069
|
+
|
|
21070
|
+
const DEFAULT_CONTINUOUS_TICK_COUNT = 5;
|
|
21071
|
+
const continuousTicks = (scale, op) => {
|
|
21072
|
+
if (!isContinuous(scale.type)) {
|
|
21073
|
+
return convertDomainToTickData(scale.domain());
|
|
21074
|
+
}
|
|
21075
|
+
const range = scale.range();
|
|
21076
|
+
const rangeSize = Math.abs(range[range.length - 1] - range[0]);
|
|
21077
|
+
if (rangeSize < 2) {
|
|
21078
|
+
return convertDomainToTickData([scale.domain()[0]]);
|
|
21079
|
+
}
|
|
21080
|
+
const { tickCount, forceTickCount, tickStep, noDecimals = false, labelStyle } = op;
|
|
21081
|
+
let scaleTicks;
|
|
21082
|
+
if (isValid(tickStep)) {
|
|
21083
|
+
scaleTicks = scale.stepTicks(tickStep);
|
|
21084
|
+
}
|
|
21085
|
+
else if (isValid(forceTickCount)) {
|
|
21086
|
+
scaleTicks = scale.forceTicks(forceTickCount);
|
|
21087
|
+
}
|
|
21088
|
+
else if (op.tickMode === 'd3') {
|
|
21089
|
+
const count = isFunction(tickCount) ? tickCount({ axisLength: rangeSize, labelStyle }) : tickCount;
|
|
21090
|
+
scaleTicks = scale.d3Ticks(count !== null && count !== void 0 ? count : DEFAULT_CONTINUOUS_TICK_COUNT, { noDecimals });
|
|
21091
|
+
}
|
|
21092
|
+
else {
|
|
21093
|
+
const count = isFunction(tickCount) ? tickCount({ axisLength: rangeSize, labelStyle }) : tickCount;
|
|
21094
|
+
scaleTicks = scale.ticks(count !== null && count !== void 0 ? count : DEFAULT_CONTINUOUS_TICK_COUNT, { noDecimals });
|
|
21095
|
+
}
|
|
21096
|
+
if (op.sampling) {
|
|
21097
|
+
if (op.coordinateType === 'cartesian' || (op.coordinateType === 'polar' && op.axisOrientType === 'radius')) {
|
|
21098
|
+
const { labelGap = 4, labelFlush } = op;
|
|
21099
|
+
let items = getCartesianLabelBounds(scale, scaleTicks, op).map((bounds, i) => ({
|
|
21100
|
+
AABBBounds: bounds,
|
|
21101
|
+
value: scaleTicks[i]
|
|
21102
|
+
}));
|
|
21103
|
+
while (items.length >= 3 && hasOverlap(items, labelGap)) {
|
|
21104
|
+
items = methods.parity(items);
|
|
21105
|
+
}
|
|
21106
|
+
const ticks = items.map(item => item.value);
|
|
21107
|
+
if (ticks.length < 3 && labelFlush) {
|
|
21108
|
+
if (ticks.length > 1) {
|
|
21109
|
+
ticks.pop();
|
|
21110
|
+
}
|
|
21111
|
+
if (last(ticks) !== last(scaleTicks)) {
|
|
21112
|
+
ticks.push(last(scaleTicks));
|
|
21113
|
+
}
|
|
21114
|
+
}
|
|
21115
|
+
scaleTicks = ticks;
|
|
21116
|
+
}
|
|
21117
|
+
}
|
|
21118
|
+
return convertDomainToTickData(scaleTicks);
|
|
21119
|
+
};
|
|
21120
|
+
const methods = {
|
|
21121
|
+
parity: function (items) {
|
|
21122
|
+
return items.filter((item, i) => i % 2 === 0);
|
|
21123
|
+
},
|
|
21124
|
+
greedy: function (items, sep) {
|
|
21125
|
+
let a;
|
|
21126
|
+
return items.filter((b, i) => {
|
|
21127
|
+
if (!i || !intersect(a.AABBBounds, b.AABBBounds, sep)) {
|
|
21128
|
+
a = b;
|
|
21129
|
+
return true;
|
|
21130
|
+
}
|
|
21131
|
+
return false;
|
|
21132
|
+
});
|
|
21133
|
+
}
|
|
21134
|
+
};
|
|
21135
|
+
|
|
21136
|
+
const getOneDimensionalLabelBounds = (scale, domain, op, isHorizontal) => {
|
|
21137
|
+
const labelBoundsList = getCartesianLabelBounds(scale, domain, op);
|
|
21138
|
+
return labelBoundsList.map(bounds => {
|
|
21139
|
+
if (isHorizontal) {
|
|
21140
|
+
return [bounds.x1, bounds.x2, bounds.width()];
|
|
21141
|
+
}
|
|
21142
|
+
return [bounds.y1, bounds.y2, bounds.height()];
|
|
21143
|
+
});
|
|
21144
|
+
};
|
|
21145
|
+
const boundsOverlap = (prevBounds, nextBounds, gap = 0) => {
|
|
21146
|
+
return Math.max(prevBounds[0], nextBounds[0]) - gap / 2 <= Math.min(prevBounds[1], nextBounds[1]) + gap / 2;
|
|
21147
|
+
};
|
|
21148
|
+
const boundsDistance = (prevBounds, nextBounds) => {
|
|
21149
|
+
if (prevBounds[1] < nextBounds[0]) {
|
|
21150
|
+
return nextBounds[0] - prevBounds[1];
|
|
21151
|
+
}
|
|
21152
|
+
else if (nextBounds[1] < prevBounds[0]) {
|
|
21153
|
+
return prevBounds[0] - nextBounds[1];
|
|
21154
|
+
}
|
|
21155
|
+
return 0;
|
|
21156
|
+
};
|
|
21157
|
+
const linearDiscreteTicks = (scale, op) => {
|
|
21158
|
+
var _a;
|
|
21159
|
+
const domain = scale.domain();
|
|
21160
|
+
if (!domain.length) {
|
|
21161
|
+
return [];
|
|
21162
|
+
}
|
|
21163
|
+
const { tickCount, forceTickCount, tickStep, labelGap = 4, axisOrientType, labelStyle } = op;
|
|
21164
|
+
const isHorizontal = isAxisHorizontal(axisOrientType);
|
|
21165
|
+
const range = scale.range();
|
|
21166
|
+
const rangeSize = scale.calculateWholeRangeSize();
|
|
21167
|
+
if (rangeSize < 2) {
|
|
21168
|
+
if (op.labelLastVisible) {
|
|
21169
|
+
return convertDomainToTickData([domain[domain.length - 1]]);
|
|
21170
|
+
}
|
|
21171
|
+
return convertDomainToTickData([domain[0]]);
|
|
21172
|
+
}
|
|
21173
|
+
let scaleTicks;
|
|
21174
|
+
if (isValid(tickStep)) {
|
|
21175
|
+
scaleTicks = scale.stepTicks(tickStep);
|
|
21176
|
+
}
|
|
21177
|
+
else if (isValid(forceTickCount)) {
|
|
21178
|
+
scaleTicks = scale.forceTicks(forceTickCount);
|
|
21179
|
+
}
|
|
21180
|
+
else if (isValid(tickCount)) {
|
|
21181
|
+
const count = isFunction(tickCount) ? tickCount({ axisLength: rangeSize, labelStyle }) : tickCount;
|
|
21182
|
+
scaleTicks = scale.ticks(count);
|
|
21183
|
+
}
|
|
21184
|
+
else if (op.sampling) {
|
|
21185
|
+
const fontSize = ((_a = op.labelStyle.fontSize) !== null && _a !== void 0 ? _a : 12) + 2;
|
|
21186
|
+
const rangeStart = minInArray(range);
|
|
21187
|
+
const rangeEnd = maxInArray(range);
|
|
21188
|
+
if (domain.length <= rangeSize / fontSize) {
|
|
21189
|
+
const incrementUnit = (rangeEnd - rangeStart) / domain.length;
|
|
21190
|
+
const labelBoundsList = getOneDimensionalLabelBounds(scale, domain, op, isHorizontal);
|
|
21191
|
+
const minBoundsLength = Math.min(...labelBoundsList.map(bounds => bounds[2]));
|
|
21192
|
+
const stepResult = getStep$1(domain, labelBoundsList, labelGap, op.labelLastVisible, Math.floor(minBoundsLength / incrementUnit), false);
|
|
21193
|
+
scaleTicks = scale.stepTicks(stepResult.step);
|
|
21194
|
+
if (op.labelLastVisible) {
|
|
21195
|
+
if (stepResult.delCount) {
|
|
21196
|
+
scaleTicks = scaleTicks.slice(0, scaleTicks.length - stepResult.delCount);
|
|
21197
|
+
}
|
|
21198
|
+
scaleTicks.push(domain[domain.length - 1]);
|
|
21199
|
+
}
|
|
21200
|
+
}
|
|
21201
|
+
else {
|
|
21202
|
+
const tempDomain = [domain[0], domain[Math.floor(domain.length / 2)], domain[domain.length - 1]];
|
|
21203
|
+
const tempList = getOneDimensionalLabelBounds(scale, tempDomain, op, isHorizontal);
|
|
21204
|
+
let maxBounds = null;
|
|
21205
|
+
tempList.forEach(current => {
|
|
21206
|
+
if (!maxBounds) {
|
|
21207
|
+
maxBounds = current;
|
|
21208
|
+
return;
|
|
21209
|
+
}
|
|
21210
|
+
if (maxBounds[2] < current[2]) {
|
|
21211
|
+
maxBounds = current;
|
|
21212
|
+
}
|
|
21213
|
+
});
|
|
21214
|
+
const step = rangeEnd - rangeStart - labelGap > 0
|
|
21215
|
+
? Math.ceil((domain.length * (labelGap + maxBounds[2])) / (rangeEnd - rangeStart - labelGap))
|
|
21216
|
+
: domain.length - 1;
|
|
21217
|
+
scaleTicks = scale.stepTicks(step);
|
|
21218
|
+
if (op.labelLastVisible &&
|
|
21219
|
+
(!scaleTicks.length || scaleTicks[scaleTicks.length - 1] !== domain[domain.length - 1])) {
|
|
21220
|
+
if (scaleTicks.length &&
|
|
21221
|
+
Math.abs(scale.scale(scaleTicks[scaleTicks.length - 1]) - scale.scale(domain[domain.length - 1])) <
|
|
21222
|
+
maxBounds[2]) {
|
|
21223
|
+
scaleTicks = scaleTicks.slice(0, -1);
|
|
21224
|
+
}
|
|
21225
|
+
scaleTicks.push(domain[domain.length - 1]);
|
|
21226
|
+
}
|
|
21227
|
+
}
|
|
21228
|
+
}
|
|
21229
|
+
else {
|
|
21230
|
+
scaleTicks = scale.domain();
|
|
21231
|
+
}
|
|
21232
|
+
return convertDomainToTickData(scaleTicks);
|
|
21233
|
+
};
|
|
21234
|
+
const getStep$1 = (domain, labelBoundsList, labelGap, labelLastVisible, defaultStep, areAllBoundsSame) => {
|
|
21235
|
+
let resultDelCount = 0;
|
|
21236
|
+
let resultStep = 0;
|
|
21237
|
+
let resultTickCount = -1;
|
|
21238
|
+
let minDiff = Number.MAX_VALUE;
|
|
21239
|
+
const validateStep = (step) => {
|
|
21240
|
+
let success = true;
|
|
21241
|
+
let ptr = 0;
|
|
21242
|
+
do {
|
|
21243
|
+
if (ptr + step < domain.length && boundsOverlap(labelBoundsList[ptr], labelBoundsList[ptr + step], labelGap)) {
|
|
21244
|
+
success = false;
|
|
21245
|
+
}
|
|
21246
|
+
ptr += step;
|
|
21247
|
+
} while (success && ptr < domain.length);
|
|
21248
|
+
return success;
|
|
21249
|
+
};
|
|
21250
|
+
const minValidStep = binaryFuzzySearchInNumberRange(defaultStep, domain.length, step => validateStep(step) ? 1 : -1);
|
|
21251
|
+
let step = minValidStep;
|
|
21252
|
+
do {
|
|
21253
|
+
if (step > minValidStep && !areAllBoundsSame) {
|
|
21254
|
+
if (!validateStep(step)) {
|
|
21255
|
+
step++;
|
|
21256
|
+
continue;
|
|
21257
|
+
}
|
|
21258
|
+
}
|
|
21259
|
+
if (labelLastVisible) {
|
|
21260
|
+
const lastIndex = domain.length - 1;
|
|
21261
|
+
let delCount = 0;
|
|
21262
|
+
let ptr;
|
|
21263
|
+
if (domain.length % step > 0) {
|
|
21264
|
+
ptr = domain.length - (domain.length % step) + step;
|
|
21265
|
+
}
|
|
21266
|
+
else {
|
|
21267
|
+
ptr = domain.length;
|
|
21268
|
+
}
|
|
21269
|
+
do {
|
|
21270
|
+
ptr -= step;
|
|
21271
|
+
if (ptr === lastIndex || boundsOverlap(labelBoundsList[ptr], labelBoundsList[lastIndex], labelGap)) {
|
|
21272
|
+
delCount++;
|
|
21273
|
+
}
|
|
21274
|
+
else {
|
|
21275
|
+
break;
|
|
21276
|
+
}
|
|
21277
|
+
} while (ptr > 0);
|
|
21278
|
+
if (ptr === lastIndex) {
|
|
21279
|
+
resultStep = step;
|
|
21280
|
+
resultDelCount = delCount;
|
|
21281
|
+
break;
|
|
21282
|
+
}
|
|
21283
|
+
else {
|
|
21284
|
+
const tickCount = Math.floor(domain.length / step) - delCount + 1;
|
|
21285
|
+
if (tickCount < resultTickCount) {
|
|
21286
|
+
break;
|
|
21287
|
+
}
|
|
21288
|
+
else {
|
|
21289
|
+
resultTickCount = tickCount;
|
|
21290
|
+
const distance1 = boundsDistance(labelBoundsList[ptr], labelBoundsList[lastIndex]);
|
|
21291
|
+
const distance2 = ptr - step >= 0 ? boundsDistance(labelBoundsList[ptr - step], labelBoundsList[ptr]) : distance1;
|
|
21292
|
+
const diff = Math.abs(distance1 - distance2);
|
|
21293
|
+
if (diff < minDiff) {
|
|
21294
|
+
minDiff = diff;
|
|
21295
|
+
resultStep = step;
|
|
21296
|
+
resultDelCount = delCount;
|
|
21297
|
+
}
|
|
21298
|
+
if (distance1 <= distance2) {
|
|
21299
|
+
break;
|
|
21300
|
+
}
|
|
21301
|
+
}
|
|
21302
|
+
}
|
|
21303
|
+
}
|
|
21304
|
+
else {
|
|
21305
|
+
resultStep = step;
|
|
21306
|
+
break;
|
|
21307
|
+
}
|
|
21308
|
+
step++;
|
|
21309
|
+
} while (step <= domain.length);
|
|
21310
|
+
return {
|
|
21311
|
+
step: resultStep,
|
|
21312
|
+
delCount: resultDelCount
|
|
21313
|
+
};
|
|
21314
|
+
};
|
|
21315
|
+
|
|
21316
|
+
const polarAngleAxisDiscreteTicks = (scale, op) => {
|
|
21317
|
+
const { tickCount, forceTickCount, tickStep, getRadius, labelOffset, labelGap = 0, labelStyle } = op;
|
|
21318
|
+
const radius = getRadius === null || getRadius === void 0 ? void 0 : getRadius();
|
|
21319
|
+
if (!radius) {
|
|
21320
|
+
return convertDomainToTickData(scale.domain());
|
|
21321
|
+
}
|
|
21322
|
+
let scaleTicks;
|
|
21323
|
+
if (isValid(tickStep)) {
|
|
21324
|
+
scaleTicks = scale.stepTicks(tickStep);
|
|
21325
|
+
}
|
|
21326
|
+
else if (isValid(forceTickCount)) {
|
|
21327
|
+
scaleTicks = scale.forceTicks(forceTickCount);
|
|
21328
|
+
}
|
|
21329
|
+
else if (isValid(tickCount)) {
|
|
21330
|
+
const range = scale.range();
|
|
21331
|
+
const rangeSize = Math.abs(range[range.length - 1] - range[0]);
|
|
21332
|
+
const count = isFunction(tickCount) ? tickCount({ axisLength: rangeSize, labelStyle }) : tickCount;
|
|
21333
|
+
scaleTicks = scale.ticks(count);
|
|
21334
|
+
}
|
|
21335
|
+
else if (op.sampling) {
|
|
21336
|
+
const domain = scale.domain();
|
|
21337
|
+
const range = scale.range();
|
|
21338
|
+
const labelBoundsList = getPolarAngleLabelBounds(scale, domain, op);
|
|
21339
|
+
const rangeStart = minInArray(range);
|
|
21340
|
+
const rangeEnd = maxInArray(range);
|
|
21341
|
+
const axisLength = Math.abs(rangeEnd - rangeStart) * (radius + labelOffset);
|
|
21342
|
+
const incrementUnit = axisLength / domain.length;
|
|
21343
|
+
const { step, delCount } = getStep(domain, labelBoundsList, labelGap, Math.floor(labelBoundsList.reduce((min, curBounds) => {
|
|
21344
|
+
return Math.min(min, curBounds.width(), curBounds.height());
|
|
21345
|
+
}, Number.MAX_VALUE) / incrementUnit));
|
|
21346
|
+
scaleTicks = scale.stepTicks(step);
|
|
21347
|
+
scaleTicks = scaleTicks.slice(0, scaleTicks.length - delCount);
|
|
21348
|
+
}
|
|
21349
|
+
else {
|
|
21350
|
+
scaleTicks = scale.domain();
|
|
21351
|
+
}
|
|
21352
|
+
return convertDomainToTickData(scaleTicks);
|
|
21353
|
+
};
|
|
21354
|
+
const getStep = (domain, labelBoundsList, labelGap, defaultStep) => {
|
|
21355
|
+
let step = defaultStep;
|
|
21356
|
+
do {
|
|
21357
|
+
let success = true;
|
|
21358
|
+
step++;
|
|
21359
|
+
let ptr = 0;
|
|
21360
|
+
do {
|
|
21361
|
+
if (ptr + step < domain.length && labelOverlap(labelBoundsList[ptr], labelBoundsList[ptr + step], labelGap)) {
|
|
21362
|
+
success = false;
|
|
21363
|
+
}
|
|
21364
|
+
ptr += step;
|
|
21365
|
+
} while (success && ptr < domain.length);
|
|
21366
|
+
if (success) {
|
|
21367
|
+
break;
|
|
21368
|
+
}
|
|
21369
|
+
} while (step <= domain.length);
|
|
21370
|
+
let delCount = 0;
|
|
21371
|
+
if (domain.length > 2) {
|
|
21372
|
+
let ptr = domain.length - (domain.length % step);
|
|
21373
|
+
if (ptr >= domain.length) {
|
|
21374
|
+
ptr -= step;
|
|
21375
|
+
}
|
|
21376
|
+
while (ptr > 0 && labelOverlap(labelBoundsList[0], labelBoundsList[ptr])) {
|
|
21377
|
+
delCount++;
|
|
21378
|
+
ptr -= step;
|
|
21379
|
+
}
|
|
21380
|
+
}
|
|
21381
|
+
return {
|
|
21382
|
+
step,
|
|
21383
|
+
delCount
|
|
21384
|
+
};
|
|
21385
|
+
};
|
|
21386
|
+
|
|
21387
|
+
const ticks = (scale, op) => {
|
|
21388
|
+
if (isContinuous(scale.type)) {
|
|
21389
|
+
return continuousTicks(scale, op);
|
|
21390
|
+
}
|
|
21391
|
+
else if (isDiscrete(scale.type)) {
|
|
21392
|
+
if (op.coordinateType === 'cartesian') {
|
|
21393
|
+
return linearDiscreteTicks(scale, op);
|
|
21394
|
+
}
|
|
21395
|
+
else if (op.coordinateType === 'polar') {
|
|
21396
|
+
if (op.axisOrientType === 'angle') {
|
|
21397
|
+
return polarAngleAxisDiscreteTicks(scale, op);
|
|
21398
|
+
}
|
|
21399
|
+
}
|
|
21400
|
+
}
|
|
21401
|
+
return convertDomainToTickData(scale.domain());
|
|
21402
|
+
};
|
|
21403
|
+
|
|
20874
21404
|
function getLinePath(points, closed) {
|
|
20875
21405
|
let path = '';
|
|
20876
21406
|
if (points.length === 0) {
|
|
@@ -22673,7 +23203,9 @@ class MarkCommonLine extends Marker {
|
|
|
22673
23203
|
const { label = {}, limitRect } = this.attribute;
|
|
22674
23204
|
const { position, confine, autoRotate } = label;
|
|
22675
23205
|
const labelPoint = this.getPointAttrByPosition(position);
|
|
22676
|
-
const labelAngle =
|
|
23206
|
+
const labelAngle = position.toString().toLocaleLowerCase().includes('start')
|
|
23207
|
+
? this._line.getStartAngle() || 0
|
|
23208
|
+
: this._line.getEndAngle() || 0;
|
|
22677
23209
|
this._label.setAttributes(Object.assign(Object.assign({}, labelPoint.position), { angle: autoRotate ? this.getRotateByAngle(labelPoint.angle) : 0, textStyle: Object.assign(Object.assign({}, this.getTextStyle(position, labelAngle, autoRotate)), label.textStyle) }));
|
|
22678
23210
|
if (limitRect && confine) {
|
|
22679
23211
|
const { x, y, width, height } = limitRect;
|
|
@@ -23137,7 +23669,7 @@ class MarkLine extends MarkCommonLine {
|
|
|
23137
23669
|
const { refX = 0, refY = 0 } = label;
|
|
23138
23670
|
const points = this._line.getMainSegmentPoints();
|
|
23139
23671
|
const lineEndAngle = (_a = this._line.getEndAngle()) !== null && _a !== void 0 ? _a : 0;
|
|
23140
|
-
const labelAngle =
|
|
23672
|
+
const labelAngle = isPostiveXAxis(lineEndAngle) ? lineEndAngle : lineEndAngle;
|
|
23141
23673
|
const labelOffsetX = refX * Math.cos(labelAngle) + refY * Math.cos(labelAngle - Math.PI / 2);
|
|
23142
23674
|
const labelOffsetY = refX * Math.sin(labelAngle) + refY * Math.sin(labelAngle - Math.PI / 2);
|
|
23143
23675
|
if (position.includes('start') || position.includes('Start')) {
|
|
@@ -23168,25 +23700,15 @@ class MarkLine extends MarkCommonLine {
|
|
|
23168
23700
|
}
|
|
23169
23701
|
getRotateByAngle(angle) {
|
|
23170
23702
|
var _a;
|
|
23171
|
-
const itemAngle =
|
|
23703
|
+
const itemAngle = isPostiveXAxis(angle) ? angle : angle - Math.PI;
|
|
23172
23704
|
return itemAngle + ((_a = this.attribute.label.refAngle) !== null && _a !== void 0 ? _a : 0);
|
|
23173
23705
|
}
|
|
23174
23706
|
getTextStyle(position, labelAngle, autoRotate) {
|
|
23175
|
-
if (
|
|
23176
|
-
|
|
23177
|
-
|
|
23178
|
-
textAlign: 'right',
|
|
23179
|
-
textBaseline: 'middle'
|
|
23180
|
-
};
|
|
23181
|
-
}
|
|
23182
|
-
return {
|
|
23183
|
-
textAlign: 'center',
|
|
23184
|
-
textBaseline: (labelAngle > 0 && position.includes('inside')) || (labelAngle < 0 && !position.includes('inside'))
|
|
23185
|
-
? 'bottom'
|
|
23186
|
-
: 'top'
|
|
23187
|
-
};
|
|
23707
|
+
if (fuzzyEqualNumber(Math.abs(labelAngle), Math.PI / 2, 0.0001) ||
|
|
23708
|
+
fuzzyEqualNumber(Math.abs(labelAngle), (Math.PI * 3) / 2, 0.0001)) {
|
|
23709
|
+
return getTextAlignAttrOfVerticalDir(autoRotate, labelAngle, position);
|
|
23188
23710
|
}
|
|
23189
|
-
if (
|
|
23711
|
+
if (isPostiveXAxis(labelAngle)) {
|
|
23190
23712
|
return DEFAULT_CARTESIAN_MARK_LINE_TEXT_STYLE_MAP.postiveXAxis[position];
|
|
23191
23713
|
}
|
|
23192
23714
|
return DEFAULT_CARTESIAN_MARK_LINE_TEXT_STYLE_MAP.negativeXAxis[position];
|
|
@@ -23617,18 +24139,16 @@ class MarkPoint extends Marker {
|
|
|
23617
24139
|
this.defaultUpdateAnimation = DefaultUpdateMarkPointAnimation;
|
|
23618
24140
|
this.defaultExitAnimation = DefaultExitMarkerAnimation;
|
|
23619
24141
|
this._isArcLine = false;
|
|
24142
|
+
this._isStraightLine = false;
|
|
23620
24143
|
}
|
|
23621
24144
|
setLabelPos() {
|
|
23622
24145
|
}
|
|
23623
24146
|
getTextAlignAttr(autoRotate, offsetX, offsetY, lineEndAngle, itemPosition) {
|
|
23624
|
-
|
|
23625
|
-
|
|
23626
|
-
|
|
23627
|
-
}
|
|
23628
|
-
else {
|
|
23629
|
-
isPostiveXAxis = isPostiveXAxisCartes(lineEndAngle);
|
|
24147
|
+
if (fuzzyEqualNumber(Math.abs(lineEndAngle), Math.PI / 2, 0.0001) ||
|
|
24148
|
+
fuzzyEqualNumber(Math.abs(lineEndAngle), (Math.PI * 3) / 2, 0.0001)) {
|
|
24149
|
+
return getTextAlignAttrOfVerticalDir(autoRotate, lineEndAngle, itemPosition);
|
|
23630
24150
|
}
|
|
23631
|
-
if (isPostiveXAxis) {
|
|
24151
|
+
if (isPostiveXAxis(lineEndAngle)) {
|
|
23632
24152
|
return DEFAULT_MARK_POINT_TEXT_STYLE_MAP.postiveXAxis[itemPosition];
|
|
23633
24153
|
}
|
|
23634
24154
|
return DEFAULT_MARK_POINT_TEXT_STYLE_MAP.negativeXAxis[itemPosition];
|
|
@@ -23641,8 +24161,8 @@ class MarkPoint extends Marker {
|
|
|
23641
24161
|
const { autoRotate = true, refX = 0, refY = 0, refAngle = 0, textStyle = {}, richTextStyle = {}, imageStyle = {}, position: positionType = IMarkPointItemPosition.middle } = itemContent;
|
|
23642
24162
|
const { state } = this.attribute;
|
|
23643
24163
|
const lineEndAngle = ((_a = this._line) === null || _a === void 0 ? void 0 : _a.getEndAngle()) || 0;
|
|
23644
|
-
const itemRefOffsetX = refX * Math.cos(lineEndAngle) + refY * Math.cos(lineEndAngle);
|
|
23645
|
-
const itemRefOffsetY = refX * Math.sin(lineEndAngle) + refY * Math.sin(lineEndAngle);
|
|
24164
|
+
const itemRefOffsetX = refX * Math.cos(lineEndAngle) + refY * Math.cos(lineEndAngle - Math.PI / 2);
|
|
24165
|
+
const itemRefOffsetY = refX * Math.sin(lineEndAngle) + refY * Math.sin(lineEndAngle - Math.PI / 2);
|
|
23646
24166
|
if (itemType === 'text') {
|
|
23647
24167
|
const offsetX = newItemPosition.x - newPosition.x;
|
|
23648
24168
|
const offsetY = newItemPosition.y - newPosition.y;
|
|
@@ -23665,16 +24185,7 @@ class MarkPoint extends Marker {
|
|
|
23665
24185
|
});
|
|
23666
24186
|
item.states = merge({}, DEFAULT_STATES$2, state === null || state === void 0 ? void 0 : state.image);
|
|
23667
24187
|
}
|
|
23668
|
-
|
|
23669
|
-
let itemAngle;
|
|
23670
|
-
if (this._isArcLine) {
|
|
23671
|
-
isPostiveXAxis = isPostiveXAxisPolar(lineEndAngle, this._line.isReverseArc);
|
|
23672
|
-
itemAngle = isPostiveXAxis ? lineEndAngle : lineEndAngle - Math.PI;
|
|
23673
|
-
}
|
|
23674
|
-
else {
|
|
23675
|
-
isPostiveXAxis = isPostiveXAxisCartes(lineEndAngle);
|
|
23676
|
-
itemAngle = isPostiveXAxis ? lineEndAngle : lineEndAngle - Math.PI;
|
|
23677
|
-
}
|
|
24188
|
+
const itemAngle = isPostiveXAxis(lineEndAngle) ? lineEndAngle : lineEndAngle - Math.PI;
|
|
23678
24189
|
item.setAttributes({
|
|
23679
24190
|
x: newItemPosition.x + (itemRefOffsetX || 0),
|
|
23680
24191
|
y: newItemPosition.y + (itemRefOffsetY || 0),
|
|
@@ -23751,12 +24262,22 @@ class MarkPoint extends Marker {
|
|
|
23751
24262
|
const deltaX = arcRatio * direction * x0;
|
|
23752
24263
|
const centerX = x0 + deltaX;
|
|
23753
24264
|
const centerY = line(centerX);
|
|
23754
|
-
center = { x: centerX, y: centerY };
|
|
23755
24265
|
startAngle = deltaXYToAngle(y1 - centerY, x1 - centerX);
|
|
23756
24266
|
endAngle = deltaXYToAngle(y2 - centerY, x2 - centerX);
|
|
24267
|
+
center = { x: centerX, y: centerY };
|
|
24268
|
+
if (arcRatio > 0) {
|
|
24269
|
+
if (endAngle < startAngle) {
|
|
24270
|
+
endAngle += Math.PI * 2;
|
|
24271
|
+
}
|
|
24272
|
+
}
|
|
24273
|
+
else {
|
|
24274
|
+
if (startAngle < endAngle) {
|
|
24275
|
+
startAngle += Math.PI * 2;
|
|
24276
|
+
}
|
|
24277
|
+
}
|
|
23757
24278
|
radius = Math.sqrt((centerX - x1) * (centerX - x1) + (centerY - y1) * (centerY - y1));
|
|
23758
24279
|
}
|
|
23759
|
-
else if (type === 'type-do') {
|
|
24280
|
+
else if (type === 'type-do' && !this._isStraightLine) {
|
|
23760
24281
|
points = [
|
|
23761
24282
|
newPosition,
|
|
23762
24283
|
{
|
|
@@ -23766,7 +24287,7 @@ class MarkPoint extends Marker {
|
|
|
23766
24287
|
newItemPosition
|
|
23767
24288
|
];
|
|
23768
24289
|
}
|
|
23769
|
-
else if (type === 'type-po') {
|
|
24290
|
+
else if (type === 'type-po' && !this._isStraightLine) {
|
|
23770
24291
|
points = [
|
|
23771
24292
|
newPosition,
|
|
23772
24293
|
{
|
|
@@ -23776,7 +24297,7 @@ class MarkPoint extends Marker {
|
|
|
23776
24297
|
newItemPosition
|
|
23777
24298
|
];
|
|
23778
24299
|
}
|
|
23779
|
-
else if (type === 'type-op') {
|
|
24300
|
+
else if (type === 'type-op' && !this._isStraightLine) {
|
|
23780
24301
|
points = [
|
|
23781
24302
|
newPosition,
|
|
23782
24303
|
{
|
|
@@ -23818,8 +24339,7 @@ class MarkPoint extends Marker {
|
|
|
23818
24339
|
const { startSymbol, endSymbol, lineStyle, type = 'type-s' } = itemLine;
|
|
23819
24340
|
const { state } = this.attribute;
|
|
23820
24341
|
const pointsAttr = this.getItemLineAttr(itemLine, newPosition, newItemPosition);
|
|
23821
|
-
if ((
|
|
23822
|
-
(type !== 'type-arc' && this._line.key === 'segment')) {
|
|
24342
|
+
if ((this._isArcLine && this._line.key === 'arc-segment') || (!this._isArcLine && this._line.key === 'segment')) {
|
|
23823
24343
|
this._line.setAttributes(Object.assign(Object.assign({}, pointsAttr), { startSymbol,
|
|
23824
24344
|
endSymbol,
|
|
23825
24345
|
lineStyle, visible: itemLine.visible, state: {
|
|
@@ -23901,24 +24421,22 @@ class MarkPoint extends Marker {
|
|
|
23901
24421
|
const targetSize = targetItemvisible ? targetSymbolSize || ((_a = targetSymbolStyle.size) !== null && _a !== void 0 ? _a : 10) : 0;
|
|
23902
24422
|
const targetOffsetAngle = deltaXYToAngle(itemContentOffsetY, itemContentOffsetX);
|
|
23903
24423
|
const newPosition = {
|
|
23904
|
-
x: position.x + (targetSize + targetSymbolOffset) * Math.cos(targetOffsetAngle),
|
|
23905
|
-
y: position.y + (targetSize + targetSymbolOffset) * Math.sin(targetOffsetAngle)
|
|
24424
|
+
x: position.x + (targetSize / 2 + targetSymbolOffset) * Math.cos(targetOffsetAngle),
|
|
24425
|
+
y: position.y + (targetSize / 2 + targetSymbolOffset) * Math.sin(targetOffsetAngle)
|
|
23906
24426
|
};
|
|
23907
24427
|
const newItemPosition = {
|
|
23908
|
-
x: position.x + (targetSize + targetSymbolOffset) * Math.cos(targetOffsetAngle) + itemContentOffsetX,
|
|
23909
|
-
y: position.y + (targetSize + targetSymbolOffset) * Math.sin(targetOffsetAngle) + itemContentOffsetY
|
|
24428
|
+
x: position.x + (targetSize / 2 + targetSymbolOffset) * Math.cos(targetOffsetAngle) + itemContentOffsetX,
|
|
24429
|
+
y: position.y + (targetSize / 2 + targetSymbolOffset) * Math.sin(targetOffsetAngle) + itemContentOffsetY
|
|
23910
24430
|
};
|
|
23911
24431
|
return { newPosition, newItemPosition };
|
|
23912
24432
|
}
|
|
23913
24433
|
initMarker(container) {
|
|
23914
24434
|
const { position, itemContent = {}, itemLine } = this.attribute;
|
|
23915
24435
|
const { type: itemLineType = 'type-s', arcRatio = 0.8 } = itemLine;
|
|
24436
|
+
const { offsetX = 0, offsetY = 0 } = itemContent;
|
|
24437
|
+
this._isStraightLine = fuzzyEqualNumber(offsetX, 0, 0.0001) || fuzzyEqualNumber(offsetY, 0, 0.0001);
|
|
24438
|
+
this._isArcLine = itemLineType === 'type-arc' && arcRatio !== 0 && !this._isStraightLine;
|
|
23916
24439
|
const { newPosition, newItemPosition } = this.computeNewPositionAfterTargetItem(position);
|
|
23917
|
-
this._isArcLine =
|
|
23918
|
-
itemLineType === 'type-arc' &&
|
|
23919
|
-
arcRatio !== 0 &&
|
|
23920
|
-
newPosition.x !== newItemPosition.x &&
|
|
23921
|
-
newPosition.y !== newItemPosition.y;
|
|
23922
24440
|
const lineConstructor = this._isArcLine ? ArcSegment : Segment;
|
|
23923
24441
|
const line = new lineConstructor({
|
|
23924
24442
|
points: [],
|
|
@@ -23950,11 +24468,10 @@ class MarkPoint extends Marker {
|
|
|
23950
24468
|
const { position, itemContent = {}, itemLine } = this.attribute;
|
|
23951
24469
|
const { type = 'text' } = itemContent;
|
|
23952
24470
|
const { type: itemLineType = 'type-s', arcRatio = 0.8 } = itemLine;
|
|
24471
|
+
const { offsetX = 0, offsetY = 0 } = itemContent;
|
|
24472
|
+
this._isStraightLine = fuzzyEqualNumber(offsetX, 0, 0.001) || fuzzyEqualNumber(offsetY, 0, 0.001);
|
|
24473
|
+
const isArcLine = itemLineType === 'type-arc' && arcRatio !== 0 && !this._isStraightLine;
|
|
23953
24474
|
const { newPosition, newItemPosition } = this.computeNewPositionAfterTargetItem(position);
|
|
23954
|
-
const isArcLine = itemLineType === 'type-arc' &&
|
|
23955
|
-
arcRatio !== 0 &&
|
|
23956
|
-
newPosition.x !== newItemPosition.x &&
|
|
23957
|
-
newPosition.y !== newItemPosition.y;
|
|
23958
24475
|
if (isArcLine !== this._isArcLine) {
|
|
23959
24476
|
this._isArcLine = isArcLine;
|
|
23960
24477
|
this.reDrawLine(itemLine, {
|
|
@@ -28848,6 +29365,6 @@ Radio.defaultAttributes = {
|
|
|
28848
29365
|
}
|
|
28849
29366
|
};
|
|
28850
29367
|
|
|
28851
|
-
const version = "0.19.
|
|
29368
|
+
const version = "0.19.6-alpha.0";
|
|
28852
29369
|
|
|
28853
|
-
export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AreaLabel, 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, GroupFadeIn, GroupFadeOut, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineDataLabel, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Title, Tooltip, VTag, angle, angleTo, clampRadian, contrastAccessibilityChecker, createTextGraphicByType, deltaXYToAngle, direction, getCircleLabelPosition, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getSizeHandlerPath, getTextType, getVerticalCoord, getVerticalPath, htmlAttributeTransform, initTextMeasure, isInRange,
|
|
29370
|
+
export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AreaLabel, 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, GroupFadeIn, GroupFadeOut, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineDataLabel, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Title, Tooltip, VTag, angle, angleLabelOrientAttribute, angleTo, clampRadian, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, direction, fuzzyEqualNumber, getCircleLabelPosition, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, loadPoptip, measureTextSize, normalize, reactAttributeTransform, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, removeRepeatPoint, richTextAttributeTransform, scale, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, ticks, traverseGroup, version };
|