sea-chart 0.0.51-alpha.3 → 0.0.52

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.
@@ -111,7 +111,7 @@ SQLStatisticsUtils.formatedTableSqlRows = (chart, sqlRows, chartSQLMap, columnMa
111
111
  if (config.summary_type === CHART_SUMMARY_TYPE.COUNT) {
112
112
  sqlRows.forEach((item, index) => {
113
113
  const collaborators = item[sqlGroupbyColumnKey];
114
- // Multiple collaborators in the same cell
114
+ // Multiple collaborators
115
115
  if ((collaborators === null || collaborators === void 0 ? void 0 : collaborators.length) > 1) {
116
116
  newSqlRows.splice(index, 1);
117
117
  collaborators.forEach(item => {
@@ -152,7 +152,7 @@ SQLStatisticsUtils.formatedTableSqlRows = (chart, sqlRows, chartSQLMap, columnMa
152
152
  }
153
153
  sqlRows.forEach((item, index) => {
154
154
  const collaborators = item[sqlGroupbyColumnKey];
155
- // Multiple collaborators in the same cell
155
+ // Multiple collaborators
156
156
  if ((collaborators === null || collaborators === void 0 ? void 0 : collaborators.length) > 1) {
157
157
  newSqlRows.splice(index, 1);
158
158
  collaborators.forEach(collaborator => {
@@ -646,40 +646,6 @@ SQLStatisticsUtils.twoDimensionTableSQLResult2JavaScript = (chart, sqlRows, char
646
646
  pivot_table_total, chart);
647
647
  BaseUtils.sortCharts(pivot_rows, groupbyColumn, 'name');
648
648
  BaseUtils.sortCharts(pivot_columns, columnGroupbyColumn, 'key');
649
- console.log('pivot_rows', pivot_rows);
650
- const mergeSameCollaborator = pivot_rows => {
651
- const new_pivot_rows = [];
652
- pivot_rows.forEach(item => {
653
- var _item$name;
654
- // Single Collaborator in cell
655
- if ((item === null || item === void 0 ? void 0 : (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.length) === 1) {
656
- const curCollaborator = item.name[0];
657
- const length = new_pivot_rows.length;
658
- if (length > 1 && new_pivot_rows[length - 1]) {
659
- var _new_pivot_rows;
660
- const preCollaborator = (_new_pivot_rows = new_pivot_rows[length - 1]) === null || _new_pivot_rows === void 0 ? void 0 : _new_pivot_rows.name[0];
661
- if (curCollaborator === preCollaborator) {
662
- const newItem = {
663
- ...item,
664
- cells: {
665
- ...new_pivot_rows[length - 1].cells,
666
- ...item.cells
667
- },
668
- total: new_pivot_rows[length - 1].total + item.total
669
- };
670
- new_pivot_rows[length - 1] = newItem;
671
- return;
672
- }
673
- }
674
- new_pivot_rows.push({
675
- ...item
676
- });
677
- }
678
- });
679
- console.log('new_pivot_rows', new_pivot_rows);
680
- return new_pivot_rows;
681
- };
682
- pivot_rows = mergeSameCollaborator(pivot_rows);
683
649
  const summary_columns = [summaryColumn, ...summaryColumnsWithMethod.map(item => item.column)];
684
650
  return {
685
651
  summary_columns,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "0.0.51-alpha.3",
3
+ "version": "0.0.52",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",