@datarailsshared/dr_renderer 1.2.257 → 1.2.259

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.259",
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({
@@ -7259,8 +7262,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7259
7262
  [highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH]: {
7260
7263
  name: 'Walkthrough Chart',
7261
7264
  label: 'Walkthrough Chart',
7262
- title: 'Drag one or more fields to configure your x-axis.',
7263
- description: 'The category is shown on the x-axis and should be between 2 to 10 columns.',
7265
+ title: 'Describe and explain changes in your financial outcomes.',
7266
+ description: 'For example, describe the gaps between income and your gross profit.',
7264
7267
  titleInEditor: 'Waterfall walkthrough widget.',
7265
7268
  descriptionInEditor: 'This chart visualizes the cumulative effect of positive and negative changes on an initial value, ultimately showing the net value. You can change the trend of each item and add new totals columns using the Walkthrough options button.',
7266
7269
  axisName: 'Category',
@@ -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)