@datarailsshared/dr_renderer 1.2.8 → 1.2.9

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/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ const getPublishedItemsRenderer = require('./published_items_renderer');
1
2
  const getHighchartsRenderer = require('./highcharts_renderer');
2
3
  const initPivotTable = require('./pivottable');
3
4
  const initDRPivotTable = require('./dr_pivottable');
@@ -15,8 +16,13 @@ dr_render_factory.init = function($, window, document, Handsontable){
15
16
  }
16
17
  }
17
18
 
18
- dr_render_factory.getInitHighchartsRenderer = function($, document, Highcharts, default_colors, highchartsRenderer, lodash, moment_lib){
19
- return getHighchartsRenderer($, document, Highcharts, default_colors, highchartsRenderer, DataFormatter, lodash, moment_lib);
19
+ dr_render_factory.getInitHighchartsRenderer = function($, document, Highcharts, default_colors, highchartsRenderer, lodash, moment_lib, isNewAngular){
20
+ return getHighchartsRenderer($, document, Highcharts, default_colors, highchartsRenderer, DataFormatter, lodash, moment_lib, isNewAngular);
20
21
  }
22
+
23
+ dr_render_factory.getInitPublishedItemsRenderer = function (publishedItemsRenderer, bind = {}) {
24
+ return getPublishedItemsRenderer.bind(bind)(publishedItemsRenderer);
25
+ }
26
+
21
27
  //const $ = require( "jquery" )( window );
22
28
  module.exports = dr_render_factory;
@@ -28,8 +28,6 @@ let initNovixRenderer = function($, window, document, Handsontable){
28
28
  const delim = " , ";
29
29
  const subtotal = "subtotalDatarailsPlaceholder";
30
30
  const replaceValue = "SubTotals";
31
- const useNewUx = document.ReportHippo && document.ReportHippo && document.ReportHippo.user &&
32
- document.ReportHippo.user.organization.settings && document.ReportHippo.user.organization.settings.use_new_ux;
33
31
 
34
32
  $.pivotUtilities.novix_renderers = {
35
33
 
@@ -68,6 +66,73 @@ let initNovixRenderer = function($, window, document, Handsontable){
68
66
  }
69
67
  };
70
68
 
69
+ var minColWidth = 50;
70
+ var maxColWidth = 250;
71
+
72
+ var calculateMaxWidths = function(ds) {
73
+ const mc = findMergeCols(ds);
74
+ return ds.data
75
+ .reduce((acc, row, index) => {
76
+ for (let [col, value] of row.entries()) {
77
+ if (value === subtotal) value = "SubTotals";
78
+ value = typeof value === 'number' ? String(value) : value;
79
+ if (
80
+ typeof value !== "undefined" &&
81
+ (!acc[col] || acc[col].len <= value.length) &&
82
+ !(index === ds.totalRows - 1 && col < ds.fixedColumns)
83
+ ) {
84
+ acc[col] = { str: value, len: value.length || 0, lastRow: index === ds.totalRows - 1 };
85
+ }
86
+ };
87
+ return acc;
88
+ }, new Array(ds.totalColumns).fill(null))
89
+ .map((item) => getTdWidth(item))
90
+ .reduce((acc, width, col, arr) => {
91
+ acc[col] = mc[col] ? getMergeColsWidth(arr, col, mc[col]) : width;
92
+ return acc;
93
+ }, {});
94
+ };
95
+
96
+ var getTdWidth = function(item) {
97
+ let tdStyles = {
98
+ borderLeft: 'solid 1px',
99
+ borderRight: 'solid 1px',
100
+ fontSize: '11px',
101
+ fontFamily: '"Open Sans",sans-serif',
102
+ fontWeight: item.lastRow && opts.chartOptions.table_options.show_row_total ? '700' : '400',
103
+ paddingRight: '4px',
104
+ paddingLeft: '4px',
105
+ wrap: 'nowrap',
106
+ visibility: 'hidden',
107
+ };
108
+ let td = document.createElement('td');
109
+ for (let [key, value] of _.entries(tdStyles)) {
110
+ td.style[key] = value;
111
+ };
112
+ td.innerHTML = item.str;
113
+ document.body.appendChild(td);
114
+ let width = Math.min(Math.max(td.offsetWidth, minColWidth), maxColWidth);
115
+ document.body.removeChild(td);
116
+ return width;
117
+ };
118
+
119
+ var findMergeCols = function(ds) {
120
+ return ds.mergeCells
121
+ .filter(cell => cell.row === ds.fixedRows - 1)
122
+ .reduce((acc, val) => {
123
+ if (!acc[val.col] && val.colspan > 1) acc[val.col] = val.colspan - 1;
124
+ return acc;
125
+ }, {});
126
+ };
127
+
128
+ var getMergeColsWidth = function(cw, col, m) {
129
+ let rightColsWidth = 0;
130
+ for (let _col = col + 1; _col <= col + m; _col++) {
131
+ rightColsWidth += cw[_col];
132
+ };
133
+ return rightColsWidth >= cw[col] ? 0 : cw[col] - rightColsWidth;
134
+ };
135
+
71
136
  opts = $.extend(def, opts, true);
72
137
 
73
138
  var headerRenderer = function (cellProperties) {
@@ -237,9 +302,17 @@ let initNovixRenderer = function($, window, document, Handsontable){
237
302
  dataSource.fixedColumns = pvtData.rowAttrs.length + (hasColumnAttr ? 1 : 0);
238
303
  dataSource.fixedRows = pvtData.colAttrs.length + (hasRowAttr ? 1 : 0);
239
304
 
305
+ for (let i = 0; i < pvtData.rowAttrs.length; i++) {
306
+ rowKeys.sort((a,b) => {
307
+ if (_.isEqual(a.slice(0, i), b.slice(0,i)) && a[i] && a[i] === subtotal) return -1;
308
+ if (_.isEqual(a.slice(0, i), b.slice(0,i)) && b[i] && b[i] === subtotal) return 1;
309
+ return 0;
310
+ });
311
+ };
312
+
240
313
  // for extra rows on edit mode. Where show only one dimension on row o column.
241
314
  var extraColumnLabel = "Grand Totals";
242
- var extraRowLabel = "";
315
+ var extraRowLabel = "Grand Totals";
243
316
  if (opts.totalFilterElements && opts.totalFilterElements.row_total) {
244
317
  extraColumnLabel = opts.totalFilterElements.row_total.innerHTML;
245
318
  }
@@ -303,13 +376,14 @@ let initNovixRenderer = function($, window, document, Handsontable){
303
376
  //data columns
304
377
  if (pvtData.colKeys.length > 0) {
305
378
 
379
+ const formattedColKeys = pvtData.getFormattedColKeys(colKeys);
306
380
  var aux = rowData.length;
307
381
  var startCol = aux;
308
- var prior = colKeys[0][nn];
382
+ var prior = formattedColKeys[0][nn];
309
383
  var toMerge = 0;
310
- for (var cc = 0; cc < colKeys.length; cc++) {
384
+ for (var cc = 0; cc < formattedColKeys.length; cc++) {
311
385
 
312
- var textHeader = colKeys[cc][nn];
386
+ var textHeader = formattedColKeys[cc][nn];
313
387
 
314
388
  if (nn < pvtData.colAttrs.length - 1 && prior != textHeader) {
315
389
  rowData.push(textHeader);
@@ -383,46 +457,40 @@ let initNovixRenderer = function($, window, document, Handsontable){
383
457
  // DATA
384
458
 
385
459
  var mergeDic = {};
460
+ const formattedRowKeys = pvtData.getFormattedRowKeys(rowKeys);
386
461
 
387
- for (var rr = 0; rr < rowKeys.length; rr++) {
462
+ for (var rr = 0; rr < formattedRowKeys.length; rr++) {
388
463
 
389
464
  var rowData = [];
390
465
 
466
+ if (rr == 0) {
467
+ for (var cc = 0; cc < dataSource.fixedColumns; cc++) {
468
+ mergeDic[cc] = {
469
+ toMerge: 1,
470
+ row: 0,
471
+ priorText: formattedRowKeys[rr][cc]
472
+ };
473
+ }
474
+ }
475
+
391
476
  //column for row atts
392
477
  for (var cc = 0; cc < pvtData.rowAttrs.length; cc++) {
393
-
394
- rowData.push(rowKeys[rr][cc]);
395
-
478
+ rowData.push(formattedRowKeys[rr][cc]);
479
+ if (formattedRowKeys[rr][cc] === subtotal) {
480
+ addMergeCell(rr + pvtData.colAttrs.length + 1, cc, 1, dataSource.fixedColumns - cc, true, true);
481
+ } else if (cc === formattedRowKeys[rr].length - 1 && hasColumnAttr) {
482
+ addMergeCell(rr + pvtData.colAttrs.length + 1, cc, 1, 2, true, true);
483
+ }
396
484
  // merge cell (last column)
397
- if (opts.chartOptions.table_options.show_column_total) {
398
-
399
- if (cc == rowKeys[rr].length - 1 && hasColumnAttr) {
400
- addMergeCell(rr + pvtData.colAttrs.length + 1, cc, 1, 2, true, true);
401
- }
402
- else {
403
- // init mergeDic
404
- if (rr == 0) {
405
- mergeDic[cc] = {
406
- toMerge: 1,
407
- row: 0,
408
- priorText: rowKeys[rr][cc]
409
- };
410
- }
411
- else if (mergeDic[cc]) { // check for merge dic
412
- if (rowKeys[rr][cc] == mergeDic[cc].priorText) {
413
- mergeDic[cc].toMerge++;
414
- }
415
- else { //create merge cell for this column
416
-
417
- if (cc < rowKeys[rr].length - 1) {
418
- addMergeCell(mergeDic[cc].row + pvtData.colAttrs.length + 1, cc, mergeDic[cc].toMerge, 1);
419
- mergeDic[cc].row = rr;
420
- mergeDic[cc].toMerge = 1;
421
- mergeDic[cc].priorText = rowKeys[rr][cc];
422
- }
423
- }
424
-
425
- }
485
+ if (opts.chartOptions.table_options.show_column_total && rr != 0 && mergeDic[cc]) { // check for merge dic
486
+ if (formattedRowKeys[rr][cc] == mergeDic[cc].priorText) {
487
+ mergeDic[cc].toMerge++;
488
+ } else if (cc < formattedRowKeys[rr].length - 1) {
489
+ //create merge cell for this column
490
+ addMergeCell(mergeDic[cc].row + pvtData.colAttrs.length + 1, cc, mergeDic[cc].toMerge, 1);
491
+ mergeDic[cc].row = rr;
492
+ mergeDic[cc].toMerge = 1;
493
+ mergeDic[cc].priorText = formattedRowKeys[rr][cc];
426
494
  }
427
495
  }
428
496
  }
@@ -457,7 +525,7 @@ let initNovixRenderer = function($, window, document, Handsontable){
457
525
  // var rowKeyAtt = rowKeys[rr].join(String.fromCharCode(0));
458
526
  var rowKeyAtt = rowKeys[rr].join(delim);
459
527
  if (pvtData.rowTotals[rowKeyAtt]) {
460
- let agg = pvtData.allTotal;
528
+ let agg = pvtData.getAggregator(rowKeys[rr], []);
461
529
  let preValue = pvtData.rowTotals[rowKeyAtt].value();
462
530
  let cellValue = $.pivotUtilities.getFormattedNumber(preValue, agg, opts);
463
531
  rowData.push(cellValue);
@@ -487,9 +555,6 @@ let initNovixRenderer = function($, window, document, Handsontable){
487
555
  // END DATA
488
556
  // ######
489
557
 
490
-
491
-
492
-
493
558
  // ######
494
559
  // TOTAL
495
560
  // colums totals area
@@ -514,7 +579,7 @@ let initNovixRenderer = function($, window, document, Handsontable){
514
579
 
515
580
  var colKeyAtt = colKeys[cc].join(delim);
516
581
  if (pvtData.colTotals[colKeyAtt]) {
517
- let agg = pvtData.allTotal;
582
+ let agg = pvtData.getAggregator([], colKeys[cc]);
518
583
  let preValue = pvtData.colTotals[colKeyAtt].value();
519
584
  let cellValue = $.pivotUtilities.getFormattedNumber(preValue, agg, opts);
520
585
  rowData.push(cellValue);
@@ -648,6 +713,10 @@ let initNovixRenderer = function($, window, document, Handsontable){
648
713
  td.innerHTML = "";
649
714
  }
650
715
 
716
+ if (opts.chartOptions.table_options.hide_nulls_in_headers && td.innerHTML === '[null]') {
717
+ td.innerHTML = '';
718
+ }
719
+
651
720
  if (opts.chartOptions.table_options.styles) {
652
721
  for (let rule of opts.chartOptions.table_options.styles) {
653
722
 
@@ -690,7 +759,6 @@ let initNovixRenderer = function($, window, document, Handsontable){
690
759
  }
691
760
  }
692
761
  }
693
-
694
762
  return td;
695
763
  };
696
764
 
@@ -758,6 +826,7 @@ let initNovixRenderer = function($, window, document, Handsontable){
758
826
  var $tableArea = opts.$el.find(".widget-id-" + opts.widgetId);
759
827
  $tableArea.empty();
760
828
  console.log('Handsontable data', dataSource);
829
+ var maxWidths = calculateMaxWidths(dataSource);
761
830
  table = new Handsontable($tableArea.get(0), {
762
831
  licenseKey: 'b0eda-7220b-32d15-e4128-c2f4c', //98463-b132b-fcea0-24f22-da020
763
832
  data: dataSource.data,
@@ -770,6 +839,9 @@ let initNovixRenderer = function($, window, document, Handsontable){
770
839
  fixedColumnsLeft: dataSource.fixedColumns,
771
840
  fixedRowsTop: dataSource.fixedRows,
772
841
  mergeCells: dataSource.mergeCells,
842
+ colWidths: function(index) {
843
+ return maxWidths[index];
844
+ },
773
845
  cells: function (row, col, prop) {
774
846
  var cellProperties = {};
775
847
  cellProperties.renderer = genericRenderer;
@@ -817,9 +889,14 @@ let initNovixRenderer = function($, window, document, Handsontable){
817
889
 
818
890
  // inject the widgetId to the class name so we can separate the tables by it
819
891
  // look for the search side on line 653 "opts.$el.find(".widget-id-" + opts.widgetId);"
820
- return `<div class='novixPivot widget-id-${opts.widgetId} ${
821
- useNewUx && opts.chartOptions.table_options.use_new_table_design ? 'handsontable-new' : ''
822
- }' style='overflow:auto'></div>`;
892
+ var tableClasses = ['novixPivot', `widget-id-${opts.widgetId}`];
893
+ if (opts.chartOptions.table_options.use_new_table_design) {
894
+ tableClasses.push('handsontable-new');
895
+ }
896
+ if (!pvtData.aggregator().uniq) {
897
+ tableClasses.push('numbers-to-right');
898
+ }
899
+ return `<div class='${tableClasses.join(' ')}' style='overflow:auto'></div>`;
823
900
  }
824
901
 
825
902
  };
package/src/pivot.css CHANGED
@@ -1,5 +1,9 @@
1
1
  .pvtUi { color: #333; }
2
2
 
3
+ .pivot-wrapper {
4
+ display: flex;
5
+ flex-direction: column;
6
+ }
3
7
 
4
8
  table.pvtTable {
5
9
  font-size: 8pt;
@@ -7,9 +11,8 @@ table.pvtTable {
7
11
  border-collapse: collapse;
8
12
  width: calc(100% - 30px);
9
13
  margin-bottom: 15px;
10
- margin-left: 15px;
11
- margin-right: 15px;
12
- font-family: 'Roboto-Regular',sans-serif;
14
+ font-family: 'Poppins', sans-serif;
15
+ font-weight: 400;
13
16
  user-select: text;
14
17
  }
15
18
  table.pvtTable thead tr th, table.pvtTable tbody tr th {
@@ -17,11 +20,14 @@ table.pvtTable thead tr th, table.pvtTable tbody tr th {
17
20
  border: 1px solid #CDCDCD;
18
21
  font-size: 8pt;
19
22
  padding: 5px;
20
- font-family: 'Roboto-Medium',sans-serif;
23
+ font-family: 'Poppins', sans-serif;
24
+ font-weight: 700;
21
25
  }
22
26
 
23
- table.pvtTable .pvtColLabel {text-align: center;}
24
- table.pvtTable .pvtTotalLabel {text-align: right;}
27
+ table.pvtTable thead tr th > i,
28
+ table.pvtTable tbody tr th > i {
29
+ font-size: 10px;
30
+ }
25
31
 
26
32
  table.pvtTable tbody tr td {
27
33
  color: #3D3D3D;
@@ -34,7 +40,7 @@ table.pvtTable tbody tr td {
34
40
 
35
41
  .pvtTotal, .pvtGrandTotal {
36
42
  font-weight: bold;
37
- font-family: 'Roboto-Bold',sans-serif;
43
+ font-family: 'Poppins', sans-serif;
38
44
  }
39
45
 
40
46
  .pvtVals { text-align: center; white-space: nowrap;}
@@ -140,6 +146,21 @@ table.pvtTable .pvtAxisLabel {
140
146
  white-space: nowrap;
141
147
  }
142
148
 
149
+ table.pvtTable .axis-freeze-pane {
150
+ position: relative;
151
+ z-index: 100;
152
+ }
153
+
154
+ table.pvtTable .vertical-freeze-pane {
155
+ position: relative;
156
+ z-index: 50;
157
+ }
158
+
159
+ table.pvtTable .horizontal-freeze-pane {
160
+ position: relative;
161
+ z-index: 50;
162
+ }
163
+
143
164
  .pvtRowSubtotal {
144
165
  background-color: #EFEFEF !important;
145
166
  font-weight:bold;
@@ -156,7 +177,7 @@ table.pvtTable .pvtAxisLabel {
156
177
 
157
178
 
158
179
  table.pvtTable.colorized thead tr th, table.pvtTable.colorized tbody tr th {
159
- background-color: transparent;
180
+ background-color: transparent ;
160
181
  /*border: none;*/
161
182
  }
162
183
 
@@ -165,7 +186,7 @@ table.pvtTable.colorized tbody tr td {
165
186
  }
166
187
 
167
188
  table.pvtTable.colorized .pvtRowSubtotal, table.pvtTable.colorized .pvtColSubtotal {
168
- background-color: transparent !important;
189
+ background-color: transparent !important;
169
190
  }
170
191
 
171
192
 
@@ -192,13 +213,13 @@ table.pvtTable.newPvtTable {
192
213
  width: calc(100% - 40px);
193
214
  margin-left: 20px;
194
215
  margin-right: 20px;
195
- font-family: 'Roboto',sans-serif;
216
+ font-family: 'Poppins', sans-serif;
196
217
  }
197
218
 
198
219
  table.pvtTable.newPvtTable thead tr th,
199
220
  table.pvtTable.newPvtTable tbody tr th {
200
221
  font-size: 10px;
201
- font-family: 'Roboto', sans-serif;
222
+ font-family: 'Poppins', sans-serif;
202
223
  }
203
224
 
204
225
  table.pvtTable.newPvtTable thead tr th {
@@ -216,6 +237,7 @@ table.pvtTable.newPvtTable thead tr th .dr-icon-minus {
216
237
  margin-right: 2px;
217
238
  margin-left: 1px;
218
239
  font-size: 8px;
240
+ color: #151a41;
219
241
  }
220
242
 
221
243
  table.pvtTable.newPvtTable.colorized tr th.colTotal,
@@ -238,11 +260,6 @@ table.pvtTable.newPvtTable tbody tr td.rowTotal {
238
260
  background-color: #dfe6ec !important;
239
261
  border-color: #ffffff !important;
240
262
  }
241
- table.pvtTable.newPvtTable .pvtColLabel,
242
- table.pvtTable.newPvtTable .pvtTotalLabel,
243
- table.pvtTable.newPvtTable .pvtTotalLabel.rowTotal {
244
- text-align: left;
245
- }
246
263
 
247
264
  table.pvtTable.newPvtTable tbody tr th .fa {
248
265
  padding: 2px;
@@ -262,6 +279,90 @@ table.pvtTable.newPvtTable tbody tr td {
262
279
  padding: 0 5px;
263
280
  vertical-align: middle;
264
281
  }
282
+
283
+ table.pvtTable thead tr th.axis-freeze-pane:before,
284
+ table.pvtTable thead tr th.vertical-freeze-pane:before,
285
+ table.pvtTable.newPvtTable thead tr th.axis-freeze-pane:before,
286
+ table.pvtTable.newPvtTable thead tr th.vertical-freeze-pane:before {
287
+ content: '';
288
+ width: calc(100% + 1px);
289
+ height: 1px;
290
+ background: white;
291
+ position: absolute;
292
+ top: -1px;
293
+ left: 0;
294
+ }
295
+
296
+ table.pvtTable thead tr th.axis-freeze-pane:before,
297
+ table.pvtTable thead tr th.vertical-freeze-pane:before {
298
+ background: #cdcdcd;
299
+ }
300
+
301
+ table.pvtTable thead tr th.axis-freeze-pane:after,
302
+ table.pvtTable thead tr th.vertical-freeze-pane:after,
303
+ table.pvtTable.newPvtTable thead tr th.axis-freeze-pane:after,
304
+ table.pvtTable.newPvtTable thead tr th.vertical-freeze-pane:after {
305
+ content: '';
306
+ width: 1px;
307
+ height: 100%;
308
+ background: white;
309
+ position: absolute;
310
+ right: -1px;
311
+ top: 0;
312
+ }
313
+ table.pvtTable thead tr th.axis-freeze-pane:after,
314
+ table.pvtTable thead tr th.vertical-freeze-pane:after {
315
+ background: #cdcdcd;
316
+ }
317
+
318
+ table.pvtTable tbody tr th.horizontal-freeze-pane:before,
319
+ table.pvtTable tbody tr td.horizontal-freeze-pane:before,
320
+ table.pvtTable.newPvtTable tbody tr th.horizontal-freeze-pane:before,
321
+ table.pvtTable.newPvtTable tbody tr td.horizontal-freeze-pane:before {
322
+ content: '';
323
+ width: calc(100% + 1px);
324
+ height: 1px;
325
+ background: #dfe6ec;
326
+ position: absolute;
327
+ top: -1px;
328
+ left: 0;
329
+ }
330
+ table.pvtTable tbody tr th.horizontal-freeze-pane:before,
331
+ table.pvtTable tbody tr td.horizontal-freeze-pane:before {
332
+ background: #cdcdcd;
333
+ }
334
+ table.pvtTable tbody tr th.colTotal.horizontal-freeze-pane:before,
335
+ table.pvtTable tbody tr td.colTotal.horizontal-freeze-pane:before {
336
+ background: transparent;
337
+ }
338
+
339
+ table.pvtTable tbody tr th.horizontal-freeze-pane:after,
340
+ table.pvtTable tbody tr td.horizontal-freeze-pane:after,
341
+ table.pvtTable.newPvtTable tbody tr th.horizontal-freeze-pane:after,
342
+ table.pvtTable.newPvtTable tbody tr td.horizontal-freeze-pane:after {
343
+ content: '';
344
+ width: 1px;
345
+ height: 100%;
346
+ background: #dfe6ec;
347
+ position: absolute;
348
+ right: -1px;
349
+ top: 0;
350
+ }
351
+
352
+ table.pvtTable tbody tr th.horizontal-freeze-pane:after,
353
+ table.pvtTable tbody tr td.horizontal-freeze-pane:after {
354
+ background: #cdcdcd;
355
+ }
356
+
357
+ table.pvtTable.newPvtTable tbody tr th.horizontal-freeze-pane.colTotal:after {
358
+ background: #fff;
359
+ }
360
+
361
+ table.pvtTable.colorized:not(.newPvtTable) tbody tr th.horizontal-freeze-pane,
362
+ table.pvtTable.newPvtTable.colorized tbody tr th.horizontal-freeze-pane:not(.highlighted):not(.colTotal) {
363
+ background-color: #fff !important;
364
+ }
365
+
265
366
  table.pvtTable.newPvtTable tbody tr th {
266
367
  vertical-align: top;
267
368
  padding-top: 2.5px;
@@ -290,7 +391,7 @@ table.pvtTable.newPvtTable tbody tr td:hover {
290
391
 
291
392
  table.pvtTable.newPvtTable tbody tr td.hover:after,
292
393
  table.pvtTable.newPvtTable tbody tr td:hover:after {
293
- content: "\e90c";
394
+ content: "\e923";
294
395
  width: 2px;
295
396
  color: #85889c;
296
397
  font: normal normal normal 14px/1 DataRails;
@@ -299,3 +400,27 @@ table.pvtTable.newPvtTable tbody tr td:hover:after {
299
400
  top: 4px;
300
401
  font-size: 12px;
301
402
  }
403
+
404
+
405
+ /* Table cells alignment */
406
+ table.pvtTable .pvtColLabel {text-align: center;}
407
+ table.pvtTable .pvtTotalLabel {text-align: right;}
408
+
409
+ table.pvtTable.newPvtTable .pvtColLabel,
410
+ table.pvtTable.newPvtTable .pvtTotalLabel,
411
+ table.pvtTable.newPvtTable .pvtTotalLabel.rowTotal {
412
+ text-align: left;
413
+ }
414
+
415
+ table.pvtTable thead tr th.pvtColLabel,
416
+ table.pvtTable thead tr th.pvtTotalLabel {
417
+ text-align: center !important;
418
+ }
419
+
420
+ table.pvtTable.numbers-to-right tbody tr td.pvtVal,
421
+ table.pvtTable.numbers-to-right tbody tr td.rowTotal.rowTotal,
422
+ table.pvtTable.numbers-to-right tbody tr td.pvtGrandTotal {
423
+ text-align: right;
424
+ padding-right: 9px;
425
+ line-height: 15px;
426
+ }