rapid-spreadjs 1.0.182 → 1.0.183

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
@@ -5227,6 +5227,17 @@ const EChartsUtilsAll = {
5227
5227
  yAxisMax = null;
5228
5228
  seriesData = [];
5229
5229
  }
5230
+ let yMinVal = 0, yMaxVal = 0;
5231
+ let allYVal = [];
5232
+ if (seriesData.length > 0) {
5233
+ seriesData.forEach((item) => {
5234
+ item.data.forEach((itemData) => {
5235
+ allYVal.push(itemData.value[1]);
5236
+ });
5237
+ });
5238
+ yMinVal = Number(EChartsUtilsComm.getRound(Math.min(...allYVal) - 0.02, 0.01));
5239
+ yMaxVal = Number(EChartsUtilsComm.getRound(Math.max(...allYVal) + 0.02, 0.01));
5240
+ }
5230
5241
  let option = {
5231
5242
  grid: {
5232
5243
  // show: true,//是否显示外边框线
@@ -5293,8 +5304,8 @@ const EChartsUtilsAll = {
5293
5304
  yAxis: [
5294
5305
  {
5295
5306
  type: 'value',
5296
- max: !yValIsAllNull ? yAxisMax : 0,
5297
- min: !yValIsAllNull ? yAxisMin : 0,
5307
+ max: !yValIsAllNull ? yMaxVal : 0,
5308
+ min: !yValIsAllNull ? yMinVal : 0,
5298
5309
  name: yName,
5299
5310
  nameGap: !yValIsAllNull ? 40 : 25,
5300
5311
  nameRotate: 90,
@@ -19628,10 +19639,18 @@ const FormulaUtils = {
19628
19639
  getddn.y2 = array_x[_index];
19629
19640
  getddn.x = dn;
19630
19641
  if (_index == array_y.length) {
19631
- getddn.x1 = array_y[_index - 2];
19632
- getddn.x2 = array_y[_index - 1];
19633
- getddn.y1 = array_x[_index - 2];
19634
- getddn.y2 = array_x[_index - 1];
19642
+ if (dn < array_y[0]) {
19643
+ getddn.x1 = array_y[_index - _index];
19644
+ getddn.x2 = array_y[_index - _index + 1];
19645
+ getddn.y1 = array_x[_index - _index];
19646
+ getddn.y2 = array_x[_index - _index + 1];
19647
+ }
19648
+ else {
19649
+ getddn.x1 = array_y[_index - 2];
19650
+ getddn.x2 = array_y[_index - 1];
19651
+ getddn.y1 = array_x[_index - 2];
19652
+ getddn.y2 = array_x[_index - 1];
19653
+ }
19635
19654
  getddn.x = dn;
19636
19655
  }
19637
19656
  else if (_index == 0) {