@visactor/vchart 2.0.5-alpha.4 → 2.0.5
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/build/es5/index.js +1 -1
- package/build/index.es.js +91 -25
- package/build/index.js +92 -24
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/utils.js +1 -1
- package/cjs/animation/utils.js.map +1 -1
- package/cjs/component/geo/geo-coordinate.js +12 -7
- package/cjs/component/geo/geo-coordinate.js.map +1 -1
- package/cjs/component/marker/interface.d.ts +1 -0
- package/cjs/component/marker/interface.js.map +1 -1
- package/cjs/component/marker/mark-area/cartesian-mark-area.js +4 -4
- package/cjs/component/marker/mark-area/cartesian-mark-area.js.map +1 -1
- package/cjs/component/marker/utils.d.ts +1 -1
- package/cjs/component/marker/utils.js +45 -14
- package/cjs/component/marker/utils.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +11 -11
- package/cjs/index.js.map +1 -1
- package/cjs/layout/grid-layout/grid-layout.js +2 -0
- package/cjs/layout/grid-layout/grid-layout.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/utils/svg.js +8 -5
- package/cjs/plugin/components/tooltip-handler/utils/svg.js.map +1 -1
- package/cjs/region/interface.d.ts +2 -0
- package/cjs/region/interface.js.map +1 -1
- package/cjs/series/sankey/sankey.js +1 -1
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/esm/animation/utils.js +1 -1
- package/esm/animation/utils.js.map +1 -1
- package/esm/component/geo/geo-coordinate.js +12 -7
- package/esm/component/geo/geo-coordinate.js.map +1 -1
- package/esm/component/marker/interface.d.ts +1 -0
- package/esm/component/marker/interface.js.map +1 -1
- package/esm/component/marker/mark-area/cartesian-mark-area.js +4 -4
- package/esm/component/marker/mark-area/cartesian-mark-area.js.map +1 -1
- package/esm/component/marker/utils.d.ts +1 -1
- package/esm/component/marker/utils.js +45 -14
- package/esm/component/marker/utils.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -0
- package/esm/index.js.map +1 -1
- package/esm/layout/grid-layout/grid-layout.js +2 -0
- package/esm/layout/grid-layout/grid-layout.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/utils/svg.js +8 -6
- package/esm/plugin/components/tooltip-handler/utils/svg.js.map +1 -1
- package/esm/region/interface.d.ts +2 -0
- package/esm/region/interface.js.map +1 -1
- package/esm/series/sankey/sankey.js +1 -1
- package/esm/series/sankey/sankey.js.map +1 -1
- package/package.json +2 -2
package/build/index.es.js
CHANGED
|
@@ -58310,7 +58310,7 @@ const lookup = (data, opt) => {
|
|
|
58310
58310
|
});
|
|
58311
58311
|
};
|
|
58312
58312
|
|
|
58313
|
-
const version = "2.0.5
|
|
58313
|
+
const version = "2.0.5";
|
|
58314
58314
|
|
|
58315
58315
|
const addVChartProperty = (data, op) => {
|
|
58316
58316
|
const context = op.beforeCall();
|
|
@@ -59059,7 +59059,7 @@ function traverseSpec(spec, transform, excludeKeys = []) {
|
|
|
59059
59059
|
traverseSpec(spec[index], transform, excludeKeys);
|
|
59060
59060
|
});
|
|
59061
59061
|
}
|
|
59062
|
-
else if (isObject$2(spec)) {
|
|
59062
|
+
else if (isObject$2(spec) && typeof spec !== 'function') {
|
|
59063
59063
|
for (const key in spec) {
|
|
59064
59064
|
if (!excludeKeys.includes(key)) {
|
|
59065
59065
|
spec[key] = transform(spec[key], key);
|
|
@@ -70903,11 +70903,20 @@ class GeoCoordinate extends BaseComponent {
|
|
|
70903
70903
|
}
|
|
70904
70904
|
}
|
|
70905
70905
|
initEvent() {
|
|
70906
|
+
var _a, _b, _c;
|
|
70906
70907
|
this.event.on(ChartEvent.scaleUpdate, { filter: ({ model }) => (model === null || model === void 0 ? void 0 : model.id) === this.id }, this.effect.scaleUpdate.bind(this));
|
|
70907
70908
|
const { roam } = this._spec;
|
|
70908
70909
|
if (roam) {
|
|
70909
|
-
|
|
70910
|
-
|
|
70910
|
+
let zoom = true;
|
|
70911
|
+
let drag = true;
|
|
70912
|
+
let blank = false;
|
|
70913
|
+
if (roam !== true) {
|
|
70914
|
+
zoom = (_a = roam.zoom) !== null && _a !== void 0 ? _a : true;
|
|
70915
|
+
drag = (_b = roam.drag) !== null && _b !== void 0 ? _b : true;
|
|
70916
|
+
blank = (_c = roam.blank) !== null && _c !== void 0 ? _c : false;
|
|
70917
|
+
}
|
|
70918
|
+
zoom && this.initZoomEventOfRegions(this._regions, null, this._handleChartZoom);
|
|
70919
|
+
drag && this.initDragEventOfRegions(this._regions, blank ? null : () => true, this.pan);
|
|
70911
70920
|
this._regions.forEach(r => {
|
|
70912
70921
|
r.getSeries().forEach(s => {
|
|
70913
70922
|
s.event.on('zoom', e => {
|
|
@@ -84996,7 +85005,7 @@ class SankeySeries extends CartesianSeries {
|
|
|
84996
85005
|
}
|
|
84997
85006
|
if (!colorDomain || isNil$1(colorDomain[0])) {
|
|
84998
85007
|
colorDomain = this.getNodeList();
|
|
84999
|
-
if (colorDomain.length > 10) {
|
|
85008
|
+
if (colorDomain && colorDomain.length > 10) {
|
|
85000
85009
|
colorRange = (_c = this._getDataScheme()[1]) === null || _c === void 0 ? void 0 : _c.scheme;
|
|
85001
85010
|
}
|
|
85002
85011
|
}
|
|
@@ -94556,7 +94565,7 @@ function convertDatumToValue(axisHelper, datum) {
|
|
|
94556
94565
|
function isAggrSpec(spec) {
|
|
94557
94566
|
return AGGR_TYPE.includes(spec);
|
|
94558
94567
|
}
|
|
94559
|
-
function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
|
|
94568
|
+
function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = false) {
|
|
94560
94569
|
const regionStart = startRelativeSeries.getRegion();
|
|
94561
94570
|
const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
|
|
94562
94571
|
const regionEnd = endRelativeSeries.getRegion();
|
|
@@ -94572,20 +94581,31 @@ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries,
|
|
|
94572
94581
|
};
|
|
94573
94582
|
const lines = [];
|
|
94574
94583
|
const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
|
|
94575
|
-
const
|
|
94576
|
-
const
|
|
94584
|
+
const xAxisHelper = relativeSeries.getXAxisHelper();
|
|
94585
|
+
const yAxisHelper = relativeSeries.getXAxisHelper();
|
|
94586
|
+
const xDomain = xAxisHelper.getScale(0).domain();
|
|
94587
|
+
const yDomain = yAxisHelper.getScale(0).domain();
|
|
94588
|
+
const isXExpand = includeFullBand && !xAxisHelper.isContinuous && !!xAxisHelper.getBandwidth;
|
|
94589
|
+
const isyExpand = includeFullBand && !yAxisHelper.isContinuous && !!yAxisHelper.getBandwidth;
|
|
94590
|
+
const xTemp = { min: null, max: null };
|
|
94591
|
+
const yTemp = { min: null, max: null };
|
|
94577
94592
|
dataPoints.forEach((datum) => {
|
|
94578
94593
|
const isValidX = isValid$1(datum.x);
|
|
94579
94594
|
const isValidY = isValid$1(datum.y);
|
|
94595
|
+
let x;
|
|
94596
|
+
let y;
|
|
94580
94597
|
if (isValidX && isValidY) {
|
|
94581
|
-
|
|
94582
|
-
|
|
94598
|
+
x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
|
|
94599
|
+
y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
|
|
94600
|
+
setTempWithValid(x, isXExpand, xTemp, lines.length);
|
|
94601
|
+
setTempWithValid(y, isyExpand, yTemp, lines.length);
|
|
94583
94602
|
lines.push([{ x, y }]);
|
|
94584
94603
|
}
|
|
94585
94604
|
else if (isValidX) {
|
|
94586
|
-
|
|
94587
|
-
|
|
94605
|
+
x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
|
|
94606
|
+
y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
|
|
94588
94607
|
const y1 = Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y);
|
|
94608
|
+
setTempWithValid(x, isXExpand, xTemp, lines.length);
|
|
94589
94609
|
lines.push([
|
|
94590
94610
|
{
|
|
94591
94611
|
x: x,
|
|
@@ -94598,9 +94618,10 @@ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries,
|
|
|
94598
94618
|
]);
|
|
94599
94619
|
}
|
|
94600
94620
|
else if (isValidY) {
|
|
94601
|
-
|
|
94602
|
-
|
|
94621
|
+
x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x);
|
|
94622
|
+
y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
|
|
94603
94623
|
const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width);
|
|
94624
|
+
setTempWithValid(y, isyExpand, yTemp, lines.length);
|
|
94604
94625
|
lines.push([
|
|
94605
94626
|
{
|
|
94606
94627
|
x: x,
|
|
@@ -94613,8 +94634,46 @@ function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries,
|
|
|
94613
94634
|
]);
|
|
94614
94635
|
}
|
|
94615
94636
|
});
|
|
94637
|
+
setTempToLines(lines, xAxisHelper, yAxisHelper, xTemp, yTemp);
|
|
94616
94638
|
return lines;
|
|
94617
94639
|
}
|
|
94640
|
+
function setTempToLines(lines, xAxisHelper, yAxisHelper, xTemp, yTemp) {
|
|
94641
|
+
if (xTemp.min || xTemp.max) {
|
|
94642
|
+
const xBandSize = xAxisHelper.getBandwidth(0) * (1 + xAxisHelper.getScale(0).paddingInner());
|
|
94643
|
+
if (xTemp.min) {
|
|
94644
|
+
lines[xTemp.min.index].forEach(p => (p.x -= xBandSize / 2));
|
|
94645
|
+
}
|
|
94646
|
+
if (xTemp.max) {
|
|
94647
|
+
lines[xTemp.max.index].forEach(p => (p.x += xBandSize / 2));
|
|
94648
|
+
}
|
|
94649
|
+
}
|
|
94650
|
+
if (yTemp.min || yTemp.max) {
|
|
94651
|
+
const yBandSize = yAxisHelper.getBandwidth(0) * (1 + yAxisHelper.getScale(0).paddingInner());
|
|
94652
|
+
if (yTemp.min) {
|
|
94653
|
+
lines[yTemp.min.index].forEach(p => (p.y -= yBandSize / 2));
|
|
94654
|
+
}
|
|
94655
|
+
if (yTemp.max) {
|
|
94656
|
+
lines[yTemp.max.index].forEach(p => (p.y += yBandSize / 2));
|
|
94657
|
+
}
|
|
94658
|
+
}
|
|
94659
|
+
}
|
|
94660
|
+
function setTempWithValid(v, isExpand, temp, index) {
|
|
94661
|
+
if (isExpand) {
|
|
94662
|
+
if (temp.min === null || temp.min.value > v) {
|
|
94663
|
+
temp.min = {
|
|
94664
|
+
value: v,
|
|
94665
|
+
index
|
|
94666
|
+
};
|
|
94667
|
+
}
|
|
94668
|
+
if (temp.max === null || temp.max.value < v) {
|
|
94669
|
+
temp.max = {
|
|
94670
|
+
value: v,
|
|
94671
|
+
index
|
|
94672
|
+
};
|
|
94673
|
+
}
|
|
94674
|
+
}
|
|
94675
|
+
return v;
|
|
94676
|
+
}
|
|
94618
94677
|
function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
|
|
94619
94678
|
const refSeries = {
|
|
94620
94679
|
relativeSeries,
|
|
@@ -96245,7 +96304,7 @@ class CartesianMarkArea extends BaseMarkArea {
|
|
|
96245
96304
|
return new MarkArea(attr);
|
|
96246
96305
|
}
|
|
96247
96306
|
_computePointsAttr() {
|
|
96248
|
-
var _a;
|
|
96307
|
+
var _a, _b;
|
|
96249
96308
|
const spec = this._spec;
|
|
96250
96309
|
const data = this._markerData;
|
|
96251
96310
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -96254,10 +96313,11 @@ class CartesianMarkArea extends BaseMarkArea {
|
|
|
96254
96313
|
const { doXProcess, doYProcess, doXYProcess, doCoordinatesProcess } = getMarkAreaProcessInfo(spec);
|
|
96255
96314
|
const isPositionLayout = isValid$1(spec.positions);
|
|
96256
96315
|
const autoRange = (_a = spec.autoRange) !== null && _a !== void 0 ? _a : false;
|
|
96316
|
+
const includeFullBand = (_b = spec.includeFullBand) !== null && _b !== void 0 ? _b : false;
|
|
96257
96317
|
let points = [];
|
|
96258
96318
|
let lines = [];
|
|
96259
96319
|
if (doXYProcess) {
|
|
96260
|
-
lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
|
|
96320
|
+
lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
|
|
96261
96321
|
const [start, end] = lines;
|
|
96262
96322
|
if (start && start.length && end && end.length) {
|
|
96263
96323
|
points = [
|
|
@@ -96275,7 +96335,7 @@ class CartesianMarkArea extends BaseMarkArea {
|
|
|
96275
96335
|
}
|
|
96276
96336
|
}
|
|
96277
96337
|
else if (doXProcess || doYProcess) {
|
|
96278
|
-
lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
|
|
96338
|
+
lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
|
|
96279
96339
|
const [start, end] = lines;
|
|
96280
96340
|
if (start && start.length && end && end.length) {
|
|
96281
96341
|
points = [...start, end[1], end[0]];
|
|
@@ -98618,6 +98678,10 @@ class GridLayout {
|
|
|
98618
98678
|
});
|
|
98619
98679
|
}
|
|
98620
98680
|
clearLayoutSize() {
|
|
98681
|
+
this._gridInfo.colWidth &&
|
|
98682
|
+
this.setSizeFromUserSetting(this._gridInfo.colWidth, this._colSize, this._col, this._chartLayoutRect.width);
|
|
98683
|
+
this._gridInfo.rowHeight &&
|
|
98684
|
+
this.setSizeFromUserSetting(this._gridInfo.rowHeight, this._rowSize, this._row, this._chartLayoutRect.height);
|
|
98621
98685
|
this._colSize.forEach(c => {
|
|
98622
98686
|
c.isLayoutSetting = false;
|
|
98623
98687
|
if (!c.isUserSetting) {
|
|
@@ -99392,7 +99456,7 @@ function getSvgHtml(option, gradientId) {
|
|
|
99392
99456
|
return '';
|
|
99393
99457
|
}
|
|
99394
99458
|
const styleString = `style="display:inline-block;vertical-align:middle;"`;
|
|
99395
|
-
const { shapeType,
|
|
99459
|
+
const { shapeType, shapeStroke, shapeHollow = false, shapeFill } = option;
|
|
99396
99460
|
const size = (_a = option.shapeSize) !== null && _a !== void 0 ? _a : 8;
|
|
99397
99461
|
const lineWidth = option.shapeLineWidth ? escapeHTML(option.shapeLineWidth) + 'px' : '0px';
|
|
99398
99462
|
let fillString = 'currentColor';
|
|
@@ -99421,7 +99485,8 @@ function getSvgHtml(option, gradientId) {
|
|
|
99421
99485
|
const lw = Number(lineWidth.slice(0, -2));
|
|
99422
99486
|
viewBox = `${x - lw / 2} ${y - lw / 2} ${w + lw} ${h + lw}`;
|
|
99423
99487
|
}
|
|
99424
|
-
|
|
99488
|
+
const isFillGradientStr = GradientParser.IsGradientStr(shapeFill);
|
|
99489
|
+
if (!shapeFill || (isString$1(shapeFill) && !isFillGradientStr) || shapeHollow) {
|
|
99425
99490
|
fillString = shapeHollow ? 'none' : shapeFill ? escapeHTML(shapeFill) : 'currentColor';
|
|
99426
99491
|
return `
|
|
99427
99492
|
<svg ${styleString} width="${size}" height="${size}" viewBox="${viewBox}">
|
|
@@ -99432,19 +99497,20 @@ function getSvgHtml(option, gradientId) {
|
|
|
99432
99497
|
</path>
|
|
99433
99498
|
</svg>`;
|
|
99434
99499
|
}
|
|
99435
|
-
|
|
99500
|
+
const shapeFillObject = isFillGradientStr ? GradientParser.Parse(shapeFill) : isObject$2(shapeFill) ? shapeFill : null;
|
|
99501
|
+
if (shapeFillObject) {
|
|
99436
99502
|
fillString = 'gradientColor' + (gradientId !== null && gradientId !== void 0 ? gradientId : '');
|
|
99437
99503
|
let gradient = '';
|
|
99438
|
-
const stops = ((_b =
|
|
99504
|
+
const stops = ((_b = shapeFillObject.stops) !== null && _b !== void 0 ? _b : [])
|
|
99439
99505
|
.map(s => `<stop offset="${escapeHTML(s.offset.toString())}" stop-color="${escapeHTML(s.color)}"/>`)
|
|
99440
99506
|
.join('');
|
|
99441
|
-
if (
|
|
99507
|
+
if (shapeFillObject.gradient === 'radial') {
|
|
99442
99508
|
gradient = `<radialGradient id="${fillString}" cx="50%" cy="50%" r="50%" fx="0%" fy="0%">
|
|
99443
99509
|
${stops}
|
|
99444
99510
|
</radialGradient>`;
|
|
99445
99511
|
}
|
|
99446
|
-
else if (
|
|
99447
|
-
gradient = `<linearGradient id="${fillString}" x1="${((_c =
|
|
99512
|
+
else if (shapeFillObject.gradient === 'linear') {
|
|
99513
|
+
gradient = `<linearGradient id="${fillString}" x1="${((_c = shapeFillObject.x0) !== null && _c !== void 0 ? _c : 0) * 100}%" y1="${((_d = shapeFillObject.y0) !== null && _d !== void 0 ? _d : 0) * 100}%" x2="${((_e = shapeFillObject.x1) !== null && _e !== void 0 ? _e : 0) * 100}%" y2="${((_f = shapeFillObject.y1) !== null && _f !== void 0 ? _f : 0) * 100}%">
|
|
99448
99514
|
${stops}
|
|
99449
99515
|
</linearGradient>`;
|
|
99450
99516
|
}
|
|
@@ -101651,4 +101717,4 @@ function registerSequentialAnimate() {
|
|
|
101651
101717
|
mixin(BaseMark, SequentialAnimate);
|
|
101652
101718
|
}
|
|
101653
101719
|
|
|
101654
|
-
export { ArcMark, AreaChart, AreaMark, AreaSeries, AttributeLevel, AxisSyncPlugin, BandAxisMixin, BarChart, BarChartSpecTransformer, BarSeries, BarSeriesSpecTransformer, BaseArcMark, BaseChart, BaseChartSpecTransformer, BaseComponent, BaseComponentSpecTransformer, BaseHistogramChart, BaseMark, BasePieChart, BasePieChartSpecTransformer, BasePieSeries, BasePlugin, BasePolygonMark, BaseSeries, BaseSeriesSpecTransformer, BaseSeriesTooltipHelper, BaseWordCloudChart, BaseWordCloudChartSpecTransformer, BaseWordCloudSeries, BoxPlotChart, BoxPlotSeries, Brush, CanvasTooltipHandler, CartesianAxis, CartesianBandAxis, CartesianChartSpecTransformer, CartesianCrossHair, CartesianLinearAxis, CartesianLogAxis, CartesianMarkArea, CartesianMarkLine, CartesianMarkPoint, CartesianSeries, CartesianSymlogAxis, CartesianTimeAxis, ChartEvent, CirclePackingChart, CirclePackingSeries, CircularProgressChart, CircularProgressSeries, CommonChart, CommonChartSpecTransformer, CompilableData, ComponentMark, ContinuousLegend, CorrelationChart, CorrelationSeries, CustomMark, DEFAULT_ANIMATION_CONFIG, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CLOSE_STROKE_JOIN, DEFAULT_DATA_INDEX, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD, DEFAULT_KEY, DEFAULT_LAYOUT_RECT_LEVEL, DEFAULT_LAYOUT_RECT_LEVEL_MIN, DEFAULT_LINEAR_INTERPOLATE, DEFAULT_MEASURE_CANVAS_ID, DEFAULT_SERIES_STYLE_NAME, DEFAULT_SMOOTH_INTERPOLATE, DataZoom, DimensionClickEvent, DimensionEventEnum, DimensionHoverEvent, Direction, DiscreteLegend, DomTooltipHandler, DotSeries, ElementHighlight, ElementSelect, Event$1 as Event, Factory, FormatterPlugin, FunnelChart, FunnelChartSpecTransformer, FunnelSeries, FunnelSeriesSpecTransformer, GaugeChart, GaugePointerSeries, GaugeSeries, GeoCoordinate, GeoMarkPoint, GeoSeries, GlyphMark, GridLayout, GroupMark, HeatmapChart, HeatmapSeries, HistogramChart, HistogramChartSpecTransformer, ImageMark, Indicator, Label, Layout$1 as Layout, LayoutLevel, LayoutZIndex, LineChart, LineMark, LineSeries, LinearAxisMixin, LinearProgressChart, LinearProgressSeries, LinkSeries, LiquidChart, LiquidSeries, MOSAIC_CAT_END_PERCENT, MOSAIC_CAT_START_PERCENT, MOSAIC_VALUE_END_PERCENT, MOSAIC_VALUE_START_PERCENT, ManualTicker, MapChart, MapSeries, MarkTypeEnum, MediaQuery, MosaicChart, MosaicSeries, PREFIX, PathMark, PieChart, PieSeries, PieSeriesSpecTransformer, Player, PolarAxis, PolarBandAxis, PolarCrossHair, PolarLinearAxis, PolarMarkArea, PolarMarkLine, PolarMarkPoint, PolarSeries, PolygonMark, PositionEnum, ProgressLikeSeries, RadarChart, RadarSeries, RangeAreaChart, RangeAreaSeries, RangeColumnChart, RangeColumnSeries, RangeColumnSeriesSpecTransformer, RectMark, RenderModeEnum, RippleMark, RoseChart, RoseLikeSeries, RoseSeries, RuleMark, SEGMENT_FIELD_END, SEGMENT_FIELD_START, STACK_FIELD_END, STACK_FIELD_END_OffsetSilhouette, STACK_FIELD_END_PERCENT, STACK_FIELD_KEY, STACK_FIELD_START, STACK_FIELD_START_OffsetSilhouette, STACK_FIELD_START_PERCENT, STACK_FIELD_TOTAL, STACK_FIELD_TOTAL_BOTTOM, STACK_FIELD_TOTAL_PERCENT, STACK_FIELD_TOTAL_TOP, STATE_VALUE_ENUM, SankeyChart, SankeySeries, ScatterChart, ScatterSeries, ScrollBar, SequenceChart, SeriesMarkNameEnum, SeriesTypeEnum, SeriesTypeForThemeEnum, StreamLight, SunburstChart, SunburstSeries, SymbolMark, TextMark, ThemeManager, Title, Tooltip, TooltipResult, TotalLabel, TransformLevel, TreemapChart, TreemapSeries, USER_LAYOUT_RECT_LEVEL, VChart, VennChart, VennSeries, WaterfallChart, WaterfallSeries, WordCloudChart, WordCloudSeries, alternatingWave, animationConfig, barGrowIn, barGrowOut, barPresetAnimation, baseSeriesMark, boundsInRect, builtinThemes, calcLayoutNumber, calcPadding, centerToCorner, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeActualDataScheme, convertPoint, cornerToCenter, createArc, createArea, createGroup, createLine, createRect, createRichText, createScale, createScaleWithSpec, createSymbol, createText, darkTheme, dataScheme, VChart as default, defaultThemeName, diagonalCenterToEdge, diagonalTopLeftToBottomRight, findMarkGraphic, functionTransform, getActualColor, getActualNumValue, getCartesianCrosshairRect, getCartesianDimensionInfo, getColorSchemeBySeries, getCombinedSizeOfRegions, getDataScheme, getDatumOfGraphic, getDiffAttributesOfGraphic, getDimensionInfoByValue, getFieldAlias, getFunnelTheme, getGroupAnimationParams, getMergedTheme, getPolarDimensionInfo, getRegionStackGroup, getSpecInfo, getTheme, hasThemeMerged, isCollectionMark, isColorKey, isPercent, isPercentOffset, isPolarAxisSeries, isProgressiveDataColorScheme, isSpecValueWithScale, isTokenKey, isValidOrient, isValueInScaleDomain, isXAxis, isYAxis, isZAxis, lightTheme, lookup, measureText, mergeFields, normalizeLayoutPaddingSpec, particleEffect, pieDisappear, pieEnter, pieExit, piePresetAnimation, pulseWave, queryColorFromColorScheme, queryToken, randomOpacity, registerAllEnv, registerAllMarks, registerAnimate, registerArcAnimation, registerArcMark, registerAreaChart, registerAreaMark, registerAreaSeries, registerBarChart, registerBarSeries, registerBoxplotChart, registerBoxplotSeries, registerBrowserEnv, registerBrush, registerCanvasTooltipHandler, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerChartPlugin, registerCirclePackingChart, registerCirclePackingSeries, registerCircularProgressChart, registerCircularProgressSeries, registerCommonChart, registerComponentMark, registerContinuousLegend, registerCorrelationChart, registerCustomAnimate, registerCustomMark, registerDataSetInstanceParser, registerDataSetInstanceTransform, registerDataZoom, registerDimensionEvents, registerDimensionHover, registerDimensionTooltipProcessor, registerDiscreteLegend, registerDomTooltipHandler, registerDotSeries, registerDragPlugin, registerElementActive, registerElementActiveByLegend, registerElementHighlight, registerElementHighlightByGroup, registerElementHighlightByKey, registerElementHighlightByLegend, registerElementHighlightByName, registerElementSelect, registerFormatPlugin, registerFunnelChart, registerFunnelSeries, registerGaugeChart, registerGaugePointerSeries, registerGaugeSeries, registerGeoCoordinate, registerGeoMarkPoint, registerGesturePlugin, registerGlyphMark, registerGridLayout, registerGroupMark, registerGroupTooltipProcessor, registerHarmonyEnv, registerHeatmapChart, registerHeatmapSeries, registerHistogramChart, registerHtmlAttributePlugin, registerImageMark, registerIndicator, registerLabel, registerLarkEnv, registerLineChart, registerLineMark, registerLineSeries, registerLinearProgressChart, registerLinearProgressSeries, registerLinkSeries, registerLiquidChart, registerLiquidSeries, registerLynxEnv, registerMapChart, registerMapSeries, registerMarkArea, registerMarkFilterTransform, registerMarkLine, registerMarkMapTransform, registerMarkPoint, registerMarkTooltipProcessor, registerMediaQuery, registerMosaicChart, registerMosaicSeries, registerNodeEnv, registerPathMark, registerPieChart, registerPieSeries, registerPlayer, registerPolarBandAxis, registerPolarCrossHair, registerPolarLinearAxis, registerPolarMarkArea, registerPolarMarkLine, registerPolarMarkPoint, registerPolygonAnimation, registerPolygonMark, registerPoptip, registerRadarChart, registerRadarSeries, registerRangeAreaChart, registerRangeAreaSeries, registerRangeColumnChart, registerRangeColumnSeries, registerReactAttributePlugin, registerRectAnimation, registerRectMark, registerRippleMark, registerRoseChart, registerRoseSeries, registerRuleMark, registerSankeyChart, registerSankeySeries, registerScaleInOutAnimation, registerScatterChart, registerScatterSeries, registerScrollBar, registerSequenceChart, registerSequentialAnimate, registerStateTransition, registerSunBurstSeries, registerSunburstChart, registerSymbolMark, registerTTEnv, registerTaroEnv, registerTextMark, registerTheme, registerTitle, registerTooltip, registerTotalLabel, registerTreemapChart, registerTreemapSeries, registerAnimate$1 as registerVRenderAnimate, registerVennChart, registerVennSeries, registerWXEnv, registerWaterfallChart, registerWaterfallSeries, registerWordCloudChart, registerWordCloudSeries, registerWordCloudShapeChart, removeTheme, rippleEffect, rotationScan, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, setDefaultCrosshairForCartesianChart, shouldMarkDoMorph, snakeWave, sortDataInAxisHelper, sortStackValueGroup, specTransform, spiralEffect, stack, stackGroup, stackMosaic, stackMosaicTotal, stackOffsetSilhouette, stackTotal, themeExist, themes, token, transformColorSchemeToStandardStruct, transformToGraphic, userAnimationConfig, valueInScaleRange, version, vglobal, warn };
|
|
101720
|
+
export { ArcMark, AreaChart, AreaMark, AreaSeries, AttributeLevel, AxisSyncPlugin, BandAxisMixin, BarChart, BarChartSpecTransformer, BarSeries, BarSeriesSpecTransformer, BaseArcMark, BaseChart, BaseChartSpecTransformer, BaseComponent, BaseComponentSpecTransformer, BaseHistogramChart, BaseMark, BasePieChart, BasePieChartSpecTransformer, BasePieSeries, BasePlugin, BasePolygonMark, BaseSeries, BaseSeriesSpecTransformer, BaseSeriesTooltipHelper, BaseWordCloudChart, BaseWordCloudChartSpecTransformer, BaseWordCloudSeries, BoxPlotChart, BoxPlotSeries, Brush, CanvasTooltipHandler, CartesianAxis, CartesianBandAxis, CartesianChartSpecTransformer, CartesianCrossHair, CartesianLinearAxis, CartesianLogAxis, CartesianMarkArea, CartesianMarkLine, CartesianMarkPoint, CartesianSeries, CartesianSymlogAxis, CartesianTimeAxis, ChartEvent, CirclePackingChart, CirclePackingSeries, CircularProgressChart, CircularProgressSeries, CommonChart, CommonChartSpecTransformer, CompilableData, ComponentMark, ContinuousLegend, CorrelationChart, CorrelationSeries, CustomMark, DEFAULT_ANIMATION_CONFIG, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CLOSE_STROKE_JOIN, DEFAULT_DATA_INDEX, DEFAULT_DATA_KEY, DEFAULT_DATA_SERIES_FIELD, DEFAULT_KEY, DEFAULT_LAYOUT_RECT_LEVEL, DEFAULT_LAYOUT_RECT_LEVEL_MIN, DEFAULT_LINEAR_INTERPOLATE, DEFAULT_MEASURE_CANVAS_ID, DEFAULT_SERIES_STYLE_NAME, DEFAULT_SMOOTH_INTERPOLATE, DataZoom, DimensionClickEvent, DimensionEventEnum, DimensionHoverEvent, Direction, DiscreteLegend, DomTooltipHandler, DotSeries, ElementHighlight, ElementSelect, Event$1 as Event, Factory, FormatterPlugin, FunnelChart, FunnelChartSpecTransformer, FunnelSeries, FunnelSeriesSpecTransformer, GaugeChart, GaugePointerSeries, GaugeSeries, GeoCoordinate, GeoMarkPoint, GeoSeries, GlyphMark, GridLayout, GroupMark, HeatmapChart, HeatmapSeries, HistogramChart, HistogramChartSpecTransformer, ImageMark, Indicator, Label, Layout$1 as Layout, LayoutLevel, LayoutZIndex, LineChart, LineMark, LineSeries, LinearAxisMixin, LinearProgressChart, LinearProgressSeries, LinkSeries, LiquidChart, LiquidSeries, MOSAIC_CAT_END_PERCENT, MOSAIC_CAT_START_PERCENT, MOSAIC_VALUE_END_PERCENT, MOSAIC_VALUE_START_PERCENT, ManualTicker, MapChart, MapSeries, MarkTypeEnum, MediaQuery, MosaicChart, MosaicSeries, PREFIX, PathMark, PieChart, PieSeries, PieSeriesSpecTransformer, Player, PolarAxis, PolarBandAxis, PolarCrossHair, PolarLinearAxis, PolarMarkArea, PolarMarkLine, PolarMarkPoint, PolarSeries, PolygonMark, PositionEnum, ProgressLikeSeries, RadarChart, RadarSeries, RangeAreaChart, RangeAreaSeries, RangeColumnChart, RangeColumnSeries, RangeColumnSeriesSpecTransformer, RectMark, RenderModeEnum, RippleMark, RoseChart, RoseLikeSeries, RoseSeries, RuleMark, SEGMENT_FIELD_END, SEGMENT_FIELD_START, STACK_FIELD_END, STACK_FIELD_END_OffsetSilhouette, STACK_FIELD_END_PERCENT, STACK_FIELD_KEY, STACK_FIELD_START, STACK_FIELD_START_OffsetSilhouette, STACK_FIELD_START_PERCENT, STACK_FIELD_TOTAL, STACK_FIELD_TOTAL_BOTTOM, STACK_FIELD_TOTAL_PERCENT, STACK_FIELD_TOTAL_TOP, STATE_VALUE_ENUM, SankeyChart, SankeySeries, ScatterChart, ScatterSeries, ScrollBar, SequenceChart, SeriesMarkNameEnum, SeriesTypeEnum, SeriesTypeForThemeEnum, Stack, StackChartMixin, StreamLight, SunburstChart, SunburstSeries, SymbolMark, TextMark, ThemeManager, Title, Tooltip, TooltipResult, TotalLabel, TransformLevel, TreemapChart, TreemapSeries, USER_LAYOUT_RECT_LEVEL, VChart, VennChart, VennSeries, WaterfallChart, WaterfallSeries, WordCloudChart, WordCloudSeries, alternatingWave, animationConfig, barGrowIn, barGrowOut, barPresetAnimation, baseSeriesMark, boundsInRect, builtinThemes, calcLayoutNumber, calcPadding, centerToCorner, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeActualDataScheme, convertPoint, cornerToCenter, createArc, createArea, createGroup, createLine, createRect, createRichText, createScale, createScaleWithSpec, createSymbol, createText, darkTheme, dataScheme, VChart as default, defaultThemeName, diagonalCenterToEdge, diagonalTopLeftToBottomRight, findMarkGraphic, functionTransform, getActualColor, getActualNumValue, getCartesianCrosshairRect, getCartesianDimensionInfo, getColorSchemeBySeries, getCombinedSizeOfRegions, getDataScheme, getDatumOfGraphic, getDiffAttributesOfGraphic, getDimensionInfoByValue, getFieldAlias, getFunnelTheme, getGroupAnimationParams, getMergedTheme, getPolarDimensionInfo, getRegionStackGroup, getSpecInfo, getTheme, hasThemeMerged, isCollectionMark, isColorKey, isPercent, isPercentOffset, isPolarAxisSeries, isProgressiveDataColorScheme, isSpecValueWithScale, isTokenKey, isValidOrient, isValueInScaleDomain, isXAxis, isYAxis, isZAxis, lightTheme, lookup, measureText, mergeFields, normalizeLayoutPaddingSpec, particleEffect, pieDisappear, pieEnter, pieExit, piePresetAnimation, pulseWave, queryColorFromColorScheme, queryToken, randomOpacity, registerAllEnv, registerAllMarks, registerAnimate, registerArcAnimation, registerArcMark, registerAreaChart, registerAreaMark, registerAreaSeries, registerBarChart, registerBarSeries, registerBoxplotChart, registerBoxplotSeries, registerBrowserEnv, registerBrush, registerCanvasTooltipHandler, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerChartPlugin, registerCirclePackingChart, registerCirclePackingSeries, registerCircularProgressChart, registerCircularProgressSeries, registerCommonChart, registerComponentMark, registerContinuousLegend, registerCorrelationChart, registerCustomAnimate, registerCustomMark, registerDataSetInstanceParser, registerDataSetInstanceTransform, registerDataZoom, registerDimensionEvents, registerDimensionHover, registerDimensionTooltipProcessor, registerDiscreteLegend, registerDomTooltipHandler, registerDotSeries, registerDragPlugin, registerElementActive, registerElementActiveByLegend, registerElementHighlight, registerElementHighlightByGroup, registerElementHighlightByKey, registerElementHighlightByLegend, registerElementHighlightByName, registerElementSelect, registerFormatPlugin, registerFunnelChart, registerFunnelSeries, registerGaugeChart, registerGaugePointerSeries, registerGaugeSeries, registerGeoCoordinate, registerGeoMarkPoint, registerGesturePlugin, registerGlyphMark, registerGridLayout, registerGroupMark, registerGroupTooltipProcessor, registerHarmonyEnv, registerHeatmapChart, registerHeatmapSeries, registerHistogramChart, registerHtmlAttributePlugin, registerImageMark, registerIndicator, registerLabel, registerLarkEnv, registerLineChart, registerLineMark, registerLineSeries, registerLinearProgressChart, registerLinearProgressSeries, registerLinkSeries, registerLiquidChart, registerLiquidSeries, registerLynxEnv, registerMapChart, registerMapSeries, registerMarkArea, registerMarkFilterTransform, registerMarkLine, registerMarkMapTransform, registerMarkPoint, registerMarkTooltipProcessor, registerMediaQuery, registerMosaicChart, registerMosaicSeries, registerNodeEnv, registerPathMark, registerPieChart, registerPieSeries, registerPlayer, registerPolarBandAxis, registerPolarCrossHair, registerPolarLinearAxis, registerPolarMarkArea, registerPolarMarkLine, registerPolarMarkPoint, registerPolygonAnimation, registerPolygonMark, registerPoptip, registerRadarChart, registerRadarSeries, registerRangeAreaChart, registerRangeAreaSeries, registerRangeColumnChart, registerRangeColumnSeries, registerReactAttributePlugin, registerRectAnimation, registerRectMark, registerRippleMark, registerRoseChart, registerRoseSeries, registerRuleMark, registerSankeyChart, registerSankeySeries, registerScaleInOutAnimation, registerScatterChart, registerScatterSeries, registerScrollBar, registerSequenceChart, registerSequentialAnimate, registerStateTransition, registerSunBurstSeries, registerSunburstChart, registerSymbolMark, registerTTEnv, registerTaroEnv, registerTextMark, registerTheme, registerTitle, registerTooltip, registerTotalLabel, registerTreemapChart, registerTreemapSeries, registerAnimate$1 as registerVRenderAnimate, registerVennChart, registerVennSeries, registerWXEnv, registerWaterfallChart, registerWaterfallSeries, registerWordCloudChart, registerWordCloudSeries, registerWordCloudShapeChart, removeTheme, rippleEffect, rotationScan, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, setDefaultCrosshairForCartesianChart, shouldMarkDoMorph, snakeWave, sortDataInAxisHelper, sortStackValueGroup, specTransform, spiralEffect, stack, stackGroup, stackMosaic, stackMosaicTotal, stackOffsetSilhouette, stackTotal, themeExist, themes, token, transformColorSchemeToStandardStruct, transformToGraphic, userAnimationConfig, valueInScaleRange, version, vglobal, warn };
|
package/build/index.js
CHANGED
|
@@ -58316,7 +58316,7 @@
|
|
|
58316
58316
|
});
|
|
58317
58317
|
};
|
|
58318
58318
|
|
|
58319
|
-
const version = "2.0.5
|
|
58319
|
+
const version = "2.0.5";
|
|
58320
58320
|
|
|
58321
58321
|
const addVChartProperty = (data, op) => {
|
|
58322
58322
|
const context = op.beforeCall();
|
|
@@ -59065,7 +59065,7 @@
|
|
|
59065
59065
|
traverseSpec(spec[index], transform, excludeKeys);
|
|
59066
59066
|
});
|
|
59067
59067
|
}
|
|
59068
|
-
else if (isObject$2(spec)) {
|
|
59068
|
+
else if (isObject$2(spec) && typeof spec !== 'function') {
|
|
59069
59069
|
for (const key in spec) {
|
|
59070
59070
|
if (!excludeKeys.includes(key)) {
|
|
59071
59071
|
spec[key] = transform(spec[key], key);
|
|
@@ -70909,11 +70909,20 @@
|
|
|
70909
70909
|
}
|
|
70910
70910
|
}
|
|
70911
70911
|
initEvent() {
|
|
70912
|
+
var _a, _b, _c;
|
|
70912
70913
|
this.event.on(exports.ChartEvent.scaleUpdate, { filter: ({ model }) => (model === null || model === void 0 ? void 0 : model.id) === this.id }, this.effect.scaleUpdate.bind(this));
|
|
70913
70914
|
const { roam } = this._spec;
|
|
70914
70915
|
if (roam) {
|
|
70915
|
-
|
|
70916
|
-
|
|
70916
|
+
let zoom = true;
|
|
70917
|
+
let drag = true;
|
|
70918
|
+
let blank = false;
|
|
70919
|
+
if (roam !== true) {
|
|
70920
|
+
zoom = (_a = roam.zoom) !== null && _a !== void 0 ? _a : true;
|
|
70921
|
+
drag = (_b = roam.drag) !== null && _b !== void 0 ? _b : true;
|
|
70922
|
+
blank = (_c = roam.blank) !== null && _c !== void 0 ? _c : false;
|
|
70923
|
+
}
|
|
70924
|
+
zoom && this.initZoomEventOfRegions(this._regions, null, this._handleChartZoom);
|
|
70925
|
+
drag && this.initDragEventOfRegions(this._regions, blank ? null : () => true, this.pan);
|
|
70917
70926
|
this._regions.forEach(r => {
|
|
70918
70927
|
r.getSeries().forEach(s => {
|
|
70919
70928
|
s.event.on('zoom', e => {
|
|
@@ -85002,7 +85011,7 @@
|
|
|
85002
85011
|
}
|
|
85003
85012
|
if (!colorDomain || isNil$1(colorDomain[0])) {
|
|
85004
85013
|
colorDomain = this.getNodeList();
|
|
85005
|
-
if (colorDomain.length > 10) {
|
|
85014
|
+
if (colorDomain && colorDomain.length > 10) {
|
|
85006
85015
|
colorRange = (_c = this._getDataScheme()[1]) === null || _c === void 0 ? void 0 : _c.scheme;
|
|
85007
85016
|
}
|
|
85008
85017
|
}
|
|
@@ -94562,7 +94571,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
94562
94571
|
function isAggrSpec(spec) {
|
|
94563
94572
|
return AGGR_TYPE.includes(spec);
|
|
94564
94573
|
}
|
|
94565
|
-
function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
|
|
94574
|
+
function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand = false) {
|
|
94566
94575
|
const regionStart = startRelativeSeries.getRegion();
|
|
94567
94576
|
const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
|
|
94568
94577
|
const regionEnd = endRelativeSeries.getRegion();
|
|
@@ -94578,20 +94587,31 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
94578
94587
|
};
|
|
94579
94588
|
const lines = [];
|
|
94580
94589
|
const dataPoints = data.latestData[0] && data.latestData[0].latestData ? data.latestData[0].latestData : data.latestData;
|
|
94581
|
-
const
|
|
94582
|
-
const
|
|
94590
|
+
const xAxisHelper = relativeSeries.getXAxisHelper();
|
|
94591
|
+
const yAxisHelper = relativeSeries.getXAxisHelper();
|
|
94592
|
+
const xDomain = xAxisHelper.getScale(0).domain();
|
|
94593
|
+
const yDomain = yAxisHelper.getScale(0).domain();
|
|
94594
|
+
const isXExpand = includeFullBand && !xAxisHelper.isContinuous && !!xAxisHelper.getBandwidth;
|
|
94595
|
+
const isyExpand = includeFullBand && !yAxisHelper.isContinuous && !!yAxisHelper.getBandwidth;
|
|
94596
|
+
const xTemp = { min: null, max: null };
|
|
94597
|
+
const yTemp = { min: null, max: null };
|
|
94583
94598
|
dataPoints.forEach((datum) => {
|
|
94584
94599
|
const isValidX = isValid$1(datum.x);
|
|
94585
94600
|
const isValidY = isValid$1(datum.y);
|
|
94601
|
+
let x;
|
|
94602
|
+
let y;
|
|
94586
94603
|
if (isValidX && isValidY) {
|
|
94587
|
-
|
|
94588
|
-
|
|
94604
|
+
x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
|
|
94605
|
+
y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
|
|
94606
|
+
setTempWithValid(x, isXExpand, xTemp, lines.length);
|
|
94607
|
+
setTempWithValid(y, isyExpand, yTemp, lines.length);
|
|
94589
94608
|
lines.push([{ x, y }]);
|
|
94590
94609
|
}
|
|
94591
94610
|
else if (isValidX) {
|
|
94592
|
-
|
|
94593
|
-
|
|
94611
|
+
x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
|
|
94612
|
+
y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
|
|
94594
94613
|
const y1 = Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y);
|
|
94614
|
+
setTempWithValid(x, isXExpand, xTemp, lines.length);
|
|
94595
94615
|
lines.push([
|
|
94596
94616
|
{
|
|
94597
94617
|
x: x,
|
|
@@ -94604,9 +94624,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
94604
94624
|
]);
|
|
94605
94625
|
}
|
|
94606
94626
|
else if (isValidY) {
|
|
94607
|
-
|
|
94608
|
-
|
|
94627
|
+
x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x);
|
|
94628
|
+
y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
|
|
94609
94629
|
const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width);
|
|
94630
|
+
setTempWithValid(y, isyExpand, yTemp, lines.length);
|
|
94610
94631
|
lines.push([
|
|
94611
94632
|
{
|
|
94612
94633
|
x: x,
|
|
@@ -94619,8 +94640,46 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
94619
94640
|
]);
|
|
94620
94641
|
}
|
|
94621
94642
|
});
|
|
94643
|
+
setTempToLines(lines, xAxisHelper, yAxisHelper, xTemp, yTemp);
|
|
94622
94644
|
return lines;
|
|
94623
94645
|
}
|
|
94646
|
+
function setTempToLines(lines, xAxisHelper, yAxisHelper, xTemp, yTemp) {
|
|
94647
|
+
if (xTemp.min || xTemp.max) {
|
|
94648
|
+
const xBandSize = xAxisHelper.getBandwidth(0) * (1 + xAxisHelper.getScale(0).paddingInner());
|
|
94649
|
+
if (xTemp.min) {
|
|
94650
|
+
lines[xTemp.min.index].forEach(p => (p.x -= xBandSize / 2));
|
|
94651
|
+
}
|
|
94652
|
+
if (xTemp.max) {
|
|
94653
|
+
lines[xTemp.max.index].forEach(p => (p.x += xBandSize / 2));
|
|
94654
|
+
}
|
|
94655
|
+
}
|
|
94656
|
+
if (yTemp.min || yTemp.max) {
|
|
94657
|
+
const yBandSize = yAxisHelper.getBandwidth(0) * (1 + yAxisHelper.getScale(0).paddingInner());
|
|
94658
|
+
if (yTemp.min) {
|
|
94659
|
+
lines[yTemp.min.index].forEach(p => (p.y -= yBandSize / 2));
|
|
94660
|
+
}
|
|
94661
|
+
if (yTemp.max) {
|
|
94662
|
+
lines[yTemp.max.index].forEach(p => (p.y += yBandSize / 2));
|
|
94663
|
+
}
|
|
94664
|
+
}
|
|
94665
|
+
}
|
|
94666
|
+
function setTempWithValid(v, isExpand, temp, index) {
|
|
94667
|
+
if (isExpand) {
|
|
94668
|
+
if (temp.min === null || temp.min.value > v) {
|
|
94669
|
+
temp.min = {
|
|
94670
|
+
value: v,
|
|
94671
|
+
index
|
|
94672
|
+
};
|
|
94673
|
+
}
|
|
94674
|
+
if (temp.max === null || temp.max.value < v) {
|
|
94675
|
+
temp.max = {
|
|
94676
|
+
value: v,
|
|
94677
|
+
index
|
|
94678
|
+
};
|
|
94679
|
+
}
|
|
94680
|
+
}
|
|
94681
|
+
return v;
|
|
94682
|
+
}
|
|
94624
94683
|
function polarLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
|
|
94625
94684
|
const refSeries = {
|
|
94626
94685
|
relativeSeries,
|
|
@@ -96251,7 +96310,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96251
96310
|
return new MarkArea(attr);
|
|
96252
96311
|
}
|
|
96253
96312
|
_computePointsAttr() {
|
|
96254
|
-
var _a;
|
|
96313
|
+
var _a, _b;
|
|
96255
96314
|
const spec = this._spec;
|
|
96256
96315
|
const data = this._markerData;
|
|
96257
96316
|
const startRelativeSeries = this._startRelativeSeries;
|
|
@@ -96260,10 +96319,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96260
96319
|
const { doXProcess, doYProcess, doXYProcess, doCoordinatesProcess } = getMarkAreaProcessInfo(spec);
|
|
96261
96320
|
const isPositionLayout = isValid$1(spec.positions);
|
|
96262
96321
|
const autoRange = (_a = spec.autoRange) !== null && _a !== void 0 ? _a : false;
|
|
96322
|
+
const includeFullBand = (_b = spec.includeFullBand) !== null && _b !== void 0 ? _b : false;
|
|
96263
96323
|
let points = [];
|
|
96264
96324
|
let lines = [];
|
|
96265
96325
|
if (doXYProcess) {
|
|
96266
|
-
lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
|
|
96326
|
+
lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
|
|
96267
96327
|
const [start, end] = lines;
|
|
96268
96328
|
if (start && start.length && end && end.length) {
|
|
96269
96329
|
points = [
|
|
@@ -96281,7 +96341,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96281
96341
|
}
|
|
96282
96342
|
}
|
|
96283
96343
|
else if (doXProcess || doYProcess) {
|
|
96284
|
-
lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange);
|
|
96344
|
+
lines = xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange, includeFullBand);
|
|
96285
96345
|
const [start, end] = lines;
|
|
96286
96346
|
if (start && start.length && end && end.length) {
|
|
96287
96347
|
points = [...start, end[1], end[0]];
|
|
@@ -98624,6 +98684,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
98624
98684
|
});
|
|
98625
98685
|
}
|
|
98626
98686
|
clearLayoutSize() {
|
|
98687
|
+
this._gridInfo.colWidth &&
|
|
98688
|
+
this.setSizeFromUserSetting(this._gridInfo.colWidth, this._colSize, this._col, this._chartLayoutRect.width);
|
|
98689
|
+
this._gridInfo.rowHeight &&
|
|
98690
|
+
this.setSizeFromUserSetting(this._gridInfo.rowHeight, this._rowSize, this._row, this._chartLayoutRect.height);
|
|
98627
98691
|
this._colSize.forEach(c => {
|
|
98628
98692
|
c.isLayoutSetting = false;
|
|
98629
98693
|
if (!c.isUserSetting) {
|
|
@@ -99398,7 +99462,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
99398
99462
|
return '';
|
|
99399
99463
|
}
|
|
99400
99464
|
const styleString = `style="display:inline-block;vertical-align:middle;"`;
|
|
99401
|
-
const { shapeType,
|
|
99465
|
+
const { shapeType, shapeStroke, shapeHollow = false, shapeFill } = option;
|
|
99402
99466
|
const size = (_a = option.shapeSize) !== null && _a !== void 0 ? _a : 8;
|
|
99403
99467
|
const lineWidth = option.shapeLineWidth ? escapeHTML(option.shapeLineWidth) + 'px' : '0px';
|
|
99404
99468
|
let fillString = 'currentColor';
|
|
@@ -99427,7 +99491,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
99427
99491
|
const lw = Number(lineWidth.slice(0, -2));
|
|
99428
99492
|
viewBox = `${x - lw / 2} ${y - lw / 2} ${w + lw} ${h + lw}`;
|
|
99429
99493
|
}
|
|
99430
|
-
|
|
99494
|
+
const isFillGradientStr = GradientParser.IsGradientStr(shapeFill);
|
|
99495
|
+
if (!shapeFill || (isString$1(shapeFill) && !isFillGradientStr) || shapeHollow) {
|
|
99431
99496
|
fillString = shapeHollow ? 'none' : shapeFill ? escapeHTML(shapeFill) : 'currentColor';
|
|
99432
99497
|
return `
|
|
99433
99498
|
<svg ${styleString} width="${size}" height="${size}" viewBox="${viewBox}">
|
|
@@ -99438,19 +99503,20 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
99438
99503
|
</path>
|
|
99439
99504
|
</svg>`;
|
|
99440
99505
|
}
|
|
99441
|
-
|
|
99506
|
+
const shapeFillObject = isFillGradientStr ? GradientParser.Parse(shapeFill) : isObject$2(shapeFill) ? shapeFill : null;
|
|
99507
|
+
if (shapeFillObject) {
|
|
99442
99508
|
fillString = 'gradientColor' + (gradientId !== null && gradientId !== void 0 ? gradientId : '');
|
|
99443
99509
|
let gradient = '';
|
|
99444
|
-
const stops = ((_b =
|
|
99510
|
+
const stops = ((_b = shapeFillObject.stops) !== null && _b !== void 0 ? _b : [])
|
|
99445
99511
|
.map(s => `<stop offset="${escapeHTML(s.offset.toString())}" stop-color="${escapeHTML(s.color)}"/>`)
|
|
99446
99512
|
.join('');
|
|
99447
|
-
if (
|
|
99513
|
+
if (shapeFillObject.gradient === 'radial') {
|
|
99448
99514
|
gradient = `<radialGradient id="${fillString}" cx="50%" cy="50%" r="50%" fx="0%" fy="0%">
|
|
99449
99515
|
${stops}
|
|
99450
99516
|
</radialGradient>`;
|
|
99451
99517
|
}
|
|
99452
|
-
else if (
|
|
99453
|
-
gradient = `<linearGradient id="${fillString}" x1="${((_c =
|
|
99518
|
+
else if (shapeFillObject.gradient === 'linear') {
|
|
99519
|
+
gradient = `<linearGradient id="${fillString}" x1="${((_c = shapeFillObject.x0) !== null && _c !== void 0 ? _c : 0) * 100}%" y1="${((_d = shapeFillObject.y0) !== null && _d !== void 0 ? _d : 0) * 100}%" x2="${((_e = shapeFillObject.x1) !== null && _e !== void 0 ? _e : 0) * 100}%" y2="${((_f = shapeFillObject.y1) !== null && _f !== void 0 ? _f : 0) * 100}%">
|
|
99454
99520
|
${stops}
|
|
99455
99521
|
</linearGradient>`;
|
|
99456
99522
|
}
|
|
@@ -101826,6 +101892,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101826
101892
|
exports.ScatterSeries = ScatterSeries;
|
|
101827
101893
|
exports.ScrollBar = ScrollBar;
|
|
101828
101894
|
exports.SequenceChart = SequenceChart;
|
|
101895
|
+
exports.Stack = Stack;
|
|
101896
|
+
exports.StackChartMixin = StackChartMixin;
|
|
101829
101897
|
exports.StreamLight = StreamLight;
|
|
101830
101898
|
exports.SunburstChart = SunburstChart;
|
|
101831
101899
|
exports.SunburstSeries = SunburstSeries;
|