@datarailsshared/dr_renderer 1.2.376 → 1.2.378

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.376",
3
+ "version": "1.2.378",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -1663,6 +1663,11 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1663
1663
  }
1664
1664
 
1665
1665
  const agg = pivotData.getAggregator([], keys);
1666
+
1667
+ if (keys[0] === 'Total') {
1668
+ agg.uniq = pivotData.allTotal.uniq;
1669
+ }
1670
+
1666
1671
  let val = agg.value();
1667
1672
 
1668
1673
  if (val != null && $.isNumeric(val)) {
@@ -8995,7 +9000,17 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8995
9000
  const isTwoColumnComparisonWidget = lodash.get(widget, 'options.breakdown_options.values.totals', []).length === 2;
8996
9001
  lodash.forEach(rowsAndCols, function (field) {
8997
9002
  const waterfallFieldType = field.id === widget.cols[0].id ? 'totals' : 'breakdown';
8998
- if (waterfallFieldType !== 'totals' || isTwoColumnComparisonWidget) {
9003
+
9004
+ if (field.type === 'Date') {
9005
+
9006
+ // set ascending date orders - due to issue with setting breakdown options order in webclient
9007
+ // this is for fixing already saved widgets with incorret order in breakdown options
9008
+ field.sorting = {
9009
+ is_absolute: false,
9010
+ sort_by: "field_items",
9011
+ type: "",
9012
+ };
9013
+ } else if (waterfallFieldType !== 'totals' || isTwoColumnComparisonWidget) {
8999
9014
  field.sorting = {
9000
9015
  type: 'CustomOrder',
9001
9016
  values: lodash.map(