@visactor/vrender-components 0.19.20-alpha.2 → 0.19.21-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/brush/brush.js +1 -2
- package/cjs/brush/type.js +2 -1
- package/cjs/index.d.ts +1 -2
- package/cjs/index.js +4 -5
- package/cjs/index.js.map +1 -1
- package/cjs/label/arc.js +9 -2
- package/cjs/label/arc.js.map +1 -1
- package/cjs/label/base.js +5 -0
- package/cjs/label/base.js.map +1 -1
- package/cjs/label/type.d.ts +4 -2
- package/cjs/label/type.js.map +1 -1
- package/dist/index.es.js +16 -216
- package/es/brush/brush.js +1 -2
- package/es/brush/type.js +2 -1
- package/es/index.d.ts +1 -2
- package/es/index.js +1 -3
- package/es/index.js.map +1 -1
- package/es/label/arc.js +10 -3
- package/es/label/arc.js.map +1 -1
- package/es/label/base.js +6 -1
- package/es/label/base.js.map +1 -1
- package/es/label/type.d.ts +4 -2
- package/es/label/type.js.map +1 -1
- package/package.json +3 -3
- package/cjs/timeline/index.d.ts +0 -2
- package/cjs/timeline/index.js +0 -21
- package/cjs/timeline/index.js.map +0 -1
- package/cjs/timeline/register.d.ts +0 -1
- package/cjs/timeline/register.js +0 -15
- package/cjs/timeline/register.js.map +0 -1
- package/cjs/timeline/timeline.d.ts +0 -30
- package/cjs/timeline/timeline.js +0 -178
- package/cjs/timeline/timeline.js.map +0 -1
- package/cjs/timeline/type.d.ts +0 -18
- package/cjs/timeline/type.js +0 -6
- package/cjs/timeline/type.js.map +0 -1
- package/es/timeline/index.d.ts +0 -2
- package/es/timeline/index.js +0 -4
- package/es/timeline/index.js.map +0 -1
- package/es/timeline/register.d.ts +0 -1
- package/es/timeline/register.js +0 -6
- package/es/timeline/register.js.map +0 -1
- package/es/timeline/timeline.d.ts +0 -30
- package/es/timeline/timeline.js +0 -175
- package/es/timeline/timeline.js.map +0 -1
- package/es/timeline/type.d.ts +0 -18
- package/es/timeline/type.js +0 -2
- package/es/timeline/type.js.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -17104,11 +17104,18 @@ class LabelBase extends AbstractComponent {
|
|
|
17104
17104
|
return;
|
|
17105
17105
|
}
|
|
17106
17106
|
_createLabelLine(text, baseMark) {
|
|
17107
|
+
var _a;
|
|
17107
17108
|
const points = connectLineBetweenBounds(text.AABBBounds, baseMark === null || baseMark === void 0 ? void 0 : baseMark.AABBBounds);
|
|
17108
17109
|
if (points) {
|
|
17109
17110
|
const line = graphicCreator.line({
|
|
17110
17111
|
points
|
|
17111
17112
|
});
|
|
17113
|
+
if ((_a = line.style) === null || _a === void 0 ? void 0 : _a.customShape) {
|
|
17114
|
+
const customShape = line.style.customShape;
|
|
17115
|
+
line.pathProxy = (attrs) => {
|
|
17116
|
+
return customShape(attrs, new CustomPath2D());
|
|
17117
|
+
};
|
|
17118
|
+
}
|
|
17112
17119
|
if (baseMark && baseMark.attribute.fill) {
|
|
17113
17120
|
line.setAttribute('stroke', baseMark.attribute.fill);
|
|
17114
17121
|
}
|
|
@@ -18506,7 +18513,7 @@ class ArcLabel extends LabelBase {
|
|
|
18506
18513
|
}
|
|
18507
18514
|
}
|
|
18508
18515
|
_createLabelLine(text, baseMark) {
|
|
18509
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
18516
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
18510
18517
|
const { points, line = {}, visible, fill } = text.attribute;
|
|
18511
18518
|
const labelLine = text.attribute.points
|
|
18512
18519
|
? graphicCreator.line({
|
|
@@ -18518,6 +18525,12 @@ class ArcLabel extends LabelBase {
|
|
|
18518
18525
|
})
|
|
18519
18526
|
: undefined;
|
|
18520
18527
|
if (labelLine) {
|
|
18528
|
+
if ((_h = line.style) === null || _h === void 0 ? void 0 : _h.customShape) {
|
|
18529
|
+
const customShape = line.style.customShape;
|
|
18530
|
+
labelLine.pathProxy = (attrs) => {
|
|
18531
|
+
return customShape(attrs, new CustomPath2D());
|
|
18532
|
+
};
|
|
18533
|
+
}
|
|
18521
18534
|
this._setStatesOfLabelLine(labelLine);
|
|
18522
18535
|
}
|
|
18523
18536
|
return labelLine;
|
|
@@ -29007,219 +29020,6 @@ class Tooltip extends AbstractComponent {
|
|
|
29007
29020
|
}
|
|
29008
29021
|
Tooltip.defaultAttributes = defaultAttributes;
|
|
29009
29022
|
|
|
29010
|
-
function loadTimelineComponent() {
|
|
29011
|
-
registerGroup();
|
|
29012
|
-
registerText();
|
|
29013
|
-
registerSymbol();
|
|
29014
|
-
registerLine();
|
|
29015
|
-
}
|
|
29016
|
-
|
|
29017
|
-
loadTimelineComponent();
|
|
29018
|
-
class Timeline extends AbstractComponent {
|
|
29019
|
-
constructor(attributes, options) {
|
|
29020
|
-
super((options === null || options === void 0 ? void 0 : options.skipDefault) ? attributes : merge({}, Timeline.defaultAttributes, attributes));
|
|
29021
|
-
this.name = 'timeline';
|
|
29022
|
-
}
|
|
29023
|
-
render() {
|
|
29024
|
-
const { width, lineStyle, activeLineStyle, symbolStyle, activeSymbolStyle, labelStyle, activeLabelStyle, times, pointLayoutMode, labelSpace, clipRange, animation } = this.attribute;
|
|
29025
|
-
if (!(times && times.length)) {
|
|
29026
|
-
return;
|
|
29027
|
-
}
|
|
29028
|
-
const symbolHeight = (isArray(symbolStyle.size) ? symbolStyle.size[1] : symbolStyle.size) || 0;
|
|
29029
|
-
const activeSymbolHeight = (isArray(activeSymbolStyle.size) ? activeSymbolStyle.size[1] : activeSymbolStyle.size) || 0;
|
|
29030
|
-
const lineSymbolHeight = Math.max(lineStyle.lineWidth || 0, activeLineStyle.lineWidth || 0, symbolHeight, activeSymbolHeight);
|
|
29031
|
-
const lineY = lineSymbolHeight / 2;
|
|
29032
|
-
const lineAttr = {
|
|
29033
|
-
y: lineY,
|
|
29034
|
-
points: [
|
|
29035
|
-
{ x: 0, y: 0 },
|
|
29036
|
-
{ x: width, y: 0 }
|
|
29037
|
-
]
|
|
29038
|
-
};
|
|
29039
|
-
this._line = this.createOrUpdateChild('line-axes', Object.assign(Object.assign({}, lineStyle), lineAttr), 'line');
|
|
29040
|
-
this._activeLine = this.createOrUpdateChild('active-line-axes', Object.assign(Object.assign(Object.assign({}, activeLineStyle), lineAttr), { clipRange }), 'line');
|
|
29041
|
-
const activeWidth = width * clipRange;
|
|
29042
|
-
const symbolGroup = this.createOrUpdateChild('symbol-group', {
|
|
29043
|
-
y: lineY
|
|
29044
|
-
}, 'group');
|
|
29045
|
-
const symbolSpace = times.length === 1
|
|
29046
|
-
? width
|
|
29047
|
-
: pointLayoutMode === 'space-between'
|
|
29048
|
-
? width / (times.length - 1)
|
|
29049
|
-
: width / times.length;
|
|
29050
|
-
const symbolStartX = pointLayoutMode === 'space-between' ? 0 : symbolSpace / 2;
|
|
29051
|
-
this._timesPercent = times.map((_, i) => (symbolStartX + symbolSpace * i) / width);
|
|
29052
|
-
times.forEach((item, i) => {
|
|
29053
|
-
const x = this._timesPercent[i] * width;
|
|
29054
|
-
symbolGroup.createOrUpdateChild(item.label, Object.assign(Object.assign({}, symbolStyle), { x }), 'symbol');
|
|
29055
|
-
});
|
|
29056
|
-
this._symbolGroup = symbolGroup;
|
|
29057
|
-
const labelY = lineSymbolHeight + labelSpace;
|
|
29058
|
-
const labelGroup = this.createOrUpdateChild('label-group', {
|
|
29059
|
-
y: labelY
|
|
29060
|
-
}, 'group');
|
|
29061
|
-
times.forEach((item, i) => {
|
|
29062
|
-
const x = this._timesPercent[i] * width;
|
|
29063
|
-
labelGroup.createOrUpdateChild(item.label, Object.assign(Object.assign({}, labelStyle), { x, text: item.label }), 'text');
|
|
29064
|
-
});
|
|
29065
|
-
this._labelGroup = labelGroup;
|
|
29066
|
-
const setActive = (group, activeStyle) => {
|
|
29067
|
-
group.forEachChildren((label) => {
|
|
29068
|
-
if (label.currentStates) {
|
|
29069
|
-
const currentStates = label.currentStates;
|
|
29070
|
-
label.clearStates();
|
|
29071
|
-
label.useStates(currentStates, false);
|
|
29072
|
-
}
|
|
29073
|
-
label.states = {
|
|
29074
|
-
active: activeStyle
|
|
29075
|
-
};
|
|
29076
|
-
if (label.attribute.x <= activeWidth) {
|
|
29077
|
-
label.useStates(['active'], animation);
|
|
29078
|
-
}
|
|
29079
|
-
});
|
|
29080
|
-
};
|
|
29081
|
-
setActive(labelGroup, activeLabelStyle);
|
|
29082
|
-
setActive(symbolGroup, activeSymbolStyle);
|
|
29083
|
-
}
|
|
29084
|
-
appearAnimate(animateConfig) {
|
|
29085
|
-
const { duration = 1000, easing = 'quadOut' } = animateConfig;
|
|
29086
|
-
const { activeLabelStyle, activeSymbolStyle } = this.attribute;
|
|
29087
|
-
const percent = duration / 1000;
|
|
29088
|
-
const lineDuration = percent * 500;
|
|
29089
|
-
const activeLineDuration = percent * 200;
|
|
29090
|
-
const perSymbolDuration = percent * 100;
|
|
29091
|
-
const perSymbolNormalDuration = percent * 90;
|
|
29092
|
-
const symbolDelay = percent * 100;
|
|
29093
|
-
const symbolNormalDelay = percent * 600;
|
|
29094
|
-
if (this._line) {
|
|
29095
|
-
this._line.setAttributes({ clipRange: 0 });
|
|
29096
|
-
this._line.animate().to({ clipRange: 1 }, lineDuration, easing);
|
|
29097
|
-
}
|
|
29098
|
-
if (this._activeLine) {
|
|
29099
|
-
this._activeLine.setAttributes({ opacity: 0 });
|
|
29100
|
-
this._activeLine
|
|
29101
|
-
.animate()
|
|
29102
|
-
.wait(500)
|
|
29103
|
-
.to({ opacity: 1 }, activeLineDuration, easing);
|
|
29104
|
-
}
|
|
29105
|
-
if (this._symbolGroup) {
|
|
29106
|
-
const size = this._symbolGroup.count - 1;
|
|
29107
|
-
const delay = percent * (size === 1 ? 0 : (500 - 100) / (size - 1));
|
|
29108
|
-
const delayNormal = percent * (size === 1 ? 0 : (400 - 160) / (size - 1));
|
|
29109
|
-
this._symbolGroup.forEachChildren((symbol, i) => {
|
|
29110
|
-
const originAttrs = Object.assign({}, symbol.attribute);
|
|
29111
|
-
symbol.setAttributes({ opacity: 0 });
|
|
29112
|
-
symbol
|
|
29113
|
-
.animate()
|
|
29114
|
-
.wait(symbolDelay + delay * i)
|
|
29115
|
-
.to({ opacity: 1 }, perSymbolDuration, easing);
|
|
29116
|
-
symbol
|
|
29117
|
-
.animate()
|
|
29118
|
-
.wait(symbolNormalDelay + delayNormal * i)
|
|
29119
|
-
.to(Object.assign({ scaleX: 1.8, scaleY: 1.8 }, activeSymbolStyle), perSymbolNormalDuration, easing)
|
|
29120
|
-
.to(Object.assign({ scaleX: 1, scaleY: 1 }, originAttrs), perSymbolNormalDuration, easing);
|
|
29121
|
-
});
|
|
29122
|
-
}
|
|
29123
|
-
if (this._labelGroup) {
|
|
29124
|
-
const size = this._labelGroup.count - 1;
|
|
29125
|
-
const delay = percent * (size === 1 ? 0 : (500 - 100) / (size - 1));
|
|
29126
|
-
const delayNormal = percent * (size === 1 ? 0 : (400 - 160) / (size - 1));
|
|
29127
|
-
this._labelGroup.forEachChildren((label, i) => {
|
|
29128
|
-
const originAttrs = Object.assign({}, label.attribute);
|
|
29129
|
-
label.setAttributes({ opacity: 0 });
|
|
29130
|
-
label
|
|
29131
|
-
.animate()
|
|
29132
|
-
.wait(symbolDelay + delay * i)
|
|
29133
|
-
.to({ opacity: 1 }, perSymbolDuration, easing);
|
|
29134
|
-
label
|
|
29135
|
-
.animate()
|
|
29136
|
-
.wait(symbolNormalDelay + delayNormal * i)
|
|
29137
|
-
.to(Object.assign({ dy: 10 }, activeLabelStyle), perSymbolNormalDuration, easing)
|
|
29138
|
-
.to(Object.assign({ dy: 0 }, originAttrs), perSymbolNormalDuration, easing);
|
|
29139
|
-
});
|
|
29140
|
-
}
|
|
29141
|
-
}
|
|
29142
|
-
goto(flag, animateConfig) {
|
|
29143
|
-
var _a;
|
|
29144
|
-
let { clipRange } = this.attribute;
|
|
29145
|
-
const { animation } = this.attribute;
|
|
29146
|
-
if (flag > 0) {
|
|
29147
|
-
if (clipRange >= 1) {
|
|
29148
|
-
return;
|
|
29149
|
-
}
|
|
29150
|
-
else if (clipRange < 0) {
|
|
29151
|
-
clipRange = 0;
|
|
29152
|
-
}
|
|
29153
|
-
}
|
|
29154
|
-
else {
|
|
29155
|
-
if (clipRange <= 0) {
|
|
29156
|
-
return;
|
|
29157
|
-
}
|
|
29158
|
-
else if (clipRange > 1) {
|
|
29159
|
-
clipRange = 1;
|
|
29160
|
-
}
|
|
29161
|
-
}
|
|
29162
|
-
if (clipRange !== this.attribute.clipRange) {
|
|
29163
|
-
this.setAttributes({ clipRange });
|
|
29164
|
-
}
|
|
29165
|
-
let i = 0;
|
|
29166
|
-
for (; i < this._timesPercent.length; i++) {
|
|
29167
|
-
if (clipRange < this._timesPercent[i]) {
|
|
29168
|
-
break;
|
|
29169
|
-
}
|
|
29170
|
-
}
|
|
29171
|
-
const nextClipRange = flag > 0 ? this._timesPercent[i] : this._timesPercent[i - 1] || 0;
|
|
29172
|
-
if (animation) {
|
|
29173
|
-
const { duration = 1000, easing = 'quadOut' } = animateConfig;
|
|
29174
|
-
const actDuration = (Math.abs(nextClipRange - clipRange) / (this._timesPercent[i] - ((_a = this._timesPercent[i - 1]) !== null && _a !== void 0 ? _a : 0))) * duration;
|
|
29175
|
-
this.animate().to({ clipRange: nextClipRange }, actDuration, easing);
|
|
29176
|
-
}
|
|
29177
|
-
else {
|
|
29178
|
-
this.setAttributes({ clipRange: nextClipRange });
|
|
29179
|
-
}
|
|
29180
|
-
}
|
|
29181
|
-
forward(animateConfig) {
|
|
29182
|
-
this.goto(1, animateConfig);
|
|
29183
|
-
}
|
|
29184
|
-
backward(animateConfig) {
|
|
29185
|
-
this.goto(-1, animateConfig);
|
|
29186
|
-
}
|
|
29187
|
-
}
|
|
29188
|
-
Timeline.defaultAttributes = {
|
|
29189
|
-
labelSpace: 10,
|
|
29190
|
-
pointLayoutMode: 'space-around',
|
|
29191
|
-
animation: true,
|
|
29192
|
-
symbolStyle: {
|
|
29193
|
-
fill: 'black',
|
|
29194
|
-
size: 12,
|
|
29195
|
-
symbolType: 'circle'
|
|
29196
|
-
},
|
|
29197
|
-
activeSymbolStyle: {
|
|
29198
|
-
fill: 'orange'
|
|
29199
|
-
},
|
|
29200
|
-
lineStyle: {
|
|
29201
|
-
lineDash: [2, 2],
|
|
29202
|
-
lineCap: 'butt',
|
|
29203
|
-
stroke: 'black',
|
|
29204
|
-
lineWidth: 2
|
|
29205
|
-
},
|
|
29206
|
-
activeLineStyle: {
|
|
29207
|
-
stroke: 'orange',
|
|
29208
|
-
lineWidth: 4
|
|
29209
|
-
},
|
|
29210
|
-
labelStyle: {
|
|
29211
|
-
fontSize: 12,
|
|
29212
|
-
fill: 'black',
|
|
29213
|
-
textAlign: 'center',
|
|
29214
|
-
textBaseline: 'top'
|
|
29215
|
-
},
|
|
29216
|
-
activeLabelStyle: {
|
|
29217
|
-
fontSize: 14,
|
|
29218
|
-
fill: 'orange'
|
|
29219
|
-
},
|
|
29220
|
-
clipRange: 0
|
|
29221
|
-
};
|
|
29222
|
-
|
|
29223
29023
|
function VTag(params) {
|
|
29224
29024
|
return new Tag(params ? params.attribute : {});
|
|
29225
29025
|
}
|
|
@@ -29575,6 +29375,6 @@ EmptyTip.defaultAttributes = {
|
|
|
29575
29375
|
}
|
|
29576
29376
|
};
|
|
29577
29377
|
|
|
29578
|
-
const version = "0.19.
|
|
29378
|
+
const version = "0.19.21-alpha.0";
|
|
29579
29379
|
|
|
29580
|
-
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, EmptyTip, 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,
|
|
29380
|
+
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, EmptyTip, 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, alignTextInLine, 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 };
|
package/es/brush/brush.js
CHANGED
package/es/brush/type.js
CHANGED
|
@@ -4,4 +4,5 @@ export var IOperateType;
|
|
|
4
4
|
IOperateType.drawStart = "drawStart", IOperateType.drawEnd = "drawEnd", IOperateType.drawing = "drawing",
|
|
5
5
|
IOperateType.moving = "moving", IOperateType.moveStart = "moveStart", IOperateType.moveEnd = "moveEnd",
|
|
6
6
|
IOperateType.brushClear = "brushClear";
|
|
7
|
-
}(IOperateType || (IOperateType = {}));
|
|
7
|
+
}(IOperateType || (IOperateType = {}));
|
|
8
|
+
//# sourceMappingURL=type.js.map
|
package/es/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const version = "0.19.
|
|
1
|
+
export declare const version = "0.19.21-alpha.0";
|
|
2
2
|
export * from './core/base';
|
|
3
3
|
export * from './core/type';
|
|
4
4
|
export * from './scrollbar';
|
|
@@ -20,7 +20,6 @@ export * from './link-path';
|
|
|
20
20
|
export * from './player';
|
|
21
21
|
export * from './brush';
|
|
22
22
|
export * from './tooltip';
|
|
23
|
-
export * from './timeline';
|
|
24
23
|
export * from './interface';
|
|
25
24
|
export * from './jsx';
|
|
26
25
|
export * from './checkbox';
|
package/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const version = "0.19.
|
|
1
|
+
export const version = "0.19.21-alpha.0";
|
|
2
2
|
|
|
3
3
|
export * from "./core/base";
|
|
4
4
|
|
|
@@ -42,8 +42,6 @@ export * from "./brush";
|
|
|
42
42
|
|
|
43
43
|
export * from "./tooltip";
|
|
44
44
|
|
|
45
|
-
export * from "./timeline";
|
|
46
|
-
|
|
47
45
|
export * from "./interface";
|
|
48
46
|
|
|
49
47
|
export * from "./jsx";
|
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.19.21-alpha.0\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './util';\n"]}
|
package/es/label/arc.js
CHANGED
|
@@ -2,7 +2,7 @@ import { merge, isValidNumber, isNil, isLess, isGreater, isNumberClose as isClos
|
|
|
2
2
|
|
|
3
3
|
import { LabelBase } from "./base";
|
|
4
4
|
|
|
5
|
-
import { graphicCreator } from "@visactor/vrender-core";
|
|
5
|
+
import { graphicCreator, CustomPath2D } from "@visactor/vrender-core";
|
|
6
6
|
|
|
7
7
|
import { circlePoint, isQuadrantRight, isQuadrantLeft, lineCirclePoints, connectLineRadian, checkBoundsOverlap, computeQuadrant } from "./util";
|
|
8
8
|
|
|
@@ -419,7 +419,7 @@ export class ArcLabel extends LabelBase {
|
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
_createLabelLine(text, baseMark) {
|
|
422
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
422
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
423
423
|
const {points: points, line: line = {}, visible: visible, fill: fill} = text.attribute, labelLine = text.attribute.points ? graphicCreator.line({
|
|
424
424
|
visible: null === (_c = null !== (_a = line.visible && visible) && void 0 !== _a ? _a : null === (_b = text.attribute) || void 0 === _b ? void 0 : _b.visible) || void 0 === _c || _c,
|
|
425
425
|
stroke: null !== (_e = null === (_d = line.style) || void 0 === _d ? void 0 : _d.stroke) && void 0 !== _e ? _e : fill,
|
|
@@ -427,7 +427,14 @@ export class ArcLabel extends LabelBase {
|
|
|
427
427
|
points: points,
|
|
428
428
|
curveType: line.smooth ? "basis" : null
|
|
429
429
|
}) : void 0;
|
|
430
|
-
|
|
430
|
+
if (labelLine) {
|
|
431
|
+
if (null === (_h = line.style) || void 0 === _h ? void 0 : _h.customShape) {
|
|
432
|
+
const customShape = line.style.customShape;
|
|
433
|
+
labelLine.pathProxy = attrs => customShape(attrs, new CustomPath2D);
|
|
434
|
+
}
|
|
435
|
+
this._setStatesOfLabelLine(labelLine);
|
|
436
|
+
}
|
|
437
|
+
return labelLine;
|
|
431
438
|
}
|
|
432
439
|
computeRadius(r, width, height, k) {
|
|
433
440
|
return this.computeLayoutRadius(width || 0, height || 0) * r * (isNil(k) ? 1 : k);
|