rapid-spreadjs 1.0.174 → 1.0.176
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 +19 -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 +19 -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/dist/utils/echarts-all.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1441,6 +1441,7 @@ const BusinessUtils = {
|
|
|
1441
1441
|
cellValue !== undefined &&
|
|
1442
1442
|
cellValue !== '' &&
|
|
1443
1443
|
cellValue !== '/' &&
|
|
1444
|
+
cellValue !== '#VALUE!' &&
|
|
1444
1445
|
!(cellValue instanceof GC.Spread.CalcEngine.CalcError)) {
|
|
1445
1446
|
curRowHasValue = true;
|
|
1446
1447
|
break;
|
|
@@ -5462,6 +5463,7 @@ const EChartsUtilsAll = {
|
|
|
5462
5463
|
// 图例,参考文档:https://echarts.apache.org/zh/option.html#legend
|
|
5463
5464
|
legend: {
|
|
5464
5465
|
// show: !yValIsAllNull,
|
|
5466
|
+
top: '0px',
|
|
5465
5467
|
left: 'center',
|
|
5466
5468
|
data: ['筛分曲线', '上限', '下限'],
|
|
5467
5469
|
selected: {
|
|
@@ -9792,19 +9794,29 @@ const EChartsUtilsAll = {
|
|
|
9792
9794
|
let xData = xDataArr[0];
|
|
9793
9795
|
let yData = yDataArr[0];
|
|
9794
9796
|
/**
|
|
9795
|
-
*
|
|
9796
|
-
*
|
|
9797
|
-
|
|
9798
|
-
|
|
9797
|
+
* 判断值是否为无效占位符
|
|
9798
|
+
* 无效值包括: 0, '/', null, undefined, NaN, ''
|
|
9799
|
+
*/
|
|
9800
|
+
function isValid(val) {
|
|
9801
|
+
if (val === 0 || val === '/' || val === null || val === undefined || val === '')
|
|
9802
|
+
return false;
|
|
9803
|
+
if (typeof val === 'number' && Number.isNaN(val))
|
|
9804
|
+
return false;
|
|
9805
|
+
return true;
|
|
9806
|
+
}
|
|
9807
|
+
/**
|
|
9808
|
+
* 根据两个数组对应位置的值进行联合过滤,去除任一为无效值的项
|
|
9809
|
+
* @param {Array} arr1 - 第一个数组
|
|
9810
|
+
* @param {Array} arr2 - 第二个数组
|
|
9811
|
+
* @returns {[Array, Array]} 返回过滤后的两个数组组成的元组
|
|
9799
9812
|
*/
|
|
9800
9813
|
function filterArrData(arr1, arr2) {
|
|
9801
9814
|
const filtered1 = [];
|
|
9802
9815
|
const filtered2 = [];
|
|
9803
|
-
// 以较短的数组长度为基准,防止越界
|
|
9804
9816
|
const len = Math.min(arr1.length, arr2.length);
|
|
9805
9817
|
for (let i = 0; i < len; i++) {
|
|
9806
|
-
//
|
|
9807
|
-
if (arr1[i]
|
|
9818
|
+
// 只有当两个数组在当前位置都是有效值时,才保留
|
|
9819
|
+
if (isValid(arr1[i]) && isValid(arr2[i])) {
|
|
9808
9820
|
filtered1.push(arr1[i]);
|
|
9809
9821
|
filtered2.push(arr2[i]);
|
|
9810
9822
|
}
|