@datarailsshared/dr_renderer 1.5.100 → 1.5.105

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.5.100",
3
+ "version": "1.5.105",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -10,8 +10,6 @@ let initDRPivotTable = function($, window, document) {
10
10
  const newTableColors = ['rgb(127, 196, 255)', 'rgb(200, 243,243)', 'rgb(247, 161, 173)', 'rgb(255, 237, 178)', 'rgb(221, 239, 255)',
11
11
  'rgb(171, 216, 255)', 'rgb(174, 231, 220)', 'rgb(227, 255, 236)', 'rgb(162, 215, 227)', 'rgb(223, 239, 236)'];
12
12
 
13
- const useNewUx = document.ReportHippo && document.ReportHippo && document.ReportHippo.user &&
14
- document.ReportHippo.user.organization.settings && document.ReportHippo.user.organization.settings.use_new_ux;
15
13
  // const numberOfRows = 500; // change to activate the handsontable when num of rows bigger then this.
16
14
 
17
15
  DRPivotData = (function(superClass) {
@@ -437,7 +435,7 @@ let initDRPivotTable = function($, window, document) {
437
435
  colors = newTableColors;
438
436
  }
439
437
 
440
- var isNewDesign = useNewUx && opts.chartOptions.table_options.use_new_table_design;
438
+ var isNewDesign = opts.chartOptions && opts.chartOptions.table_options && opts.chartOptions.table_options.use_new_table_design;
441
439
  if (value) {
442
440
  var offset = parseInt(value);
443
441
  if (offset) {
@@ -500,12 +498,12 @@ let initDRPivotTable = function($, window, document) {
500
498
  };
501
499
 
502
500
  createTotalValsBolder = function(element){
503
- if(opts.chartOptions.table_options.colorize_headers == true && (!useNewUx || !opts.chartOptions.table_options.use_new_table_design)){
501
+ if(opts.chartOptions.table_options.colorize_headers == true && (!opts.chartOptions.table_options.use_new_table_design)){
504
502
  element.style.setProperty("border-bottom", "3px double #000000", "important");
505
503
  }
506
504
  };
507
505
  createGrandTotalBolder = function(element){
508
- if(opts.chartOptions.table_options.colorize_headers == true && (!useNewUx || !opts.chartOptions.table_options.use_new_table_design)){
506
+ if(opts.chartOptions.table_options.colorize_headers == true && (!opts.chartOptions.table_options.use_new_table_design)){
509
507
  element.style.setProperty("border-top", "3px solid #000000", "important");
510
508
  }
511
509
  };
@@ -173,7 +173,7 @@ const FEATURES = helpers.FEATURES;
173
173
  const TICKS_COUNT = 5;
174
174
 
175
175
  let getHighchartsRenderer = function ($, document, Highcharts, default_colors, highchartsRenderer,
176
- DataFormatter, lodash, moment_lib, isNewAngular) {
176
+ DataFormatter, lodash, moment_lib, isNewAngular, envOptions) {
177
177
 
178
178
  /** Highcharts initial configuration section **/
179
179
  if(!lodash){
@@ -214,6 +214,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
214
214
 
215
215
  highchartsRenderer.enabledNewWidgetValueFormatting = false;
216
216
  let disableAnimation = false;
217
+ const environment = envOptions || {};
218
+ highchartsRenderer.environment = environment;
217
219
 
218
220
  const _handleComputationalError = (err, onlyOptions) => {
219
221
  if (err instanceof BaseRendererError) {
@@ -244,13 +246,14 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
244
246
  }
245
247
 
246
248
  highchartsRenderer.hasFeature = function(featureFlagKey) {
247
- return lodash.includes(lodash.get(document, 'ReportHippo.user.features', []), featureFlagKey);
249
+ return lodash.includes(highchartsRenderer.features || [], featureFlagKey);
248
250
  }
249
-
250
- if (!!lodash.get(document, 'ReportHippo.user')) {
251
- disableAnimation = document.ReportHippo.user.organization && document.ReportHippo.user.organization.settings && document.ReportHippo.user.organization.settings.disable_animation
251
+ highchartsRenderer.setFeatures = function(features) {
252
+ highchartsRenderer.features = features || [];
252
253
  highchartsRenderer.enabledNewWidgetValueFormatting = highchartsRenderer.hasFeature(FEATURES.ENABLE_NEW_WIDGET_VALUE_FORMATTING);
253
254
  }
255
+ highchartsRenderer.setFeatures(lodash.get(environment, 'features', []));
256
+ disableAnimation = !!lodash.get(environment, 'disable_animation', false);
254
257
 
255
258
  // fix issue of use tootip.stickOnContact with tooltip.outside , source: https://github.com/highcharts/highcharts/pull/15960
256
259
  // TODO: remove it after it is fixed in highcharts library new version
@@ -676,6 +679,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
676
679
  }
677
680
 
678
681
  try {
682
+ const aggr = pivotData.getAggregator(rows, cols);
679
683
  const percentageArray = [];
680
684
 
681
685
  if (is_drill_down_pie && !highchartsRenderer.selfStartsWith(series_name, "Series ") && !isChartWithMultiValues) {
@@ -684,7 +688,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
684
688
  rows = temp;
685
689
  }
686
690
 
687
- if (!is_drill_down_pie && labelOptions.show_out_of_x_axis) {
691
+ if (!is_drill_down_pie && labelOptions.show_out_of_x_axis && aggr.widget_values_format !== "#,###%") {
688
692
  const axisTotal = pivotData.getAggregator([], cols).value();
689
693
  if (value && axisTotal) {
690
694
  percentageArray.push(Math.round(value / axisTotal * 100) + '%');
@@ -719,8 +723,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
719
723
 
720
724
  highchartsRenderer.replaceDrOthersKeys(cols, rows, drOthersInAxis, othersName);
721
725
 
722
- var aggr = pivotData.getAggregator(rows, cols);
723
-
724
726
  let formattedValue = is_drill_down_pie || labelOptions.show_value ? $.pivotUtilities.getFormattedNumber(value, aggr, opts, true) : '';
725
727
  formattedValue = removeNumberFormatValueUnitSign(formattedValue, labelOptions);
726
728
  return String(formattedValue) + percentageWrapper;
@@ -898,7 +900,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
898
900
  }
899
901
 
900
902
  const percentageArray = [];
901
- if (tooltipOptions.show_out_of_x_axis) {
903
+ if (tooltipOptions.show_out_of_x_axis && aggr.widget_values_format !== "#,###%") {
902
904
  const axisTotal = pivotData.getAggregator([], cols).value();
903
905
  const outOfAxisPercentages = axisTotal ? Math.round(y / axisTotal * 100) + '%' : '';
904
906
  outOfAxisPercentages && percentageArray.push(`% Out of ${percentageLabels.axis}: ${outOfAxisPercentages}`);
@@ -964,7 +966,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
964
966
  tempAr[temp_len - 1] = highchartsRenderer.getFieldName(colAttrs[j]);
965
967
  }
966
968
 
967
- const formattedColKeys = highchartsRenderer.getFormattedColKeys(pivotData, null);
969
+ const formattedColKeys = highchartsRenderer.getFormattedColKeys(pivotData, null, true);
968
970
  tempAr = tempAr.concat(lodash.map(formattedColKeys, function (row) {
969
971
  return row[j];
970
972
  }));
@@ -9440,11 +9442,11 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
9440
9442
  }
9441
9443
 
9442
9444
  highchartsRenderer.getFiscalYearMonthModifier = function() {
9443
- return lodash.get(document, 'ReportHippo.user.organization.fiscal_year_starts_from', 1) - 1;
9445
+ return lodash.get(highchartsRenderer, 'environment.fiscal_year_starts_from', 1) - 1;
9444
9446
  }
9445
9447
 
9446
9448
  highchartsRenderer.isFiscalYearBackEnabled = function() {
9447
- return lodash.get(document, 'ReportHippo.user.organization.fiscal_year_back');
9449
+ return lodash.get(highchartsRenderer, 'environment.fiscal_year_back');
9448
9450
  }
9449
9451
 
9450
9452
  highchartsRenderer.getTimeframeByFormat = function(format) {
@@ -9504,7 +9506,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
9504
9506
  }
9505
9507
 
9506
9508
  // Method for getting formatted kyes for Axis (cols, rows)
9507
- highchartsRenderer.getFormattedKey = function (initialKey, pivotData, type) {
9509
+ highchartsRenderer.getFormattedKey = function (initialKey, pivotData, type, forceFormatDates) {
9508
9510
  const isFlatKey = lodash.isString(initialKey) || lodash.isNumber(initialKey);
9509
9511
  if (isFlatKey || lodash.isArray(initialKey)) {
9510
9512
  let values = isFlatKey ? initialKey.toString().split(highchartsRenderer.delimer) : lodash.cloneDeep(initialKey);
@@ -9513,7 +9515,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
9513
9515
  const formatInfo = pivotData[type][key] || {};
9514
9516
  const valueToFloat = parseFloat(value);
9515
9517
  const isDate = formatInfo.type === 'Date' && (moment_lib(valueToFloat).isValid() || moment_lib(value, formatInfo.format).isValid());
9516
- const isDateFormatting = isDate && highchartsRenderer.isFormattingDatesAsOtherAxisTypes();
9518
+ const isDateFormatting = isDate && (forceFormatDates || highchartsRenderer.isFormattingDatesAsOtherAxisTypes());
9517
9519
  const isNumberFormatting = !isDate && formatInfo.format && highchartsRenderer.isFormattingNumberAxis(pivotData);
9518
9520
 
9519
9521
  if (isNumberFormatting || isDateFormatting) {
@@ -9541,13 +9543,13 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
9541
9543
  return highchartsRenderer.getFormattedKey(initialValue, pivotData, 'rowFormats')
9542
9544
  }
9543
9545
 
9544
- highchartsRenderer.getFormattedKeys = function(pivotData, isCols, keys) {
9546
+ highchartsRenderer.getFormattedKeys = function(pivotData, isCols, keys, forceFormatDates) {
9545
9547
  keys = keys || (isCols ? pivotData.getColKeys() : pivotData.getRowKeys());
9546
- return lodash.map(keys, key => highchartsRenderer.getFormattedKey(key, pivotData, isCols ? 'colFormats' : 'rowFormats'));
9548
+ return lodash.map(keys, key => highchartsRenderer.getFormattedKey(key, pivotData, isCols ? 'colFormats' : 'rowFormats', forceFormatDates));
9547
9549
  }
9548
9550
 
9549
- highchartsRenderer.getFormattedColKeys = function(pivotData, keys) {
9550
- return highchartsRenderer.getFormattedKeys(pivotData, true, keys);
9551
+ highchartsRenderer.getFormattedColKeys = function(pivotData, keys, forceFormatDates) {
9552
+ return highchartsRenderer.getFormattedKeys(pivotData, true, keys, forceFormatDates);
9551
9553
  }
9552
9554
 
9553
9555
  highchartsRenderer.getFormattedRowKeys = function(pivotData, keys) {
package/src/index.d.ts CHANGED
@@ -31,6 +31,13 @@ declare namespace DrRenderFactory {
31
31
  isNewAngular: boolean;
32
32
  }
33
33
 
34
+ interface EnvironmentOptions {
35
+ features?: string[];
36
+ disable_animation?: boolean;
37
+ fiscal_year_starts_from?: number;
38
+ fiscal_year_back?: boolean;
39
+ }
40
+
34
41
  interface Factory {
35
42
  init($: any, window: Window, document: Document, Handsontable?: any): void;
36
43
  getInitHighchartsRenderer(
@@ -41,12 +48,13 @@ declare namespace DrRenderFactory {
41
48
  highchartsRenderer: any,
42
49
  lodash: any,
43
50
  moment_lib: any,
44
- isNewAngular: boolean
51
+ isNewAngular: boolean,
52
+ envOptions?: EnvironmentOptions
45
53
  ): any;
46
54
  getInitPublishedItemsRenderer(publishedItemsRenderer: any, bind?: any): any;
47
55
 
48
56
  DataFormatter: typeof DataFormatterType;
49
-
57
+
50
58
  // Error types and classes
51
59
  RendererErrorCodes: typeof ErrorTypes.RendererErrorCodes;
52
60
  BaseRendererError: typeof ErrorTypes.BaseRendererError;
package/src/index.js CHANGED
@@ -17,8 +17,8 @@ dr_render_factory.init = function($, window, document, Handsontable){
17
17
  }
18
18
  }
19
19
 
20
- dr_render_factory.getInitHighchartsRenderer = function($, document, Highcharts, default_colors, highchartsRenderer, lodash, moment_lib, isNewAngular){
21
- return getHighchartsRenderer($, document, Highcharts, default_colors, highchartsRenderer, DataFormatter, lodash, moment_lib, isNewAngular);
20
+ dr_render_factory.getInitHighchartsRenderer = function($, document, Highcharts, default_colors, highchartsRenderer, lodash, moment_lib, isNewAngular, envOptions){
21
+ return getHighchartsRenderer($, document, Highcharts, default_colors, highchartsRenderer, DataFormatter, lodash, moment_lib, isNewAngular, envOptions);
22
22
  }
23
23
 
24
24
  dr_render_factory.getInitPublishedItemsRenderer = function (publishedItemsRenderer, bind = {}) {
@@ -465,7 +465,8 @@ describe('highcharts_renderer', () => {
465
465
  getColKeys: jest.fn(() => [['col1'], ['col2']]),
466
466
  getRowKeys: jest.fn(() => [['row1'], ['row2']]),
467
467
  getAggregator: jest.fn(() => ({
468
- value: () => 1000
468
+ value: () => 1000,
469
+ widget_values_format: "#,###"
469
470
  }))
470
471
  };
471
472
 
@@ -654,7 +655,7 @@ describe('highcharts_renderer', () => {
654
655
  });
655
656
 
656
657
  describe('Label options handling', () => {
657
- it('should return raw value when show_out_of_x_axis is true but percentage logic is not triggered', () => {
658
+ it('should return raw value when show_out_of_x_axis is true but percentage logic is not triggered due to percentage format', () => {
658
659
  opts = {
659
660
  chartOptions: {
660
661
  label: {
@@ -665,7 +666,10 @@ describe('highcharts_renderer', () => {
665
666
  };
666
667
 
667
668
  funcContext.y = 250;
668
- mockPivotData.getAggregator = jest.fn(() => ({ value: () => 1000 }));
669
+ mockPivotData.getAggregator = jest.fn(() => ({
670
+ value: () => 1000,
671
+ widget_values_format: "#,###%"
672
+ }));
669
673
 
670
674
  let fn = highchartsRenderer.defaultDataLabelFormatter(mockPivotData, opts);
671
675
  let result = fn.call(funcContext);
@@ -684,7 +688,10 @@ describe('highcharts_renderer', () => {
684
688
  };
685
689
 
686
690
  funcContext.y = 200;
687
- mockPivotData.getAggregator = jest.fn(() => ({ value: () => 800 }));
691
+ mockPivotData.getAggregator = jest.fn(() => ({
692
+ value: () => 800,
693
+ widget_values_format: "#,###"
694
+ }));
688
695
 
689
696
  let fn = highchartsRenderer.defaultDataLabelFormatter(mockPivotData, opts);
690
697
  let result = fn.call(funcContext);
@@ -692,7 +699,7 @@ describe('highcharts_renderer', () => {
692
699
  expect(result).toBe('200');
693
700
  });
694
701
 
695
- it('should return raw value when both percentage options are enabled but percentage logic is not triggered', () => {
702
+ it('should return raw value when both percentage options are enabled but percentage logic is not triggered due to percentage format', () => {
696
703
  opts = {
697
704
  chartOptions: {
698
705
  label: {
@@ -707,7 +714,10 @@ describe('highcharts_renderer', () => {
707
714
  let callCount = 0;
708
715
  mockPivotData.getAggregator = jest.fn(() => {
709
716
  callCount++;
710
- return { value: () => callCount === 1 ? 1000 : 800 };
717
+ return {
718
+ value: () => callCount === 1 ? 1000 : 800,
719
+ widget_values_format: "#,###%"
720
+ };
711
721
  });
712
722
 
713
723
  let fn = highchartsRenderer.defaultDataLabelFormatter(mockPivotData, opts);
@@ -716,7 +726,7 @@ describe('highcharts_renderer', () => {
716
726
  expect(result).toBe('250');
717
727
  });
718
728
 
719
- it('should show only percentages without value when show_value is false but percentages are enabled', () => {
729
+ it('should show only percentages without value when show_value is false and percentages are enabled', () => {
720
730
  opts = {
721
731
  chartOptions: {
722
732
  label: {
@@ -727,7 +737,10 @@ describe('highcharts_renderer', () => {
727
737
  };
728
738
 
729
739
  funcContext.y = 250;
730
- mockPivotData.getAggregator = jest.fn(() => ({ value: () => 1000 }));
740
+ mockPivotData.getAggregator = jest.fn(() => ({
741
+ value: () => 1000,
742
+ widget_values_format: "#,###"
743
+ }));
731
744
 
732
745
  let fn = highchartsRenderer.defaultDataLabelFormatter(mockPivotData, opts);
733
746
  let result = fn.call(funcContext);
@@ -746,7 +759,10 @@ describe('highcharts_renderer', () => {
746
759
  };
747
760
 
748
761
  funcContext.y = 0;
749
- mockPivotData.getAggregator = jest.fn(() => ({ value: () => 1000 }));
762
+ mockPivotData.getAggregator = jest.fn(() => ({
763
+ value: () => 1000,
764
+ widget_values_format: "#,###"
765
+ }));
750
766
 
751
767
  let fn = highchartsRenderer.defaultDataLabelFormatter(mockPivotData, opts);
752
768
  let result = fn.call(funcContext);
@@ -765,7 +781,10 @@ describe('highcharts_renderer', () => {
765
781
  };
766
782
 
767
783
  funcContext.y = 250;
768
- mockPivotData.getAggregator = jest.fn(() => ({ value: () => 0 }));
784
+ mockPivotData.getAggregator = jest.fn(() => ({
785
+ value: () => 0,
786
+ widget_values_format: "#,###"
787
+ }));
769
788
 
770
789
  let fn = highchartsRenderer.defaultDataLabelFormatter(mockPivotData, opts);
771
790
  let result = fn.call(funcContext);
@@ -828,11 +847,10 @@ describe('highcharts_renderer', () => {
828
847
  funcContext.y = 300;
829
848
  mockPivotData.getRowKeys = jest.fn(() => ([['row1'], ['row2']]));
830
849
 
831
- let callCount = 0;
832
850
  mockPivotData.getAggregator = jest.fn((rows, cols) => {
833
- if (rows.length === 1) return { value: () => 400 };
834
- if (rows.length === 0 && cols.length > 0) return { value: () => 1200 };
835
- return { value: () => 800 };
851
+ if (rows.length === 1) return { value: () => 400, widget_values_format: "#,###" };
852
+ if (rows.length === 0 && cols.length > 0) return { value: () => 1200, widget_values_format: "#,###" };
853
+ return { value: () => 800, widget_values_format: "#,###" };
836
854
  });
837
855
 
838
856
  let fn = highchartsRenderer.defaultDataLabelFormatter(mockPivotData, opts);
@@ -854,18 +872,10 @@ describe('highcharts_renderer', () => {
854
872
  funcContext.y = 200; // value = 200
855
873
  mockPivotData.getRowKeys = jest.fn(() => ([['row1'], ['row2']]));
856
874
 
857
- let callCount = 0;
858
875
  mockPivotData.getAggregator = jest.fn((rows, cols) => {
859
- callCount++;
860
-
861
- if (rows.length === 1) {
862
- return { value: () => 400 };
863
- }
864
- if (rows.length === 0 && cols.length > 0) {
865
- return { value: () => 0 };
866
- }
867
-
868
- return { value: () => 200 };
876
+ if (rows.length === 1) return { value: () => 400, widget_values_format: "#,###" };
877
+ if (rows.length === 0 && cols.length > 0) return { value: () => 0, widget_values_format: "#,###" };
878
+ return { value: () => 200, widget_values_format: "#,###" };
869
879
  });
870
880
 
871
881
  let fn = highchartsRenderer.defaultDataLabelFormatter(mockPivotData, opts);
@@ -890,9 +900,9 @@ describe('highcharts_renderer', () => {
890
900
 
891
901
  mockPivotData.getAggregator = jest.fn((rows, cols) => {
892
902
  if (cols.length === 0) {
893
- return { value: () => 0 };
903
+ return { value: () => 0, widget_values_format: "#,###" };
894
904
  }
895
- return { value: () => 200 };
905
+ return { value: () => 200, widget_values_format: "#,###" };
896
906
  });
897
907
 
898
908
  let fn = highchartsRenderer.defaultDataLabelFormatter(mockPivotData, opts);
@@ -1624,7 +1634,7 @@ describe('highcharts_renderer', () => {
1624
1634
 
1625
1635
  describe('dynamic system fields', () => {
1626
1636
  it('should count Scenario & Budget Cycle as system field', () => {
1627
- lodash.set(document, 'ReportHippo.user.features', ['multiple_dimension_tags', 'use_new_scenario_tag']);
1637
+ highchartsRenderer.setFeatures(['multiple_dimension_tags', 'use_new_scenario_tag']);
1628
1638
 
1629
1639
  const fieldWithScenario = { name: 'Scenario' };
1630
1640
  expect(highchartsRenderer.isSystemField(fieldWithScenario)).toBe(true);
@@ -5085,7 +5095,7 @@ describe('highcharts_renderer', () => {
5085
5095
  });
5086
5096
 
5087
5097
  it('should return formatted multivalue colKey as array (format_dates_as_other_axis_types is ON)', () => {
5088
- lodash.set(document, 'ReportHippo.user.features', ['format_dates_as_other_axis_types']);
5098
+ highchartsRenderer.setFeatures(['format_dates_as_other_axis_types']);
5089
5099
  const initialKey = [1687277052, 1687277052];
5090
5100
  const pivotData = {
5091
5101
  colFormats: [{ type: 'Date', format: 'MM/DD/YYYY' }, { type: 'Date', format: 'MMM-yy' }],
@@ -5097,7 +5107,7 @@ describe('highcharts_renderer', () => {
5097
5107
  });
5098
5108
 
5099
5109
  it('should return formatted multivalue rowKey as array (format_dates_as_other_axis_types is ON)', () => {
5100
- lodash.set(document, 'ReportHippo.user.features', ['format_dates_as_other_axis_types']);
5110
+ highchartsRenderer.setFeatures(['format_dates_as_other_axis_types']);
5101
5111
  const initialKey = [1687277052, 1687277052];
5102
5112
  const pivotData = {
5103
5113
  rowFormats: [{ type: 'Date', format: 'MM/DD/YYYY' }, { type: 'Date', format: 'MMM-yy' }],
@@ -5109,7 +5119,7 @@ describe('highcharts_renderer', () => {
5109
5119
  });
5110
5120
 
5111
5121
  it('should return NOT formatted multivalue colKey as array (format_dates_as_other_axis_types is OFF)', () => {
5112
- lodash.set(document, 'ReportHippo.user.features', []);
5122
+ highchartsRenderer.setFeatures([]);
5113
5123
  const initialKeyAlreadyFormatted = ['10/10/2020', '10/10/2021'];
5114
5124
  const pivotData = {
5115
5125
  colFormats: [{ type: 'Date', format: 'MM/DD/YYYY' }, { type: 'Date', format: 'MMM-yy' }],
@@ -5121,7 +5131,7 @@ describe('highcharts_renderer', () => {
5121
5131
  });
5122
5132
 
5123
5133
  it('should return NOT formatted multivalue rowKey as array (format_dates_as_other_axis_types is OFF)', () => {
5124
- lodash.set(document, 'ReportHippo.user.features', []);
5134
+ highchartsRenderer.setFeatures([]);
5125
5135
  const initialKeyAlreadyFormatted = ['10/10/2020', '10/10/2021'];
5126
5136
  const pivotData = {
5127
5137
  rowFormats: [{ type: 'Date', format: 'MM/DD/YYYY' }, { type: 'Date', format: 'MMM-yy' }],
@@ -5266,7 +5276,7 @@ describe('highcharts_renderer', () => {
5266
5276
 
5267
5277
  it('should getFormattedColKeys call getFormattedKeys for colFormats', () => {
5268
5278
  highchartsRenderer.getFormattedColKeys('test1', 'test2');
5269
- expect(highchartsRenderer.getFormattedKeys).toHaveBeenCalledWith('test1', true, 'test2');
5279
+ expect(highchartsRenderer.getFormattedKeys).toHaveBeenCalledWith('test1', true, 'test2', undefined);
5270
5280
  });
5271
5281
 
5272
5282
  it('should getFormattedRowKeys call getFormattedKeys for rowFormats', () => {
@@ -5501,6 +5511,8 @@ describe('highcharts_renderer', () => {
5501
5511
  let aggregator = highchartsRenderer.rhPivotAggregatorSum([''], format, true, {}, {});
5502
5512
  const agg = aggregator({}, '', '');
5503
5513
 
5514
+ agg.widget_values_format = format;
5515
+
5504
5516
  if (lodash.isEqual(cols, ['col 1']) && lodash.isEqual(rows, ['row 1'])) {
5505
5517
  agg.sum = 12345;
5506
5518
  } else if (lodash.isEqual(cols, ['col 1']) && lodash.isEqual(rows, [])) {