@datarailsshared/dr_renderer 1.2.312 → 1.2.314

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.2.312",
3
+ "version": "1.2.314",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -1460,6 +1460,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1460
1460
  totalSeries.color = colors[i];
1461
1461
  }
1462
1462
 
1463
+ if (!lodash.isEmpty(pivotData.colTotals)) {
1463
1464
  col_n_keys.forEach(columnKey => {
1464
1465
  let key = columnKey;
1465
1466
  let totalKey = columnKey;
@@ -1470,6 +1471,18 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1470
1471
  const value = pivotData.colTotals[totalKey] ? pivotData.colTotals[totalKey].value() : 0;
1471
1472
  totalSeries.data.push({name: lodash.unescape(key), y: value});
1472
1473
  });
1474
+ } else {
1475
+ lodash.forEach(row_n_keys, (rowKey, index) => {
1476
+ let key = rowKey;
1477
+ let totalKey = rowKey;
1478
+ if (lodash.isArray(rowKey)) {
1479
+ key = col_n_keys[index];
1480
+ totalKey = totalKey.join(highchartsRenderer.delimer);
1481
+ }
1482
+ const value = pivotData.rowTotals[totalKey] ? pivotData.rowTotals[totalKey].value() : 0;
1483
+ totalSeries.data.push({name: lodash.unescape(key), y: value});
1484
+ });
1485
+ }
1473
1486
 
1474
1487
  chart_series.push(totalSeries);
1475
1488
  }
@@ -5503,18 +5516,12 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
5503
5516
  const fieldOb = lodash.find(fields, { id: filterObj.id });
5504
5517
  if (!fieldOb) return;
5505
5518
 
5506
- filterObj.values = filterObj.values && lodash.map(filterObj.values, highchartsRenderer.decodeFunc);
5507
- filterObj.includes = filterObj.includes && lodash.map(filterObj.includes, highchartsRenderer.decodeFunc);
5508
-
5509
- if (lodash.get(filterObj, 'values.datetype') === 'list') {
5510
- filterObj.values = lodash.map(filterObj.values.val, highchartsRenderer.decodeFunc);
5511
- }
5512
-
5513
- fieldOb.includes = filterObj.includes;
5514
- fieldOb.values = filterObj.values;
5515
-
5516
- if (filterObj.allow_nulls && fieldOb) {
5517
- fieldOb.allow_nulls = filterObj.allow_nulls;
5519
+ if (filterObj.is_exclude) {
5520
+ filterObj.excludes = filterObj.values && lodash.map(filterObj.values, highchartsRenderer.decodeFunc);
5521
+ fieldOb.excludes = filterObj.excludes;
5522
+ } else {
5523
+ filterObj.includes = filterObj.values && lodash.map(filterObj.values, highchartsRenderer.decodeFunc);
5524
+ fieldOb.includes = filterObj.includes;
5518
5525
  }
5519
5526
  });
5520
5527