@datarailsshared/dr_renderer 1.2.257 → 1.2.258

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.257",
3
+ "version": "1.2.258",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -1470,7 +1470,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1470
1470
  val = 0;
1471
1471
  }
1472
1472
 
1473
- if (val > 0 && value.trend === 'decrease' || val < 0 && value.trend === 'increase' ) {
1473
+ if (value.trend === 'decrease') {
1474
1474
  val = val * -1;
1475
1475
  }
1476
1476
 
@@ -1482,12 +1482,15 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1482
1482
 
1483
1483
  const name = value.trend === 'total' ? value.formattedKey || value.key[0] : keys.join(highchartsRenderer.delimer);
1484
1484
  let color = '';
1485
- if (value.color) {
1485
+
1486
+ if (!lodash.get(waterfallOptions, 'colors', {}) && value.color) {
1486
1487
  color = value.color;
1488
+ } else if (value.trend === 'total') {
1489
+ color = lodash.get(waterfallOptions, 'colors', {}).total || baseColor.total;
1487
1490
  } else {
1488
- color = lodash.get(waterfallOptions, 'colors', {})
1489
- ? lodash.get(waterfallOptions, 'colors', {})[value.trend]
1490
- : baseColor[value.trend];
1491
+ color = val > 0
1492
+ ? lodash.get(waterfallOptions, 'colors', {}).increase || baseColor.increase
1493
+ : lodash.get(waterfallOptions, 'colors', {}).decrease || baseColor.decrease;
1491
1494
  }
1492
1495
 
1493
1496
  resultObject.data.push({
@@ -8936,7 +8939,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8936
8939
  pivot.sorters = highchartsRenderer.getWidgetDataSorters(res, widget_obj);
8937
8940
  pivot.rowData = res;
8938
8941
  widget_obj.options = highchartsRenderer.parseOptionsToObject(widget_obj.options);
8939
-
8942
+
8940
8943
  if (templateNoData) {
8941
8944
  let hasServerDrill = widget_obj.chart_type.indexOf("column-chart") > -1 && widget_obj.cols && widget_obj.cols.length >= 1;
8942
8945
  if (hasServerDrill)