@visactor/vrender-components 1.0.26-alpha.0 → 1.0.26-alpha.1
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/circle.d.ts +0 -19
- package/cjs/axis/config.d.ts +0 -19
- package/cjs/axis/config.js +0 -19
- package/cjs/axis/config.js.map +1 -1
- package/cjs/axis/constant.d.ts +0 -1
- package/cjs/axis/constant.js +4 -5
- package/cjs/axis/constant.js.map +1 -1
- package/cjs/axis/line.d.ts +2 -26
- package/cjs/axis/line.js +2 -74
- package/cjs/axis/line.js.map +1 -1
- package/cjs/axis/type.d.ts +0 -12
- package/cjs/axis/type.js.map +1 -1
- package/cjs/data-zoom/data-zoom.js +5 -2
- package/cjs/data-zoom/data-zoom.js.map +1 -1
- package/cjs/data-zoom/renderer.js +11 -5
- package/cjs/data-zoom/renderer.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/label/base.js +9 -2
- package/cjs/label/base.js.map +1 -1
- package/cjs/label/type.d.ts +2 -0
- package/cjs/label/type.js.map +1 -1
- package/dist/index.es.js +46 -172
- package/es/axis/circle.d.ts +0 -19
- package/es/axis/config.d.ts +0 -19
- package/es/axis/config.js +0 -19
- package/es/axis/config.js.map +1 -1
- package/es/axis/constant.d.ts +0 -1
- package/es/axis/constant.js +4 -5
- package/es/axis/constant.js.map +1 -1
- package/es/axis/line.d.ts +2 -26
- package/es/axis/line.js +1 -75
- package/es/axis/line.js.map +1 -1
- package/es/axis/type.d.ts +0 -12
- package/es/axis/type.js.map +1 -1
- package/es/data-zoom/data-zoom.js +5 -2
- package/es/data-zoom/data-zoom.js.map +1 -1
- package/es/data-zoom/renderer.js +11 -5
- package/es/data-zoom/renderer.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/label/base.js +10 -3
- package/es/label/base.js.map +1 -1
- package/es/label/type.d.ts +2 -0
- package/es/label/type.js.map +1 -1
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -17391,7 +17391,6 @@ var AXIS_ELEMENT_NAME;
|
|
|
17391
17391
|
AXIS_ELEMENT_NAME["subTick"] = "axis-sub-tick";
|
|
17392
17392
|
AXIS_ELEMENT_NAME["label"] = "axis-label";
|
|
17393
17393
|
AXIS_ELEMENT_NAME["title"] = "axis-title";
|
|
17394
|
-
AXIS_ELEMENT_NAME["labelHoverOnAxis"] = "axis-label-hover-on-axis";
|
|
17395
17394
|
AXIS_ELEMENT_NAME["gridContainer"] = "axis-grid-container";
|
|
17396
17395
|
AXIS_ELEMENT_NAME["grid"] = "axis-grid";
|
|
17397
17396
|
AXIS_ELEMENT_NAME["gridRegion"] = "axis-grid-region";
|
|
@@ -17439,25 +17438,6 @@ const DEFAULT_AXIS_THEME = {
|
|
|
17439
17438
|
fillOpacity: 1
|
|
17440
17439
|
}
|
|
17441
17440
|
},
|
|
17442
|
-
labelHoverOnAxis: {
|
|
17443
|
-
visible: false,
|
|
17444
|
-
space: 4,
|
|
17445
|
-
position: 0,
|
|
17446
|
-
autoRotate: false,
|
|
17447
|
-
textStyle: {
|
|
17448
|
-
fontSize: 12,
|
|
17449
|
-
fill: 'white',
|
|
17450
|
-
fontWeight: 'normal',
|
|
17451
|
-
fillOpacity: 1
|
|
17452
|
-
},
|
|
17453
|
-
background: {
|
|
17454
|
-
visible: true,
|
|
17455
|
-
style: {
|
|
17456
|
-
cornerRadius: 2,
|
|
17457
|
-
fill: 'black'
|
|
17458
|
-
}
|
|
17459
|
-
}
|
|
17460
|
-
},
|
|
17461
17441
|
tick: {
|
|
17462
17442
|
visible: true,
|
|
17463
17443
|
inside: false,
|
|
@@ -20293,13 +20273,7 @@ function loadCircleAxisGridComponent() {
|
|
|
20293
20273
|
loadLineAxisComponent();
|
|
20294
20274
|
class LineAxis extends AxisBase {
|
|
20295
20275
|
constructor(attributes, options) {
|
|
20296
|
-
var _a;
|
|
20297
|
-
if (attributes.labelHoverOnAxis) {
|
|
20298
|
-
attributes.labelHoverOnAxis.textStyle = Object.assign({}, attributes.label.style, attributes.labelHoverOnAxis.textStyle);
|
|
20299
|
-
attributes.labelHoverOnAxis.space = (_a = attributes.labelHoverOnAxis.space) !== null && _a !== void 0 ? _a : attributes.label.space;
|
|
20300
|
-
}
|
|
20301
20276
|
super((options === null || options === void 0 ? void 0 : options.skipDefault) ? attributes : merge({}, LineAxis.defaultAttributes, attributes), options);
|
|
20302
|
-
this.labelHoverOnAxisGroup = null;
|
|
20303
20277
|
}
|
|
20304
20278
|
_renderInner(container) {
|
|
20305
20279
|
var _a;
|
|
@@ -20351,18 +20325,6 @@ class LineAxis extends AxisBase {
|
|
|
20351
20325
|
bgRect.states = merge({}, DEFAULT_STATES$1, (_a = panel.state) !== null && _a !== void 0 ? _a : {});
|
|
20352
20326
|
axisContainer.insertBefore(bgRect, axisContainer.firstChild);
|
|
20353
20327
|
}
|
|
20354
|
-
const { labelHoverOnAxis } = this.attribute;
|
|
20355
|
-
if (labelHoverOnAxis && labelHoverOnAxis.visible) {
|
|
20356
|
-
this.renderLabelHoverOnAxis();
|
|
20357
|
-
}
|
|
20358
|
-
}
|
|
20359
|
-
renderLabelHoverOnAxis() {
|
|
20360
|
-
const hoverOnLabelAttributes = this.getLabelHoverOnAxisAttribute();
|
|
20361
|
-
const hoverOnLabel = new Tag(Object.assign({}, hoverOnLabelAttributes));
|
|
20362
|
-
hoverOnLabel.name = AXIS_ELEMENT_NAME.title;
|
|
20363
|
-
hoverOnLabel.id = this._getNodeId('hover-on-label');
|
|
20364
|
-
this.labelHoverOnAxisGroup = hoverOnLabel;
|
|
20365
|
-
this.axisContainer.add(hoverOnLabel);
|
|
20366
20328
|
}
|
|
20367
20329
|
renderLine(container) {
|
|
20368
20330
|
const { start, end, line } = this.attribute;
|
|
@@ -20557,84 +20519,6 @@ class LineAxis extends AxisBase {
|
|
|
20557
20519
|
}
|
|
20558
20520
|
return attrs;
|
|
20559
20521
|
}
|
|
20560
|
-
getLabelHoverOnAxisAttribute() {
|
|
20561
|
-
var _a, _b;
|
|
20562
|
-
const { orient } = this.attribute;
|
|
20563
|
-
const _c = this.attribute.labelHoverOnAxis, { position = 0, space = 4, autoRotate = true, textStyle = {}, background = {}, formatMethod, text: textContent = '', maxWidth } = _c, restAttrs = __rest(_c, ["position", "space", "autoRotate", "textStyle", "background", "formatMethod", "text", "maxWidth"]);
|
|
20564
|
-
const point = this.getTickCoord(0);
|
|
20565
|
-
if (orient === 'bottom' || orient === 'top') {
|
|
20566
|
-
point.x = position;
|
|
20567
|
-
}
|
|
20568
|
-
else {
|
|
20569
|
-
point.y = position;
|
|
20570
|
-
}
|
|
20571
|
-
let tickLength = 0;
|
|
20572
|
-
if (((_a = this.attribute.tick) === null || _a === void 0 ? void 0 : _a.visible) && this.attribute.tick.inside === false) {
|
|
20573
|
-
tickLength = this.attribute.tick.length || 4;
|
|
20574
|
-
}
|
|
20575
|
-
if (((_b = this.attribute.subTick) === null || _b === void 0 ? void 0 : _b.visible) && this.attribute.subTick.inside === false) {
|
|
20576
|
-
tickLength = Math.max(tickLength, this.attribute.subTick.length || 2);
|
|
20577
|
-
}
|
|
20578
|
-
const labelLength = 0;
|
|
20579
|
-
const offset = tickLength + labelLength + space;
|
|
20580
|
-
const labelPoint = this.getVerticalCoord(point, offset, false);
|
|
20581
|
-
const vector = this.getVerticalVector(offset, false, { x: 0, y: 0 });
|
|
20582
|
-
let { angle } = restAttrs;
|
|
20583
|
-
let textAlign = 'center';
|
|
20584
|
-
let textBaseline;
|
|
20585
|
-
if (isNil(angle) && autoRotate) {
|
|
20586
|
-
const axisVector = this.getRelativeVector();
|
|
20587
|
-
const v1 = [1, 0];
|
|
20588
|
-
const radian = angleTo(axisVector, v1, true);
|
|
20589
|
-
angle = radian;
|
|
20590
|
-
const { verticalFactor = 1 } = this.attribute;
|
|
20591
|
-
const factor = -1 * verticalFactor;
|
|
20592
|
-
if (factor === 1) {
|
|
20593
|
-
textBaseline = 'bottom';
|
|
20594
|
-
}
|
|
20595
|
-
else {
|
|
20596
|
-
textBaseline = 'top';
|
|
20597
|
-
}
|
|
20598
|
-
}
|
|
20599
|
-
else {
|
|
20600
|
-
textAlign = this.getTextAlign(vector);
|
|
20601
|
-
textBaseline = this.getTextBaseline(vector, false);
|
|
20602
|
-
}
|
|
20603
|
-
let maxTagWidth = maxWidth;
|
|
20604
|
-
if (isNil(maxTagWidth)) {
|
|
20605
|
-
const { verticalLimitSize, verticalMinSize, orient } = this.attribute;
|
|
20606
|
-
const limitSize = Math.min(verticalLimitSize || Infinity, verticalMinSize || Infinity);
|
|
20607
|
-
if (isValidNumber(limitSize)) {
|
|
20608
|
-
const isX = orient === 'bottom' || orient === 'top';
|
|
20609
|
-
if (isX) {
|
|
20610
|
-
if (angle !== Math.PI / 2) {
|
|
20611
|
-
const cosValue = Math.abs(Math.cos(angle !== null && angle !== void 0 ? angle : 0));
|
|
20612
|
-
maxTagWidth = cosValue < 1e-6 ? Infinity : this.attribute.end.x / cosValue;
|
|
20613
|
-
}
|
|
20614
|
-
else {
|
|
20615
|
-
maxTagWidth = limitSize - offset;
|
|
20616
|
-
}
|
|
20617
|
-
}
|
|
20618
|
-
else {
|
|
20619
|
-
if (angle && angle !== 0) {
|
|
20620
|
-
const sinValue = Math.abs(Math.sin(angle));
|
|
20621
|
-
maxTagWidth = sinValue < 1e-6 ? Infinity : this.attribute.end.y / sinValue;
|
|
20622
|
-
}
|
|
20623
|
-
else {
|
|
20624
|
-
maxTagWidth = limitSize - offset;
|
|
20625
|
-
}
|
|
20626
|
-
}
|
|
20627
|
-
}
|
|
20628
|
-
}
|
|
20629
|
-
const text = formatMethod ? formatMethod(textContent) : textContent;
|
|
20630
|
-
const attrs = Object.assign(Object.assign(Object.assign({}, labelPoint), restAttrs), { maxWidth: maxTagWidth, textStyle: Object.assign({ textAlign,
|
|
20631
|
-
textBaseline }, textStyle), text });
|
|
20632
|
-
attrs.angle = angle;
|
|
20633
|
-
if (background && background.visible) {
|
|
20634
|
-
attrs.panel = Object.assign(Object.assign({ visible: true }, restAttrs.panel), background.style);
|
|
20635
|
-
}
|
|
20636
|
-
return attrs;
|
|
20637
|
-
}
|
|
20638
20522
|
getTextBaseline(vector, inside) {
|
|
20639
20523
|
let base = 'middle';
|
|
20640
20524
|
const { verticalFactor = 1 } = this.attribute;
|
|
@@ -20867,8 +20751,8 @@ class LineAxis extends AxisBase {
|
|
|
20867
20751
|
let limitLength = limitSize;
|
|
20868
20752
|
let titleHeight = 0;
|
|
20869
20753
|
let titleSpacing = 0;
|
|
20870
|
-
const axisLineWidth = line && line.visible ? (_b = line.style.lineWidth) !== null && _b !== void 0 ? _b : 1 : 0;
|
|
20871
|
-
const tickLength = tick && tick.visible ? (_c = tick.length) !== null && _c !== void 0 ? _c : 4 : 0;
|
|
20754
|
+
const axisLineWidth = line && line.visible ? ((_b = line.style.lineWidth) !== null && _b !== void 0 ? _b : 1) : 0;
|
|
20755
|
+
const tickLength = tick && tick.visible ? ((_c = tick.length) !== null && _c !== void 0 ? _c : 4) : 0;
|
|
20872
20756
|
if (title && title.visible && typeof title.text === 'string') {
|
|
20873
20757
|
titleHeight = measureTextSize(title.text, title.textStyle, (_e = (_d = this.stage) === null || _d === void 0 ? void 0 : _d.getTheme()) === null || _e === void 0 ? void 0 : _e.text).height;
|
|
20874
20758
|
const padding = normalizePadding(title.padding);
|
|
@@ -20879,41 +20763,6 @@ class LineAxis extends AxisBase {
|
|
|
20879
20763
|
}
|
|
20880
20764
|
return limitLength;
|
|
20881
20765
|
}
|
|
20882
|
-
showLabelHoverOnAxis(position, text) {
|
|
20883
|
-
if (this.attribute.labelHoverOnAxis) {
|
|
20884
|
-
if (this.labelHoverOnAxisGroup) {
|
|
20885
|
-
const { formatMethod } = this.attribute.labelHoverOnAxis;
|
|
20886
|
-
const textStr = formatMethod ? formatMethod(text) : text;
|
|
20887
|
-
this.labelHoverOnAxisGroup.setAttribute('text', textStr);
|
|
20888
|
-
this.labelHoverOnAxisGroup.setAttribute('visible', true);
|
|
20889
|
-
this.labelHoverOnAxisGroup.setAttribute('visibleAll', true);
|
|
20890
|
-
if (this.attribute.orient === 'left' || this.attribute.orient === 'right') {
|
|
20891
|
-
this.labelHoverOnAxisGroup.setAttributes({
|
|
20892
|
-
y: position
|
|
20893
|
-
});
|
|
20894
|
-
}
|
|
20895
|
-
else {
|
|
20896
|
-
this.labelHoverOnAxisGroup.setAttributes({
|
|
20897
|
-
x: position
|
|
20898
|
-
});
|
|
20899
|
-
}
|
|
20900
|
-
}
|
|
20901
|
-
else {
|
|
20902
|
-
this.attribute.labelHoverOnAxis.visible = true;
|
|
20903
|
-
this.attribute.labelHoverOnAxis.position = position;
|
|
20904
|
-
this.attribute.labelHoverOnAxis.text = text;
|
|
20905
|
-
this.renderLabelHoverOnAxis();
|
|
20906
|
-
}
|
|
20907
|
-
}
|
|
20908
|
-
}
|
|
20909
|
-
hideLabelHoverOnAxis() {
|
|
20910
|
-
if (this.attribute.labelHoverOnAxis && this.labelHoverOnAxisGroup) {
|
|
20911
|
-
this.labelHoverOnAxisGroup.setAttributes({
|
|
20912
|
-
visible: false,
|
|
20913
|
-
visibleAll: false
|
|
20914
|
-
});
|
|
20915
|
-
}
|
|
20916
|
-
}
|
|
20917
20766
|
release() {
|
|
20918
20767
|
super.release();
|
|
20919
20768
|
this._breaks = null;
|
|
@@ -22869,12 +22718,25 @@ class LabelBase extends AnimateComponent {
|
|
|
22869
22718
|
else {
|
|
22870
22719
|
labels = this._layout(labels);
|
|
22871
22720
|
}
|
|
22721
|
+
const filteredLabels = [];
|
|
22722
|
+
const overlapLabels = labels;
|
|
22723
|
+
if (!isBoolean(overlap) && isFunction(overlap.filterBeforeOverlap)) {
|
|
22724
|
+
const getRelatedGraphic = this.getRelatedGraphic.bind(this);
|
|
22725
|
+
labels.forEach(label => {
|
|
22726
|
+
if (overlap.filterBeforeOverlap(label, getRelatedGraphic, this)) {
|
|
22727
|
+
overlapLabels.push(label);
|
|
22728
|
+
}
|
|
22729
|
+
else {
|
|
22730
|
+
filteredLabels.push(label);
|
|
22731
|
+
}
|
|
22732
|
+
});
|
|
22733
|
+
}
|
|
22872
22734
|
if (isFunction(customOverlapFunc)) {
|
|
22873
|
-
labels = customOverlapFunc(
|
|
22735
|
+
labels = customOverlapFunc(overlapLabels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? (d) => this._idToPoint.get(d.id) : null, this).concat(filteredLabels);
|
|
22874
22736
|
}
|
|
22875
22737
|
else {
|
|
22876
22738
|
if (overlap !== false) {
|
|
22877
|
-
labels = this._overlapping(
|
|
22739
|
+
labels = this._overlapping(overlapLabels).concat(filteredLabels);
|
|
22878
22740
|
}
|
|
22879
22741
|
}
|
|
22880
22742
|
if (isFunction(this.attribute.onAfterOverlapping)) {
|
|
@@ -25211,7 +25073,7 @@ class DataZoomRenderer {
|
|
|
25211
25073
|
const { position, width, height } = this._getLayoutAttrFromConfig();
|
|
25212
25074
|
const group = this._getContainer();
|
|
25213
25075
|
this._background = group.createOrUpdateChild('background', Object.assign(Object.assign({ x: position.x, y: position.y, width,
|
|
25214
|
-
height, cursor: brushSelect ? 'crosshair' : 'auto' }, backgroundStyle), { pickable: zoomLock ? false : (
|
|
25076
|
+
height, cursor: brushSelect ? 'crosshair' : 'auto' }, backgroundStyle), { pickable: zoomLock ? false : (_a = backgroundStyle.pickable) !== null && _a !== void 0 ? _a : true }), 'rect');
|
|
25215
25077
|
}
|
|
25216
25078
|
_renderHandler() {
|
|
25217
25079
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
@@ -25224,11 +25086,11 @@ class DataZoomRenderer {
|
|
|
25224
25086
|
if (this._isHorizontal) {
|
|
25225
25087
|
if (middleHandlerStyle.visible) {
|
|
25226
25088
|
const middleHandlerBackgroundSize = ((_c = middleHandlerStyle.background) === null || _c === void 0 ? void 0 : _c.size) || 10;
|
|
25227
|
-
this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', Object.assign(Object.assign({ x: position.x + start * width, y: position.y - middleHandlerBackgroundSize, width: (end - start) * width, height: middleHandlerBackgroundSize }, (_d = middleHandlerStyle.background) === null || _d === void 0 ? void 0 : _d.style), { pickable: zoomLock ? false : (
|
|
25228
|
-
this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', Object.assign(Object.assign({ x: position.x + ((start + end) / 2) * width, y: position.y - middleHandlerBackgroundSize / 2, strokeBoundsBuffer: 0, angle: 0, symbolType: (_j = (_h = middleHandlerStyle.icon) === null || _h === void 0 ? void 0 : _h.symbolType) !== null && _j !== void 0 ? _j : 'square' }, middleHandlerStyle.icon), { pickable: zoomLock ? false : (
|
|
25089
|
+
this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', Object.assign(Object.assign({ x: position.x + start * width, y: position.y - middleHandlerBackgroundSize, width: (end - start) * width, height: middleHandlerBackgroundSize }, (_d = middleHandlerStyle.background) === null || _d === void 0 ? void 0 : _d.style), { pickable: zoomLock ? false : (_g = (_f = (_e = middleHandlerStyle.background) === null || _e === void 0 ? void 0 : _e.style) === null || _f === void 0 ? void 0 : _f.pickable) !== null && _g !== void 0 ? _g : true }), 'rect');
|
|
25090
|
+
this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', Object.assign(Object.assign({ x: position.x + ((start + end) / 2) * width, y: position.y - middleHandlerBackgroundSize / 2, strokeBoundsBuffer: 0, angle: 0, symbolType: (_j = (_h = middleHandlerStyle.icon) === null || _h === void 0 ? void 0 : _h.symbolType) !== null && _j !== void 0 ? _j : 'square' }, middleHandlerStyle.icon), { pickable: zoomLock ? false : (_k = middleHandlerStyle.icon.pickable) !== null && _k !== void 0 ? _k : true }), 'symbol');
|
|
25229
25091
|
}
|
|
25230
|
-
this._startHandler = group.createOrUpdateChild('startHandler', Object.assign(Object.assign(Object.assign({ x: position.x + start * width, y: position.y + height / 2, size: height, symbolType: (_l = startHandlerStyle.symbolType) !== null && _l !== void 0 ? _l : 'square' }, DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), { pickable: zoomLock ? false : (
|
|
25231
|
-
this._endHandler = group.createOrUpdateChild('endHandler', Object.assign(Object.assign(Object.assign({ x: position.x + end * width, y: position.y + height / 2, size: height, symbolType: (_o = endHandlerStyle.symbolType) !== null && _o !== void 0 ? _o : 'square' }, DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), { pickable: zoomLock ? false : (
|
|
25092
|
+
this._startHandler = group.createOrUpdateChild('startHandler', Object.assign(Object.assign(Object.assign({ x: position.x + start * width, y: position.y + height / 2, size: height, symbolType: (_l = startHandlerStyle.symbolType) !== null && _l !== void 0 ? _l : 'square' }, DEFAULT_HANDLER_ATTR_MAP.horizontal), startHandlerStyle), { pickable: zoomLock ? false : (_m = startHandlerStyle.pickable) !== null && _m !== void 0 ? _m : true }), 'symbol');
|
|
25093
|
+
this._endHandler = group.createOrUpdateChild('endHandler', Object.assign(Object.assign(Object.assign({ x: position.x + end * width, y: position.y + height / 2, size: height, symbolType: (_o = endHandlerStyle.symbolType) !== null && _o !== void 0 ? _o : 'square' }, DEFAULT_HANDLER_ATTR_MAP.horizontal), endHandlerStyle), { pickable: zoomLock ? false : (_p = endHandlerStyle.pickable) !== null && _p !== void 0 ? _p : true }), 'symbol');
|
|
25232
25094
|
const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize);
|
|
25233
25095
|
const startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize);
|
|
25234
25096
|
const endHandlerWidth = Math.max(this._endHandler.AABBBounds.width(), endHandlerMinSize);
|
|
@@ -25239,13 +25101,13 @@ class DataZoomRenderer {
|
|
|
25239
25101
|
else {
|
|
25240
25102
|
if (middleHandlerStyle.visible) {
|
|
25241
25103
|
const middleHandlerBackgroundSize = ((_q = middleHandlerStyle.background) === null || _q === void 0 ? void 0 : _q.size) || 10;
|
|
25242
|
-
this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', Object.assign(Object.assign({ x: orient === 'left' ? position.x - middleHandlerBackgroundSize : position.x + width, y: position.y + start * height, width: middleHandlerBackgroundSize, height: (end - start) * height }, (_r = middleHandlerStyle.background) === null || _r === void 0 ? void 0 : _r.style), { pickable: zoomLock ? false : (
|
|
25104
|
+
this._middleHandlerRect = group.createOrUpdateChild('middleHandlerRect', Object.assign(Object.assign({ x: orient === 'left' ? position.x - middleHandlerBackgroundSize : position.x + width, y: position.y + start * height, width: middleHandlerBackgroundSize, height: (end - start) * height }, (_r = middleHandlerStyle.background) === null || _r === void 0 ? void 0 : _r.style), { pickable: zoomLock ? false : (_u = (_t = (_s = middleHandlerStyle.background) === null || _s === void 0 ? void 0 : _s.style) === null || _t === void 0 ? void 0 : _t.pickable) !== null && _u !== void 0 ? _u : true }), 'rect');
|
|
25243
25105
|
this._middleHandlerSymbol = group.createOrUpdateChild('middleHandlerSymbol', Object.assign(Object.assign({ x: orient === 'left'
|
|
25244
25106
|
? position.x - middleHandlerBackgroundSize / 2
|
|
25245
|
-
: position.x + width + middleHandlerBackgroundSize / 2, y: position.y + ((start + end) / 2) * height, angle: 90 * (Math.PI / 180), symbolType: (_w = (_v = middleHandlerStyle.icon) === null || _v === void 0 ? void 0 : _v.symbolType) !== null && _w !== void 0 ? _w : 'square', strokeBoundsBuffer: 0 }, middleHandlerStyle.icon), { pickable: zoomLock ? false : (
|
|
25107
|
+
: position.x + width + middleHandlerBackgroundSize / 2, y: position.y + ((start + end) / 2) * height, angle: 90 * (Math.PI / 180), symbolType: (_w = (_v = middleHandlerStyle.icon) === null || _v === void 0 ? void 0 : _v.symbolType) !== null && _w !== void 0 ? _w : 'square', strokeBoundsBuffer: 0 }, middleHandlerStyle.icon), { pickable: zoomLock ? false : (_y = (_x = middleHandlerStyle.icon) === null || _x === void 0 ? void 0 : _x.pickable) !== null && _y !== void 0 ? _y : true }), 'symbol');
|
|
25246
25108
|
}
|
|
25247
|
-
this._startHandler = group.createOrUpdateChild('startHandler', Object.assign(Object.assign(Object.assign({ x: position.x + width / 2, y: position.y + start * height, size: width, symbolType: (_z = startHandlerStyle.symbolType) !== null && _z !== void 0 ? _z : 'square' }, DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), { pickable: zoomLock ? false : (
|
|
25248
|
-
this._endHandler = group.createOrUpdateChild('endHandler', Object.assign(Object.assign(Object.assign({ x: position.x + width / 2, y: position.y + end * height, size: width, symbolType: (_1 = endHandlerStyle.symbolType) !== null && _1 !== void 0 ? _1 : 'square' }, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), { pickable: zoomLock ? false : (
|
|
25109
|
+
this._startHandler = group.createOrUpdateChild('startHandler', Object.assign(Object.assign(Object.assign({ x: position.x + width / 2, y: position.y + start * height, size: width, symbolType: (_z = startHandlerStyle.symbolType) !== null && _z !== void 0 ? _z : 'square' }, DEFAULT_HANDLER_ATTR_MAP.vertical), startHandlerStyle), { pickable: zoomLock ? false : (_0 = startHandlerStyle.pickable) !== null && _0 !== void 0 ? _0 : true }), 'symbol');
|
|
25110
|
+
this._endHandler = group.createOrUpdateChild('endHandler', Object.assign(Object.assign(Object.assign({ x: position.x + width / 2, y: position.y + end * height, size: width, symbolType: (_1 = endHandlerStyle.symbolType) !== null && _1 !== void 0 ? _1 : 'square' }, DEFAULT_HANDLER_ATTR_MAP.vertical), endHandlerStyle), { pickable: zoomLock ? false : (_2 = endHandlerStyle.pickable) !== null && _2 !== void 0 ? _2 : true }), 'symbol');
|
|
25249
25111
|
const startHandlerWidth = Math.max(this._startHandler.AABBBounds.width(), startHandlerMinSize);
|
|
25250
25112
|
const startHandlerHeight = Math.max(this._startHandler.AABBBounds.height(), startHandlerMinSize);
|
|
25251
25113
|
const endHandlerWidth = Math.max(this._endHandler.AABBBounds.width(), endHandlerMinSize);
|
|
@@ -25261,10 +25123,10 @@ class DataZoomRenderer {
|
|
|
25261
25123
|
const { position, width, height } = this._getLayoutAttrFromConfig();
|
|
25262
25124
|
const group = this._getContainer();
|
|
25263
25125
|
if (this._isHorizontal) {
|
|
25264
|
-
this._selectedBackground = group.createOrUpdateChild('selectedBackground', Object.assign(Object.assign({ x: position.x + start * width, y: position.y, width: (end - start) * width, height: height, cursor: brushSelect ? 'crosshair' : 'move' }, selectedBackgroundStyle), { pickable: zoomLock ? false : (
|
|
25126
|
+
this._selectedBackground = group.createOrUpdateChild('selectedBackground', Object.assign(Object.assign({ x: position.x + start * width, y: position.y, width: (end - start) * width, height: height, cursor: brushSelect ? 'crosshair' : 'move' }, selectedBackgroundStyle), { pickable: zoomLock ? false : (_a = selectedBackgroundChartStyle.pickable) !== null && _a !== void 0 ? _a : true }), 'rect');
|
|
25265
25127
|
}
|
|
25266
25128
|
else {
|
|
25267
|
-
this._selectedBackground = group.createOrUpdateChild('selectedBackground', Object.assign(Object.assign({ x: position.x, y: position.y + start * height, width, height: (end - start) * height, cursor: brushSelect ? 'crosshair' : 'move' }, selectedBackgroundStyle), { pickable: zoomLock ? false : (
|
|
25129
|
+
this._selectedBackground = group.createOrUpdateChild('selectedBackground', Object.assign(Object.assign({ x: position.x, y: position.y + start * height, width, height: (end - start) * height, cursor: brushSelect ? 'crosshair' : 'move' }, selectedBackgroundStyle), { pickable: zoomLock ? false : (_b = selectedBackgroundStyle.pickable) !== null && _b !== void 0 ? _b : true }), 'rect');
|
|
25268
25130
|
}
|
|
25269
25131
|
}
|
|
25270
25132
|
_setPreviewAttributes(type, group) {
|
|
@@ -25319,8 +25181,13 @@ class DataZoomRenderer {
|
|
|
25319
25181
|
type === 'area' &&
|
|
25320
25182
|
this._selectedPreviewArea.setAttributes(Object.assign({ points: this._getPreviewAreaPoints(), curveType: 'basis', pickable: false }, selectedBackgroundChartStyle.area));
|
|
25321
25183
|
}
|
|
25322
|
-
_computeBasePoints() {
|
|
25184
|
+
_computeBasePoints(points) {
|
|
25323
25185
|
const { orient } = this.attribute;
|
|
25186
|
+
const key = orient === 'bottom' || orient === 'top' ? 'x' : 'y';
|
|
25187
|
+
let lastPointSide = Math.sign(points[points.length - 1][key] - points[0][key]);
|
|
25188
|
+
if (lastPointSide === 0) {
|
|
25189
|
+
lastPointSide = 1;
|
|
25190
|
+
}
|
|
25324
25191
|
const { position, width, height } = this._getLayoutAttrFromConfig();
|
|
25325
25192
|
let basePointStart;
|
|
25326
25193
|
let basePointEnd;
|
|
@@ -25366,6 +25233,12 @@ class DataZoomRenderer {
|
|
|
25366
25233
|
}
|
|
25367
25234
|
];
|
|
25368
25235
|
}
|
|
25236
|
+
if (Math.sign(basePointEnd[0][key] - basePointStart[0][key]) !== lastPointSide) {
|
|
25237
|
+
return {
|
|
25238
|
+
basePointStart: basePointEnd,
|
|
25239
|
+
basePointEnd: basePointStart
|
|
25240
|
+
};
|
|
25241
|
+
}
|
|
25369
25242
|
return {
|
|
25370
25243
|
basePointStart,
|
|
25371
25244
|
basePointEnd
|
|
@@ -25391,7 +25264,7 @@ class DataZoomRenderer {
|
|
|
25391
25264
|
return previewPoints;
|
|
25392
25265
|
}
|
|
25393
25266
|
previewPoints = this._simplifyPoints(previewPoints);
|
|
25394
|
-
const { basePointStart, basePointEnd } = this._computeBasePoints();
|
|
25267
|
+
const { basePointStart, basePointEnd } = this._computeBasePoints(previewPoints);
|
|
25395
25268
|
return basePointStart.concat(previewPoints).concat(basePointEnd);
|
|
25396
25269
|
}
|
|
25397
25270
|
_getPreviewAreaPoints() {
|
|
@@ -25407,7 +25280,7 @@ class DataZoomRenderer {
|
|
|
25407
25280
|
return previewPoints;
|
|
25408
25281
|
}
|
|
25409
25282
|
previewPoints = this._simplifyPoints(previewPoints);
|
|
25410
|
-
const { basePointStart, basePointEnd } = this._computeBasePoints();
|
|
25283
|
+
const { basePointStart, basePointEnd } = this._computeBasePoints(previewPoints);
|
|
25411
25284
|
return basePointStart.concat(previewPoints).concat(basePointEnd);
|
|
25412
25285
|
}
|
|
25413
25286
|
renderText() {
|
|
@@ -25939,9 +25812,10 @@ class DataZoom extends AbstractComponent {
|
|
|
25939
25812
|
}
|
|
25940
25813
|
}
|
|
25941
25814
|
setAttributes(params, forceUpdateTag) {
|
|
25815
|
+
var _a, _b;
|
|
25942
25816
|
const { start, end } = this.attribute;
|
|
25943
|
-
start && (this._state.start = start);
|
|
25944
|
-
end && (this._state.end = end);
|
|
25817
|
+
start && (this._state.start = (_a = params.start) !== null && _a !== void 0 ? _a : start);
|
|
25818
|
+
end && (this._state.end = (_b = params.end) !== null && _b !== void 0 ? _b : end);
|
|
25945
25819
|
this._renderer.setAttributes(this._getRendererAttrs());
|
|
25946
25820
|
this._interaction.setAttributes(this._getInteractionAttrs());
|
|
25947
25821
|
super.setAttributes(params, forceUpdateTag);
|
|
@@ -34721,6 +34595,6 @@ TableSeriesNumber.defaultAttributes = {
|
|
|
34721
34595
|
select: true
|
|
34722
34596
|
};
|
|
34723
34597
|
|
|
34724
|
-
const version = "1.0.26-alpha.
|
|
34598
|
+
const version = "1.0.26-alpha.1";
|
|
34725
34599
|
|
|
34726
34600
|
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, IDataZoomEvent, IDataZoomInteractiveEvent, 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, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SeriesNumberCellStateValue, SeriesNumberEvent, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, TableSeriesNumber, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, 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, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
|
package/es/axis/circle.d.ts
CHANGED
|
@@ -30,25 +30,6 @@ export declare class CircleAxis extends AxisBase<CircleAxisAttributes> {
|
|
|
30
30
|
fillOpacity: number;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
labelHoverOnAxis: {
|
|
34
|
-
visible: boolean;
|
|
35
|
-
space: number;
|
|
36
|
-
position: number;
|
|
37
|
-
autoRotate: boolean;
|
|
38
|
-
textStyle: {
|
|
39
|
-
fontSize: number;
|
|
40
|
-
fill: string;
|
|
41
|
-
fontWeight: string;
|
|
42
|
-
fillOpacity: number;
|
|
43
|
-
};
|
|
44
|
-
background: {
|
|
45
|
-
visible: boolean;
|
|
46
|
-
style: {
|
|
47
|
-
cornerRadius: number;
|
|
48
|
-
fill: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
33
|
tick: {
|
|
53
34
|
visible: boolean;
|
|
54
35
|
inside: boolean;
|
package/es/axis/config.d.ts
CHANGED
|
@@ -21,25 +21,6 @@ export declare const DEFAULT_AXIS_THEME: {
|
|
|
21
21
|
fillOpacity: number;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
labelHoverOnAxis: {
|
|
25
|
-
visible: boolean;
|
|
26
|
-
space: number;
|
|
27
|
-
position: number;
|
|
28
|
-
autoRotate: boolean;
|
|
29
|
-
textStyle: {
|
|
30
|
-
fontSize: number;
|
|
31
|
-
fill: string;
|
|
32
|
-
fontWeight: string;
|
|
33
|
-
fillOpacity: number;
|
|
34
|
-
};
|
|
35
|
-
background: {
|
|
36
|
-
visible: boolean;
|
|
37
|
-
style: {
|
|
38
|
-
cornerRadius: number;
|
|
39
|
-
fill: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
24
|
tick: {
|
|
44
25
|
visible: boolean;
|
|
45
26
|
inside: boolean;
|
package/es/axis/config.js
CHANGED
|
@@ -21,25 +21,6 @@ export const DEFAULT_AXIS_THEME = {
|
|
|
21
21
|
fillOpacity: 1
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
labelHoverOnAxis: {
|
|
25
|
-
visible: !1,
|
|
26
|
-
space: 4,
|
|
27
|
-
position: 0,
|
|
28
|
-
autoRotate: !1,
|
|
29
|
-
textStyle: {
|
|
30
|
-
fontSize: 12,
|
|
31
|
-
fill: "white",
|
|
32
|
-
fontWeight: "normal",
|
|
33
|
-
fillOpacity: 1
|
|
34
|
-
},
|
|
35
|
-
background: {
|
|
36
|
-
visible: !0,
|
|
37
|
-
style: {
|
|
38
|
-
cornerRadius: 2,
|
|
39
|
-
fill: "black"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
24
|
tick: {
|
|
44
25
|
visible: !0,
|
|
45
26
|
inside: !1,
|
package/es/axis/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/axis/config.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;SACf;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,CAAC;QACV,KAAK,EAAE;YACL,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;SACf;KACF;IACD,
|
|
1
|
+
{"version":3,"sources":["../src/axis/config.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;SACf;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,CAAC;QACV,KAAK,EAAE;YACL,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;SACf;KACF;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,KAAK;QACb,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,CAAC;QACT,KAAK,EAAE;YACL,SAAS,EAAE,CAAC;YACZ,MAAM,EAAE,MAAM;YACd,aAAa,EAAE,CAAC;SACjB;KACF;IACD,OAAO,EAAE;QACP,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,KAAK,EAAE;YACL,SAAS,EAAE,CAAC;YACZ,MAAM,EAAE,MAAM;YACd,aAAa,EAAE,CAAC;SACjB;KACF;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,KAAK,EAAE;YACL,SAAS,EAAE,CAAC;YACZ,MAAM,EAAE,MAAM;YACd,aAAa,EAAE,CAAC;SACjB;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,CAAC;IACZ,MAAM,EAAE,CAAC;CACV,CAAC","file":"config.js","sourcesContent":["export const DEFAULT_AXIS_THEME = {\n title: {\n space: 4,\n padding: 0,\n textStyle: {\n fontSize: 12,\n fill: '#333333',\n fontWeight: 'normal',\n fillOpacity: 1\n }\n },\n label: {\n visible: true,\n inside: false,\n space: 4,\n padding: 0,\n style: {\n fontSize: 12,\n fill: '#333',\n fontWeight: 'normal',\n fillOpacity: 1\n }\n },\n tick: {\n visible: true,\n inside: false,\n alignWithLabel: true,\n length: 4,\n style: {\n lineWidth: 1,\n stroke: '#000',\n strokeOpacity: 1\n }\n },\n subTick: {\n visible: false,\n inside: false,\n count: 4,\n length: 2,\n style: {\n lineWidth: 1,\n stroke: '#999',\n strokeOpacity: 1\n }\n },\n line: {\n visible: true,\n style: {\n lineWidth: 1,\n stroke: '#000',\n strokeOpacity: 1\n }\n }\n};\n\nexport const DEFAULT_AXIS_BREAK_SYMBOL_STYLE = {\n size: 8,\n stroke: '#000',\n lineWidth: 1,\n zIndex: 1\n};\n"]}
|
package/es/axis/constant.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export declare enum AXIS_ELEMENT_NAME {
|
|
|
7
7
|
subTick = "axis-sub-tick",
|
|
8
8
|
label = "axis-label",
|
|
9
9
|
title = "axis-title",
|
|
10
|
-
labelHoverOnAxis = "axis-label-hover-on-axis",
|
|
11
10
|
gridContainer = "axis-grid-container",
|
|
12
11
|
grid = "axis-grid",
|
|
13
12
|
gridRegion = "axis-grid-region",
|
package/es/axis/constant.js
CHANGED
|
@@ -5,11 +5,10 @@ export var AXIS_ELEMENT_NAME;
|
|
|
5
5
|
AXIS_ELEMENT_NAME.labelContainer = "axis-label-container", AXIS_ELEMENT_NAME.tickContainer = "axis-tick-container",
|
|
6
6
|
AXIS_ELEMENT_NAME.tick = "axis-tick", AXIS_ELEMENT_NAME.subTick = "axis-sub-tick",
|
|
7
7
|
AXIS_ELEMENT_NAME.label = "axis-label", AXIS_ELEMENT_NAME.title = "axis-title",
|
|
8
|
-
AXIS_ELEMENT_NAME.
|
|
9
|
-
AXIS_ELEMENT_NAME.
|
|
10
|
-
AXIS_ELEMENT_NAME.
|
|
11
|
-
AXIS_ELEMENT_NAME.
|
|
12
|
-
AXIS_ELEMENT_NAME.axisBreakSymbol = "axis-break-symbol";
|
|
8
|
+
AXIS_ELEMENT_NAME.gridContainer = "axis-grid-container", AXIS_ELEMENT_NAME.grid = "axis-grid",
|
|
9
|
+
AXIS_ELEMENT_NAME.gridRegion = "axis-grid-region", AXIS_ELEMENT_NAME.line = "axis-line",
|
|
10
|
+
AXIS_ELEMENT_NAME.background = "axis-background", AXIS_ELEMENT_NAME.axisLabelBackground = "axis-label-background",
|
|
11
|
+
AXIS_ELEMENT_NAME.axisBreak = "axis-break", AXIS_ELEMENT_NAME.axisBreakSymbol = "axis-break-symbol";
|
|
13
12
|
}(AXIS_ELEMENT_NAME || (AXIS_ELEMENT_NAME = {}));
|
|
14
13
|
|
|
15
14
|
export var AxisStateValue;
|
package/es/axis/constant.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/axis/constant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"sources":["../src/axis/constant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAiBX;AAjBD,WAAY,iBAAiB;IAC3B,6CAAwB,CAAA;IACxB,qDAAgC,CAAA;IAChC,4DAAuC,CAAA;IACvC,0DAAqC,CAAA;IACrC,uCAAkB,CAAA;IAClB,8CAAyB,CAAA;IACzB,yCAAoB,CAAA;IACpB,yCAAoB,CAAA;IACpB,0DAAqC,CAAA;IACrC,uCAAkB,CAAA;IAClB,oDAA+B,CAAA;IAC/B,uCAAkB,CAAA;IAClB,mDAA8B,CAAA;IAC9B,kEAA6C,CAAA;IAC7C,6CAAwB,CAAA;IACxB,0DAAqC,CAAA;AACvC,CAAC,EAjBW,iBAAiB,KAAjB,iBAAiB,QAiB5B;AAED,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,sDAAoC,CAAA;IACpC,iCAAe,CAAA;IACf,gDAA8B,CAAA;AAChC,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AAED,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,EAAE;IACpC,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,EAAE;IAC7B,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE;IAC1B,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,EAAE;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAC","file":"constant.js","sourcesContent":["export enum AXIS_ELEMENT_NAME {\n innerView = 'inner-view',\n axisContainer = 'axis-container',\n labelContainer = 'axis-label-container',\n tickContainer = 'axis-tick-container',\n tick = 'axis-tick',\n subTick = 'axis-sub-tick',\n label = 'axis-label',\n title = 'axis-title',\n gridContainer = 'axis-grid-container',\n grid = 'axis-grid',\n gridRegion = 'axis-grid-region',\n line = 'axis-line',\n background = 'axis-background',\n axisLabelBackground = 'axis-label-background',\n axisBreak = 'axis-break',\n axisBreakSymbol = 'axis-break-symbol'\n}\n\nexport enum AxisStateValue {\n selected = 'selected',\n selectedReverse = 'selected_reverse',\n hover = 'hover',\n hoverReverse = 'hover_reverse'\n}\n\nexport const DEFAULT_STATES = {\n [AxisStateValue.selectedReverse]: {},\n [AxisStateValue.selected]: {},\n [AxisStateValue.hover]: {},\n [AxisStateValue.hoverReverse]: {}\n};\n\nexport const TopZIndex = 999;\n"]}
|
package/es/axis/line.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TextAlignType, IGroup, IText, TextBaselineType } from '@visactor/vrender-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { TagAttributes } from '../tag';
|
|
3
3
|
import type { LineAxisAttributes, AxisItem } from './type';
|
|
4
4
|
import { AxisBase } from './base';
|
|
5
5
|
import { LineAxisMixin } from './mixin/line';
|
|
@@ -30,25 +30,6 @@ export declare class LineAxis extends AxisBase<LineAxisAttributes> {
|
|
|
30
30
|
fillOpacity: number;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
labelHoverOnAxis: {
|
|
34
|
-
visible: boolean;
|
|
35
|
-
space: number;
|
|
36
|
-
position: number;
|
|
37
|
-
autoRotate: boolean;
|
|
38
|
-
textStyle: {
|
|
39
|
-
fontSize: number;
|
|
40
|
-
fill: string;
|
|
41
|
-
fontWeight: string;
|
|
42
|
-
fillOpacity: number;
|
|
43
|
-
};
|
|
44
|
-
background: {
|
|
45
|
-
visible: boolean;
|
|
46
|
-
style: {
|
|
47
|
-
cornerRadius: number;
|
|
48
|
-
fill: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
33
|
tick: {
|
|
53
34
|
visible: boolean;
|
|
54
35
|
inside: boolean;
|
|
@@ -80,15 +61,12 @@ export declare class LineAxis extends AxisBase<LineAxisAttributes> {
|
|
|
80
61
|
};
|
|
81
62
|
};
|
|
82
63
|
};
|
|
83
|
-
private _breaks;
|
|
84
|
-
private labelHoverOnAxisGroup;
|
|
85
64
|
constructor(attributes: LineAxisAttributes, options?: ComponentOptions);
|
|
65
|
+
private _breaks;
|
|
86
66
|
protected _renderInner(container: IGroup): void;
|
|
87
|
-
protected renderLabelHoverOnAxis(): void;
|
|
88
67
|
protected renderLine(container: IGroup): void;
|
|
89
68
|
protected getTextAlign(vector: number[]): TextAlignType;
|
|
90
69
|
protected getTitleAttribute(): TagAttributes;
|
|
91
|
-
protected getLabelHoverOnAxisAttribute(): TagAttributes;
|
|
92
70
|
protected getTextBaseline(vector: number[], inside?: boolean): TextBaselineType;
|
|
93
71
|
protected getLabelAlign(vector: [number, number], inside?: boolean, angle?: number): {
|
|
94
72
|
textAlign: TextAlignType;
|
|
@@ -98,7 +76,5 @@ export declare class LineAxis extends AxisBase<LineAxisAttributes> {
|
|
|
98
76
|
protected handleLabelsOverlap(labelShapes: IText[], labelData: AxisItem[], labelContainer: IGroup, layer: number, layerCount: number): void;
|
|
99
77
|
protected afterLabelsOverlap(labelShapes: IText[], labelData: AxisItem[], labelContainer: IGroup, layer: number, layerCount: number): void;
|
|
100
78
|
private _getAxisLabelLimitLength;
|
|
101
|
-
showLabelHoverOnAxis(position: number, text: string): void;
|
|
102
|
-
hideLabelHoverOnAxis(): void;
|
|
103
79
|
release(): void;
|
|
104
80
|
}
|