rapid-spreadjs 1.0.181 → 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
@@ -1318,7 +1318,8 @@ const BusinessUtils = {
1318
1318
  .indicatorColor(commentColor)
1319
1319
  .indicatorSize(commentSize)
1320
1320
  .fontSize('10pt')
1321
- .width(200);
1321
+ .width(250)
1322
+ .height(Math.ceil(item.tipMsg.length / 20) * 30);
1322
1323
  if (commentDefaultTextIsSet) {
1323
1324
  sheet.setValue(item.row, item.col, commentDefaultText);
1324
1325
  }
@@ -1389,7 +1390,13 @@ const BusinessUtils = {
1389
1390
  try {
1390
1391
  //设置批注
1391
1392
  if (eval(lastFor)) {
1392
- sheet.comments.add(item.row, item.col, item.tipMsg).indicatorColor(commentColor).indicatorSize(commentSize).fontSize('10pt').width(200);
1393
+ sheet.comments
1394
+ .add(item.row, item.col, item.tipMsg)
1395
+ .indicatorColor(commentColor)
1396
+ .indicatorSize(commentSize)
1397
+ .fontSize('10pt')
1398
+ .width(250)
1399
+ .height(Math.ceil(item.tipMsg.length / 20) * 30);
1393
1400
  if (commentDefaultTextIsSet) {
1394
1401
  sheet.setValue(item.row, item.col, commentDefaultText);
1395
1402
  }
@@ -5220,6 +5227,17 @@ const EChartsUtilsAll = {
5220
5227
  yAxisMax = null;
5221
5228
  seriesData = [];
5222
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
+ }
5223
5241
  let option = {
5224
5242
  grid: {
5225
5243
  // show: true,//是否显示外边框线
@@ -5286,8 +5304,8 @@ const EChartsUtilsAll = {
5286
5304
  yAxis: [
5287
5305
  {
5288
5306
  type: 'value',
5289
- max: !yValIsAllNull ? yAxisMax : 0,
5290
- min: !yValIsAllNull ? yAxisMin : 0,
5307
+ max: !yValIsAllNull ? yMaxVal : 0,
5308
+ min: !yValIsAllNull ? yMinVal : 0,
5291
5309
  name: yName,
5292
5310
  nameGap: !yValIsAllNull ? 40 : 25,
5293
5311
  nameRotate: 90,
@@ -19621,10 +19639,18 @@ const FormulaUtils = {
19621
19639
  getddn.y2 = array_x[_index];
19622
19640
  getddn.x = dn;
19623
19641
  if (_index == array_y.length) {
19624
- getddn.x1 = array_y[_index - 2];
19625
- getddn.x2 = array_y[_index - 1];
19626
- getddn.y1 = array_x[_index - 2];
19627
- 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
+ }
19628
19654
  getddn.x = dn;
19629
19655
  }
19630
19656
  else if (_index == 0) {