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.esm.js CHANGED
@@ -5205,6 +5205,17 @@ const EChartsUtilsAll = {
5205
5205
  yAxisMax = null;
5206
5206
  seriesData = [];
5207
5207
  }
5208
+ let yMinVal = 0, yMaxVal = 0;
5209
+ let allYVal = [];
5210
+ if (seriesData.length > 0) {
5211
+ seriesData.forEach((item) => {
5212
+ item.data.forEach((itemData) => {
5213
+ allYVal.push(itemData.value[1]);
5214
+ });
5215
+ });
5216
+ yMinVal = Number(EChartsUtilsComm.getRound(Math.min(...allYVal) - 0.02, 0.01));
5217
+ yMaxVal = Number(EChartsUtilsComm.getRound(Math.max(...allYVal) + 0.02, 0.01));
5218
+ }
5208
5219
  let option = {
5209
5220
  grid: {
5210
5221
  // show: true,//是否显示外边框线
@@ -5271,8 +5282,8 @@ const EChartsUtilsAll = {
5271
5282
  yAxis: [
5272
5283
  {
5273
5284
  type: 'value',
5274
- max: !yValIsAllNull ? yAxisMax : 0,
5275
- min: !yValIsAllNull ? yAxisMin : 0,
5285
+ max: !yValIsAllNull ? yMaxVal : 0,
5286
+ min: !yValIsAllNull ? yMinVal : 0,
5276
5287
  name: yName,
5277
5288
  nameGap: !yValIsAllNull ? 40 : 25,
5278
5289
  nameRotate: 90,
@@ -19606,10 +19617,18 @@ const FormulaUtils = {
19606
19617
  getddn.y2 = array_x[_index];
19607
19618
  getddn.x = dn;
19608
19619
  if (_index == array_y.length) {
19609
- getddn.x1 = array_y[_index - 2];
19610
- getddn.x2 = array_y[_index - 1];
19611
- getddn.y1 = array_x[_index - 2];
19612
- getddn.y2 = array_x[_index - 1];
19620
+ if (dn < array_y[0]) {
19621
+ getddn.x1 = array_y[_index - _index];
19622
+ getddn.x2 = array_y[_index - _index + 1];
19623
+ getddn.y1 = array_x[_index - _index];
19624
+ getddn.y2 = array_x[_index - _index + 1];
19625
+ }
19626
+ else {
19627
+ getddn.x1 = array_y[_index - 2];
19628
+ getddn.x2 = array_y[_index - 1];
19629
+ getddn.y1 = array_x[_index - 2];
19630
+ getddn.y2 = array_x[_index - 1];
19631
+ }
19613
19632
  getddn.x = dn;
19614
19633
  }
19615
19634
  else if (_index == 0) {