@datarailsshared/dr_renderer 1.2.348 → 1.2.349

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.348",
3
+ "version": "1.2.349",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -8879,14 +8879,18 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8879
8879
  // if it is breakdown widget - redefine sorting according to breakdown_options
8880
8880
  // TODO: remove this when BE sort will be implemented
8881
8881
  lodash.forEach(rowsAndCols, function (field) {
8882
- const waterfallFieldType = field.id === widget.cols[0].id ? 'totals' : 'breakdown';
8883
- field.sorting = {
8884
- type: 'CustomOrder',
8885
- values: lodash.map(
8886
- widget.options.breakdown_options.values[waterfallFieldType],
8887
- value => value.key
8888
- ),
8889
- };
8882
+ const isBreakdownField = field.id !== widget.cols[0].id;
8883
+ if (isBreakdownField) {
8884
+ field.sorting = {
8885
+ type: 'CustomOrder',
8886
+ values: lodash.map(
8887
+ widget.options.breakdown_options.values.breakdown,
8888
+ value => value.key
8889
+ ),
8890
+ };
8891
+ } else {
8892
+ field.sorting = null;
8893
+ }
8890
8894
  });
8891
8895
  } else if (isCustomSorting) {
8892
8896
  lodash.forEach(rowsAndCols, function (field) {