@datarailsshared/dr_renderer 1.2.449 → 1.2.451
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
@@ -154,7 +154,6 @@ const FEATURES = {
|
|
154
154
|
MULTIPLE_DIMENSION_TAGS: 'multiple_dimension_tags',
|
155
155
|
USE_NEW_SCENARIO_TAG: 'use_new_scenario_tag',
|
156
156
|
ENABLE_SERVER_WIDGET_DATA_SORTING: 'enable_server_widget_data_sorting',
|
157
|
-
CLIENT_WIDGET_SORTING_KEYS_MERGE: 'client_widget_sorting_keys_merge',
|
158
157
|
}
|
159
158
|
|
160
159
|
const TICKS_COUNT = 5;
|
@@ -209,7 +208,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
209
208
|
disableAnimation = document.ReportHippo.user.organization && document.ReportHippo.user.organization.settings && document.ReportHippo.user.organization.settings.disable_animation
|
210
209
|
highchartsRenderer.enabledNewWidgetValueFormatting = highchartsRenderer.hasFeature(FEATURES.ENABLE_NEW_WIDGET_VALUE_FORMATTING);
|
211
210
|
highchartsRenderer.isSortingOnBackendEnabled = highchartsRenderer.hasFeature(FEATURES.ENABLE_SERVER_WIDGET_DATA_SORTING);
|
212
|
-
highchartsRenderer.CLIENT_WIDGET_SORTING_KEYS_MERGE = highchartsRenderer.hasFeature(FEATURES.CLIENT_WIDGET_SORTING_KEYS_MERGE);
|
213
211
|
}
|
214
212
|
|
215
213
|
// fix issue of use tootip.stickOnContact with tooltip.outside , source: https://github.com/highcharts/highcharts/pull/15960
|
@@ -7435,7 +7433,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
7435
7433
|
name: 'Combo Chart ',
|
7436
7434
|
label: 'Combo Chart ',
|
7437
7435
|
title: 'Allows for multiple chart display formats in one widget',
|
7438
|
-
description: 'For example, Revenue and Cost of goods sold as
|
7436
|
+
description: 'For example, Revenue and Cost of goods sold as columns, and Gross margin as a line',
|
7439
7437
|
axisName: 'X - Axis',
|
7440
7438
|
legendName: 'Data series',
|
7441
7439
|
startedMessage: 'To add multiple chart types, click on “Combo Chart Options“. A Secondary Axis is available in this chart',
|
@@ -7446,7 +7444,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
7446
7444
|
name: 'Column Combo Chart ',
|
7447
7445
|
label: 'Column Chart',
|
7448
7446
|
title: 'Allows for multiple chart display formats in one widget',
|
7449
|
-
description: 'For example, Revenue and Cost of goods sold as
|
7447
|
+
description: 'For example, Revenue and Cost of goods sold as columns, and Gross margin as a line',
|
7450
7448
|
axisName: 'X - Axis',
|
7451
7449
|
legendName: 'Data series',
|
7452
7450
|
startedMessage: 'To add multiple chart types, click on “Combo Chart Options“. A Secondary Axis is available in this chart.',
|
@@ -7457,7 +7455,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
7457
7455
|
name: 'Stacked Column Combo Chart ',
|
7458
7456
|
label: 'Stacked Column',
|
7459
7457
|
title: 'Allows for multiple chart display formats in one widget.',
|
7460
|
-
description: 'For example, different department stacked
|
7458
|
+
description: 'For example, different department stacked columns, and average as a line.',
|
7461
7459
|
axisName: 'X - Axis',
|
7462
7460
|
legendName: 'Data series',
|
7463
7461
|
startedMessage: 'To add multiple chart types, click on “Combo Chart Options“. A Secondary Axis is available in this chart.',
|
@@ -9789,17 +9787,12 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
9789
9787
|
if (!sortingObjectToReturn) {
|
9790
9788
|
sortingObjectToReturn = lodash.clone(dataRow);
|
9791
9789
|
} else {
|
9792
|
-
|
9793
|
-
|
9794
|
-
|
9795
|
-
return lodash.chain(keysA).concat(keysB).uniqWith(lodash.isEqual).value();
|
9796
|
-
}
|
9797
|
-
sortingObjectToReturn.row_keys = concatUniqueKeys(sortingObjectToReturn.row_keys, dataRow.row_keys);
|
9798
|
-
sortingObjectToReturn.col_keys = concatUniqueKeys(sortingObjectToReturn.col_keys, dataRow.col_keys);
|
9799
|
-
} else {
|
9800
|
-
sortingObjectToReturn.row_keys = lodash.concat(sortingObjectToReturn.row_keys, dataRow.row_keys || []);
|
9790
|
+
const concatUniqueKeys = (keysA, keysB) => {
|
9791
|
+
if (!Array.isArray(keysB) || !keysB.length) return keysA;
|
9792
|
+
return lodash.chain(keysA).concat(keysB).uniqWith(lodash.isEqual).value();
|
9801
9793
|
}
|
9802
|
-
|
9794
|
+
sortingObjectToReturn.row_keys = concatUniqueKeys(sortingObjectToReturn.row_keys, dataRow.row_keys);
|
9795
|
+
sortingObjectToReturn.col_keys = concatUniqueKeys(sortingObjectToReturn.col_keys, dataRow.col_keys);
|
9803
9796
|
}
|
9804
9797
|
dataRow.isSortingObject = true;
|
9805
9798
|
}
|
@@ -5260,7 +5260,6 @@ describe('highcharts_renderer', () => {
|
|
5260
5260
|
});
|
5261
5261
|
|
5262
5262
|
it('should get sort object and remove from data rows (several object encounters - for more than one Values field) with merge cols and rows under FF', () => {
|
5263
|
-
highchartsRenderer.CLIENT_WIDGET_SORTING_KEYS_MERGE = true;
|
5264
5263
|
const expectedObj = {
|
5265
5264
|
col_keys: [['colKey1'], ['colKey2'], ['colKey3'], ['colKey4'], ['colKey5']],
|
5266
5265
|
row_keys: [['rowKey1'], ['rowKey2'], ['rowKey1', 'rowKey2'], ['rowKey3']],
|