rapid-spreadjs 1.0.137 → 1.0.138

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 CHANGED
@@ -14984,6 +14984,7 @@ const FormulaUtils = {
14984
14984
  let curRangeVals = [];
14985
14985
  //获取当前范围的所有单元格对象(涉及到跨行或跨列的单元格,如果直接使用getArray方法,会返回合并单元格中的所有值,如:A1是3个单元格合并为一个单元格,其实只有一个值,会返回3个值,第一个值是正确的,后2个值是null,其实不需要后2个)
14986
14986
  let curRangeCellObjs = sheet.getSpans(item.$gt[0]);
14987
+ curRangeCellObjs = rapidUtils.orderByJson(curRangeCellObjs, 'row', 'asc');
14987
14988
  if (curRangeCellObjs.length > 0) {
14988
14989
  curRangeCellObjs.forEach((itemCurCellObj) => {
14989
14990
  curRangeVals.push(sheet.getValue(itemCurCellObj.row, itemCurCellObj.col));
@@ -19229,6 +19230,15 @@ const FormulaUtils = {
19229
19230
  else {
19230
19231
  x = Number(x);
19231
19232
  }
19233
+ let tempXData = [], tempYData = [];
19234
+ xData.forEach((element, index) => {
19235
+ if (element && element != 0) {
19236
+ tempXData.push(element);
19237
+ tempYData.push(yData[index]);
19238
+ }
19239
+ });
19240
+ xData = tempXData;
19241
+ yData = tempYData;
19232
19242
  // console.log(111, retData);
19233
19243
  // console.log(222, xData);
19234
19244
  // console.log(333, yData);