rapid-spreadjs 1.0.107 → 1.0.109

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
@@ -4700,6 +4700,11 @@ const EChartsUtilsAll = {
4700
4700
  xDataXx.filter((x) => x[1] == 0).length == xDataXx.length) {
4701
4701
  yValIsAllNull = true;
4702
4702
  }
4703
+ if (!yDataSourceOld.some((x) => x != '' && x != '/' && x != null && x != undefined) &&
4704
+ !yDataSourceSxOld.some((x) => x != '' && x != '/' && x != null && x != undefined) &&
4705
+ !yDataSourceXxOld.some((x) => x != '' && x != '/' && x != null && x != undefined)) {
4706
+ yValIsAllNull = true;
4707
+ }
4703
4708
  let option = {
4704
4709
  grid: {
4705
4710
  // show: true,// 是否显示外边框线
@@ -4789,7 +4794,11 @@ const EChartsUtilsAll = {
4789
4794
  },
4790
4795
  },
4791
4796
  ],
4792
- series: [getLineObj(1, xData), getLineObj(2, xDataSx), getLineObj(3, xDataXx)],
4797
+ series: [
4798
+ !yValIsAllNull ? getLineObj(1, xData) : [],
4799
+ !yValIsAllNull ? getLineObj(2, xDataSx) : [],
4800
+ !yValIsAllNull ? getLineObj(3, xDataXx) : [],
4801
+ ],
4793
4802
  };
4794
4803
  return option;
4795
4804
  },
@@ -21083,7 +21092,7 @@ const FormulaUtils = {
21083
21092
  }
21084
21093
  }
21085
21094
  // 提取前6个值进行计算
21086
- const values = [val1, val2, val3, val4, val5, val6];
21095
+ const values = [parseFloat(val1), parseFloat(val2), parseFloat(val3), parseFloat(val4), parseFloat(val5), parseFloat(val6)];
21087
21096
  // 计算初始平均值avg
21088
21097
  const sum = values.reduce((acc, val) => rapidUtils.preciseCalc(acc, val, 'add'), 0);
21089
21098
  const avg = rapidUtils.preciseCalc(sum, values.length, 'div');