@dhis2/analytics 21.1.0 → 21.1.1
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [21.1.1](https://github.com/dhis2/analytics/compare/v21.1.0...v21.1.1) (2021-12-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* do not fix headers if no dimension items are selected ([#1057](https://github.com/dhis2/analytics/issues/1057)) ([ae51967](https://github.com/dhis2/analytics/commit/ae51967ff35a17b8589f4959015b06c4913b7dae))
|
|
7
|
+
|
|
1
8
|
# [21.1.0](https://github.com/dhis2/analytics/compare/v21.0.12...v21.1.0) (2021-12-20)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -226,6 +226,7 @@ class PivotTableEngine {
|
|
|
226
226
|
return sets;
|
|
227
227
|
}, {});
|
|
228
228
|
this.rawData = data;
|
|
229
|
+
this.dimensionLookup = buildDimensionLookup(this.visualization, this.rawData.metaData, this.rawData.headers);
|
|
229
230
|
this.options = { ...defaultOptions,
|
|
230
231
|
showColumnTotals: visualization.colTotals,
|
|
231
232
|
showRowTotals: visualization.rowTotals,
|
|
@@ -235,10 +236,10 @@ class PivotTableEngine {
|
|
|
235
236
|
hideEmptyRows: visualization.hideEmptyRows,
|
|
236
237
|
title: visualization.hideTitle ? undefined : visualization.title,
|
|
237
238
|
subtitle: visualization.hideSubtitle ? undefined : visualization.subtitle,
|
|
238
|
-
|
|
239
|
-
|
|
239
|
+
// turn on fixed headers only when there are dimensions
|
|
240
|
+
fixColumnHeaders: this.dimensionLookup.columns.length ? visualization.fixColumnHeaders : false,
|
|
241
|
+
fixRowHeaders: this.dimensionLookup.rows.length ? visualization.fixRowHeaders : false
|
|
240
242
|
};
|
|
241
|
-
this.dimensionLookup = buildDimensionLookup(this.visualization, this.rawData.metaData, this.rawData.headers);
|
|
242
243
|
this.adaptiveClippingController = new _AdaptiveClippingController.AdaptiveClippingController(this);
|
|
243
244
|
const doColumnSubtotals = this.options.showColumnSubtotals && this.dimensionLookup.rows.length > 1;
|
|
244
245
|
const singularRow = this.dimensionLookup.rows.length === 1 && this.dimensionLookup.rows[0].count === 1;
|
|
@@ -211,6 +211,7 @@ export class PivotTableEngine {
|
|
|
211
211
|
return sets;
|
|
212
212
|
}, {});
|
|
213
213
|
this.rawData = data;
|
|
214
|
+
this.dimensionLookup = buildDimensionLookup(this.visualization, this.rawData.metaData, this.rawData.headers);
|
|
214
215
|
this.options = { ...defaultOptions,
|
|
215
216
|
showColumnTotals: visualization.colTotals,
|
|
216
217
|
showRowTotals: visualization.rowTotals,
|
|
@@ -220,10 +221,10 @@ export class PivotTableEngine {
|
|
|
220
221
|
hideEmptyRows: visualization.hideEmptyRows,
|
|
221
222
|
title: visualization.hideTitle ? undefined : visualization.title,
|
|
222
223
|
subtitle: visualization.hideSubtitle ? undefined : visualization.subtitle,
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
// turn on fixed headers only when there are dimensions
|
|
225
|
+
fixColumnHeaders: this.dimensionLookup.columns.length ? visualization.fixColumnHeaders : false,
|
|
226
|
+
fixRowHeaders: this.dimensionLookup.rows.length ? visualization.fixRowHeaders : false
|
|
225
227
|
};
|
|
226
|
-
this.dimensionLookup = buildDimensionLookup(this.visualization, this.rawData.metaData, this.rawData.headers);
|
|
227
228
|
this.adaptiveClippingController = new AdaptiveClippingController(this);
|
|
228
229
|
const doColumnSubtotals = this.options.showColumnSubtotals && this.dimensionLookup.rows.length > 1;
|
|
229
230
|
const singularRow = this.dimensionLookup.rows.length === 1 && this.dimensionLookup.rows[0].count === 1;
|