rapid-spreadjs 1.0.138 → 1.0.140
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 +39 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +39 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/utils/echarts-all.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1436,7 +1436,12 @@ const BusinessUtils = {
|
|
|
1436
1436
|
});
|
|
1437
1437
|
// 有值和没有值的行索引集合
|
|
1438
1438
|
let hasValueRows = [], noValueRows = [];
|
|
1439
|
+
// 有值的行索引(序号列使用)
|
|
1440
|
+
let hasValueRowsSer = [];
|
|
1439
1441
|
rowCells.forEach((rowObj, index) => {
|
|
1442
|
+
if (rowObj.rows.some((x) => x.hasValue) && !hasValueRowsSer.some((x) => x == rowObj.rowSpan)) {
|
|
1443
|
+
hasValueRowsSer.push(rowObj.rowSpan);
|
|
1444
|
+
}
|
|
1440
1445
|
if (rowObj.rows.some((x) => x.hasValue)) {
|
|
1441
1446
|
rowObj.rows.forEach((x) => {
|
|
1442
1447
|
x.rows.forEach((rowIndex) => {
|
|
@@ -1456,11 +1461,13 @@ const BusinessUtils = {
|
|
|
1456
1461
|
});
|
|
1457
1462
|
}
|
|
1458
1463
|
});
|
|
1464
|
+
hasValueRowsSer.forEach((rowIndex, index) => {
|
|
1465
|
+
// 设置序号列单元格的值(1、2、3...的格式)
|
|
1466
|
+
sheet.setValue(rowIndex, 1, index + 1);
|
|
1467
|
+
});
|
|
1459
1468
|
hasValueRows.forEach((rowIndex, index) => {
|
|
1460
1469
|
// 设置行可见
|
|
1461
1470
|
sheet.setRowVisible(rowIndex, true);
|
|
1462
|
-
// 设置序号列单元格的值(1、2、3...的格式)
|
|
1463
|
-
sheet.setValue(rowIndex, 1, index + 1);
|
|
1464
1471
|
});
|
|
1465
1472
|
noValueRows.forEach((rowIndex) => {
|
|
1466
1473
|
// 设置行不可见
|
|
@@ -8210,10 +8217,12 @@ const EChartsUtilsAll = {
|
|
|
8210
8217
|
* @param config 折线配置
|
|
8211
8218
|
* @param xDataArr x轴原始数据(二维数组)
|
|
8212
8219
|
* @param yDataArr y轴原始数据(二维数组)
|
|
8220
|
+
* @param sheet 表格对象
|
|
8213
8221
|
* @returns 返回ECharts配置项
|
|
8214
8222
|
*/
|
|
8215
|
-
chart350: (config, xDataArr, yDataArr) => {
|
|
8223
|
+
chart350: (config, xDataArr, yDataArr, sheet) => {
|
|
8216
8224
|
let lineData = JSON.parse(config.chartLinesJson), lineColor = lineData[0].lineColor;
|
|
8225
|
+
const chartExtJson = config.chartExtJson == null || config.chartExtJson == undefined ? null : JSON.parse(config.chartExtJson);
|
|
8217
8226
|
//击数N(次)、含水率w(%)、y轴第一个趋势数据、y轴第二个趋势数据、25的趋势数据、y轴最小值、y轴最大值
|
|
8218
8227
|
const jsN = [xDataArr[0][0], xDataArr[0][1]], // [18, 30],
|
|
8219
8228
|
hsl = [yDataArr[0][0], yDataArr[0][1]], // [22.1, 11.5],
|
|
@@ -8288,7 +8297,7 @@ const EChartsUtilsAll = {
|
|
|
8288
8297
|
color: '#000',
|
|
8289
8298
|
formatter: function (data) {
|
|
8290
8299
|
//显示25这个坐标点数据
|
|
8291
|
-
return isAllNull ? '' : '(
|
|
8300
|
+
return isAllNull ? '' : '(' + 25 + ' , ' + data.data.yAxis + ')';
|
|
8292
8301
|
},
|
|
8293
8302
|
},
|
|
8294
8303
|
itemStyle: { color: 'transparent' },
|
|
@@ -8462,6 +8471,18 @@ const EChartsUtilsAll = {
|
|
|
8462
8471
|
if (isAllNull) {
|
|
8463
8472
|
seriesObjs = [];
|
|
8464
8473
|
}
|
|
8474
|
+
if (chartExtJson != null && chartExtJson != undefined && chartExtJson.yxdsyHsl != null && chartExtJson.yxdsyHsl != undefined) {
|
|
8475
|
+
// 默认输出精度
|
|
8476
|
+
let outJdYxdsyHsl = 0.1;
|
|
8477
|
+
// 输出数据
|
|
8478
|
+
let outValYxdsyHsl = 0;
|
|
8479
|
+
// 设置Sheet单元格的值(输出:含水率)
|
|
8480
|
+
if (chartExtJson.yxdsyHslJd != null && chartExtJson.yxdsyHslJd != undefined) {
|
|
8481
|
+
outJdYxdsyHsl = chartExtJson.yxdsyHslJd;
|
|
8482
|
+
}
|
|
8483
|
+
outValYxdsyHsl = EChartsUtilsComm.getRound(yVal25, outJdYxdsyHsl);
|
|
8484
|
+
sheet.setValue(chartExtJson.yxdsyHsl.row, chartExtJson.yxdsyHsl.col, outValYxdsyHsl);
|
|
8485
|
+
}
|
|
8465
8486
|
let option = {
|
|
8466
8487
|
grid: {
|
|
8467
8488
|
// show: true,//是否显示外边框线
|
|
@@ -19320,6 +19341,20 @@ const FormulaUtils = {
|
|
|
19320
19341
|
getddn.y1 = array_x[_index - 1];
|
|
19321
19342
|
getddn.y2 = array_x[_index];
|
|
19322
19343
|
getddn.x = dn;
|
|
19344
|
+
if (_index == array_y.length) {
|
|
19345
|
+
getddn.x1 = array_y[_index - 2];
|
|
19346
|
+
getddn.x2 = array_y[_index - 1];
|
|
19347
|
+
getddn.y1 = array_x[_index - 2];
|
|
19348
|
+
getddn.y2 = array_x[_index - 1];
|
|
19349
|
+
getddn.x = dn;
|
|
19350
|
+
}
|
|
19351
|
+
else if (_index == 0) {
|
|
19352
|
+
getddn.x1 = array_y[_index];
|
|
19353
|
+
getddn.x2 = array_y[_index + 1];
|
|
19354
|
+
getddn.y1 = array_x[_index];
|
|
19355
|
+
getddn.y2 = array_x[_index + 1];
|
|
19356
|
+
getddn.x = dn;
|
|
19357
|
+
}
|
|
19323
19358
|
if (getddn.y1 == dn) {
|
|
19324
19359
|
dnn = getddn.x1;
|
|
19325
19360
|
}
|