Skip to content

Commit b61725e

Browse files
committed
* added "% of Total" header text support for pivot tables (#459)
1 parent c4f06cc commit b61725e

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deep-see-web",
3-
"version": "4.0.24",
3+
"version": "4.0.25",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve --proxy-config=proxy.conf.samples-bi.js",

src/app/lib/lightPivotTable.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,10 +689,13 @@ DataController.prototype.resetRawData = function () {
689689
var group = ++groupNum,
690690
row;
691691
for (row = 0; row < data.info.topHeaderRowsNumber; row++) {
692+
var totalFunction = getTotalFunction(row, true);
693+
var headerText = totalFunction === _.TOTAL_FUNCTIONS.totalPERCENTAGE ?
694+
pivotLocale.get(5) : pivotLocale.get(0);
692695
rawData[row].push({
693696
group: group,
694697
isCaption: true,
695-
value: pivotLocale.get(0)
698+
value: headerText
696699
});
697700
}
698701
for (row = data.info.topHeaderRowsNumber; row < rawData.length; row++) {
@@ -2520,6 +2523,12 @@ PivotLocale.prototype.LOCALES = [
25202523
"en": "No data to display.",
25212524
"de": "Keine Daten zum anzeigen.",
25222525
"cs": "Žádná data k zobrazení"
2526+
},
2527+
{ // 5
2528+
"ru": "% от Всего",
2529+
"en": "% of Total",
2530+
"de": "% des Summe",
2531+
"cs": "% z Celkem"
25232532
}
25242533
];
25252534

src/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#### 4.0.25
2+
* added "% of Total" header text support for pivot tables (#459)
3+
14
#### 4.0.24
25
* fixed issue with total function and pivot (#459)
36

0 commit comments

Comments
 (0)