@visactor/vchart 2.0.6 → 2.0.7-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/build/es5/index.js +1 -1
- package/build/index.es.js +19 -7
- package/build/index.js +19 -7
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/interface.js +2 -1
- package/cjs/compile/grammar-item.js +1 -2
- package/cjs/constant/attribute.js +2 -1
- package/cjs/constant/gradient.js +1 -2
- package/cjs/constant/sunburst.js +1 -1
- package/cjs/constant/waterfall.js +2 -1
- package/cjs/constant/word-cloud.js +1 -1
- package/cjs/core/expression-function.js +1 -2
- 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/core/vchart.js +1 -1
- package/cjs/data/initialize.js +1 -1
- package/cjs/data/register.js +1 -1
- package/cjs/data/transforms/waterfall.js +18 -6
- package/cjs/data/transforms/waterfall.js.map +1 -1
- package/esm/animation/interface.js +2 -1
- package/esm/compile/grammar-item.js +1 -2
- package/esm/constant/attribute.js +2 -1
- package/esm/constant/gradient.js +1 -2
- package/esm/constant/sunburst.js +1 -1
- package/esm/constant/waterfall.js +2 -1
- package/esm/constant/word-cloud.js +1 -1
- package/esm/core/expression-function.js +1 -2
- 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/core/vchart.js +1 -1
- package/esm/data/initialize.js +1 -1
- package/esm/data/register.js +1 -1
- package/esm/data/transforms/waterfall.js +18 -5
- package/esm/data/transforms/waterfall.js.map +1 -1
- package/package.json +4 -4
package/build/index.es.js
CHANGED
|
@@ -58325,7 +58325,7 @@ const lookup = (data, opt) => {
|
|
|
58325
58325
|
});
|
|
58326
58326
|
};
|
|
58327
58327
|
|
|
58328
|
-
const version = "2.0.
|
|
58328
|
+
const version = "2.0.7-alpha.0";
|
|
58329
58329
|
|
|
58330
58330
|
const addVChartProperty = (data, op) => {
|
|
58331
58331
|
const context = op.beforeCall();
|
|
@@ -71497,9 +71497,9 @@ function computeTotalWithMultipleData(indexData, key, total, totalData, temp, in
|
|
|
71497
71497
|
const { valueField, startAs, endAs, total: totalSpec } = op;
|
|
71498
71498
|
const _normalTemp = [];
|
|
71499
71499
|
const _totalTemp = [];
|
|
71500
|
-
indexData.forEach(d => {
|
|
71500
|
+
indexData.forEach((d, index) => {
|
|
71501
71501
|
if (isTotalCheck(d)) {
|
|
71502
|
-
_totalTemp.push(d);
|
|
71502
|
+
_totalTemp.push(Object.assign(Object.assign({}, d), { [`_vchart_waterfall_waterfall_temp`]: index }));
|
|
71503
71503
|
}
|
|
71504
71504
|
else {
|
|
71505
71505
|
_normalTemp.push(d);
|
|
@@ -71521,6 +71521,15 @@ function computeTotalWithMultipleData(indexData, key, total, totalData, temp, in
|
|
|
71521
71521
|
let positive = start;
|
|
71522
71522
|
let navigate = start;
|
|
71523
71523
|
let valueTemp = end - start;
|
|
71524
|
+
const tempTotalValue = _normalTemp.reduce((pre, cur) => precisionSub(pre, +cur[valueField]), valueTemp);
|
|
71525
|
+
_totalTemp.forEach(d => {
|
|
71526
|
+
const tempTotalData = {
|
|
71527
|
+
[startAs]: start,
|
|
71528
|
+
[endAs]: end,
|
|
71529
|
+
[valueField]: tempTotalValue
|
|
71530
|
+
};
|
|
71531
|
+
_normalTemp.splice(d._vchart_waterfall_waterfall_temp, 0, tempTotalData);
|
|
71532
|
+
});
|
|
71524
71533
|
_normalTemp.forEach(d => {
|
|
71525
71534
|
const value = +d[valueField];
|
|
71526
71535
|
if (value >= 0) {
|
|
@@ -71535,10 +71544,13 @@ function computeTotalWithMultipleData(indexData, key, total, totalData, temp, in
|
|
|
71535
71544
|
start = precisionAdd(start, value);
|
|
71536
71545
|
valueTemp = precisionSub(valueTemp, value);
|
|
71537
71546
|
});
|
|
71538
|
-
_totalTemp.forEach(
|
|
71539
|
-
|
|
71540
|
-
|
|
71541
|
-
d
|
|
71547
|
+
_totalTemp.forEach(_d => {
|
|
71548
|
+
const index = _d._vchart_waterfall_waterfall_temp;
|
|
71549
|
+
_d = _normalTemp[index];
|
|
71550
|
+
const d = indexData[index];
|
|
71551
|
+
d[startAs] = _d[startAs];
|
|
71552
|
+
d[endAs] = _d[endAs];
|
|
71553
|
+
d[valueField] = _d[valueField];
|
|
71542
71554
|
});
|
|
71543
71555
|
return Object.assign(Object.assign({}, total), { lastIndex: key });
|
|
71544
71556
|
}
|
package/build/index.js
CHANGED
|
@@ -58331,7 +58331,7 @@
|
|
|
58331
58331
|
});
|
|
58332
58332
|
};
|
|
58333
58333
|
|
|
58334
|
-
const version = "2.0.
|
|
58334
|
+
const version = "2.0.7-alpha.0";
|
|
58335
58335
|
|
|
58336
58336
|
const addVChartProperty = (data, op) => {
|
|
58337
58337
|
const context = op.beforeCall();
|
|
@@ -71503,9 +71503,9 @@
|
|
|
71503
71503
|
const { valueField, startAs, endAs, total: totalSpec } = op;
|
|
71504
71504
|
const _normalTemp = [];
|
|
71505
71505
|
const _totalTemp = [];
|
|
71506
|
-
indexData.forEach(d => {
|
|
71506
|
+
indexData.forEach((d, index) => {
|
|
71507
71507
|
if (isTotalCheck(d)) {
|
|
71508
|
-
_totalTemp.push(d);
|
|
71508
|
+
_totalTemp.push(Object.assign(Object.assign({}, d), { [`_vchart_waterfall_waterfall_temp`]: index }));
|
|
71509
71509
|
}
|
|
71510
71510
|
else {
|
|
71511
71511
|
_normalTemp.push(d);
|
|
@@ -71527,6 +71527,15 @@
|
|
|
71527
71527
|
let positive = start;
|
|
71528
71528
|
let navigate = start;
|
|
71529
71529
|
let valueTemp = end - start;
|
|
71530
|
+
const tempTotalValue = _normalTemp.reduce((pre, cur) => precisionSub(pre, +cur[valueField]), valueTemp);
|
|
71531
|
+
_totalTemp.forEach(d => {
|
|
71532
|
+
const tempTotalData = {
|
|
71533
|
+
[startAs]: start,
|
|
71534
|
+
[endAs]: end,
|
|
71535
|
+
[valueField]: tempTotalValue
|
|
71536
|
+
};
|
|
71537
|
+
_normalTemp.splice(d._vchart_waterfall_waterfall_temp, 0, tempTotalData);
|
|
71538
|
+
});
|
|
71530
71539
|
_normalTemp.forEach(d => {
|
|
71531
71540
|
const value = +d[valueField];
|
|
71532
71541
|
if (value >= 0) {
|
|
@@ -71541,10 +71550,13 @@
|
|
|
71541
71550
|
start = precisionAdd(start, value);
|
|
71542
71551
|
valueTemp = precisionSub(valueTemp, value);
|
|
71543
71552
|
});
|
|
71544
|
-
_totalTemp.forEach(
|
|
71545
|
-
|
|
71546
|
-
|
|
71547
|
-
d
|
|
71553
|
+
_totalTemp.forEach(_d => {
|
|
71554
|
+
const index = _d._vchart_waterfall_waterfall_temp;
|
|
71555
|
+
_d = _normalTemp[index];
|
|
71556
|
+
const d = indexData[index];
|
|
71557
|
+
d[startAs] = _d[startAs];
|
|
71558
|
+
d[endAs] = _d[endAs];
|
|
71559
|
+
d[valueField] = _d[valueField];
|
|
71548
71560
|
});
|
|
71549
71561
|
return Object.assign(Object.assign({}, total), { lastIndex: key });
|
|
71550
71562
|
}
|