rapid-spreadjs 1.0.174 → 1.0.175
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/dist/index.cjs.js +18 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +18 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1463,6 +1463,7 @@ const BusinessUtils = {
|
|
|
1463
1463
|
cellValue !== undefined &&
|
|
1464
1464
|
cellValue !== '' &&
|
|
1465
1465
|
cellValue !== '/' &&
|
|
1466
|
+
cellValue !== '#VALUE!' &&
|
|
1466
1467
|
!(cellValue instanceof GC.Spread.CalcEngine.CalcError)) {
|
|
1467
1468
|
curRowHasValue = true;
|
|
1468
1469
|
break;
|
|
@@ -9814,19 +9815,29 @@ const EChartsUtilsAll = {
|
|
|
9814
9815
|
let xData = xDataArr[0];
|
|
9815
9816
|
let yData = yDataArr[0];
|
|
9816
9817
|
/**
|
|
9817
|
-
*
|
|
9818
|
-
*
|
|
9819
|
-
|
|
9820
|
-
|
|
9818
|
+
* 判断值是否为无效占位符
|
|
9819
|
+
* 无效值包括: 0, '/', null, undefined, NaN, ''
|
|
9820
|
+
*/
|
|
9821
|
+
function isValid(val) {
|
|
9822
|
+
if (val === 0 || val === '/' || val === null || val === undefined || val === '')
|
|
9823
|
+
return false;
|
|
9824
|
+
if (typeof val === 'number' && Number.isNaN(val))
|
|
9825
|
+
return false;
|
|
9826
|
+
return true;
|
|
9827
|
+
}
|
|
9828
|
+
/**
|
|
9829
|
+
* 根据两个数组对应位置的值进行联合过滤,去除任一为无效值的项
|
|
9830
|
+
* @param {Array} arr1 - 第一个数组
|
|
9831
|
+
* @param {Array} arr2 - 第二个数组
|
|
9832
|
+
* @returns {[Array, Array]} 返回过滤后的两个数组组成的元组
|
|
9821
9833
|
*/
|
|
9822
9834
|
function filterArrData(arr1, arr2) {
|
|
9823
9835
|
const filtered1 = [];
|
|
9824
9836
|
const filtered2 = [];
|
|
9825
|
-
// 以较短的数组长度为基准,防止越界
|
|
9826
9837
|
const len = Math.min(arr1.length, arr2.length);
|
|
9827
9838
|
for (let i = 0; i < len; i++) {
|
|
9828
|
-
//
|
|
9829
|
-
if (arr1[i]
|
|
9839
|
+
// 只有当两个数组在当前位置都是有效值时,才保留
|
|
9840
|
+
if (isValid(arr1[i]) && isValid(arr2[i])) {
|
|
9830
9841
|
filtered1.push(arr1[i]);
|
|
9831
9842
|
filtered2.push(arr2[i]);
|
|
9832
9843
|
}
|