@datarailsshared/dr_renderer 1.2.312 → 1.2.313

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.313",
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
  }