sea-chart 0.0.67-alpha.0 → 0.0.67-alpha.2

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.
@@ -147,8 +147,7 @@
147
147
  padding: 0;
148
148
  }
149
149
 
150
- .sea-chart-pivot-table .pivot-table-header-summary-columns-container,
151
- .sea-chart-pivot-table .pivot-cells-container {
150
+ .sea-chart-pivot-table .pivot-table-header-summary-columns-container {
152
151
  height: 100%;
153
152
  width: 100%;
154
153
  overflow: hidden;
@@ -156,6 +155,14 @@
156
155
  justify-content: space-between;
157
156
  }
158
157
 
158
+ .sea-chart-pivot-table .pivot-cells-container {
159
+ height: 100%;
160
+ width: 100%;
161
+ overflow: hidden;
162
+ display: flex;
163
+ justify-content: center;
164
+ }
165
+
159
166
  .sea-chart-pivot-table .pivot-table-header-summary-columns-container > div,
160
167
  .sea-chart-pivot-table .pivot-cells-container > div {
161
168
  flex:1;
@@ -126,6 +126,24 @@ class TwoDimensionTable extends PureComponent {
126
126
  total
127
127
  }, selectedCell);
128
128
  };
129
+ this.renderEmptyCell = (summary_columns, cellIdx) => {
130
+ if ((summary_columns === null || summary_columns === void 0 ? void 0 : summary_columns.length) !== 0) {
131
+ return summary_columns.map(() => {
132
+ return /*#__PURE__*/React.createElement("div", {
133
+ key: "table-cell-".concat(cellIdx),
134
+ className: classnames('pivot-cell', {
135
+ 'pivot-empty-cell': true
136
+ })
137
+ }, /*#__PURE__*/React.createElement("i", null));
138
+ });
139
+ }
140
+ return /*#__PURE__*/React.createElement("div", {
141
+ key: "table-cell-".concat(cellIdx),
142
+ className: classnames('pivot-cell', {
143
+ 'pivot-empty-cell': true
144
+ })
145
+ }, /*#__PURE__*/React.createElement("i", null));
146
+ };
129
147
  this.renderRows = () => {
130
148
  const {
131
149
  result,
@@ -248,14 +266,7 @@ class TwoDimensionTable extends PureComponent {
248
266
  'selected-pivot-cell-border': isSelectedCell
249
267
  })
250
268
  }));
251
- }), !total && (summary_columns === null || summary_columns === void 0 ? void 0 : summary_columns.map(() => {
252
- return /*#__PURE__*/React.createElement("div", {
253
- key: "table-cell-".concat(cellIdx),
254
- className: classnames('pivot-cell', {
255
- 'pivot-empty-cell': true
256
- })
257
- }, /*#__PURE__*/React.createElement("i", null));
258
- }))));
269
+ }), !total && this.renderEmptyCell(summary_columns, cellIdx)));
259
270
  }), display_total && /*#__PURE__*/React.createElement("td", {
260
271
  className: classnames('pivot-cell', {
261
272
  'pivot-empty-cell': !isValidSummaryDisplayValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "0.0.67-alpha.0",
3
+ "version": "0.0.67-alpha.2",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",