@datarailsshared/dr_renderer 1.2.374 → 1.2.375
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 +1 -1
- package/src/highcharts_renderer.js +15 -9
package/package.json
CHANGED
@@ -8922,7 +8922,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
8922
8922
|
}
|
8923
8923
|
|
8924
8924
|
if (datesFields.length > 0) {
|
8925
|
-
|
8925
|
+
widget.pivot.invertedDateStringMap = {};
|
8926
8926
|
lodash.forEach(res, function (element) {
|
8927
8927
|
for (var i in datesFields) {
|
8928
8928
|
if (element.hasOwnProperty(datesFields[i].name)) {
|
@@ -8938,7 +8938,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
8938
8938
|
widget.pivot.dateValuesDictionary = {}
|
8939
8939
|
}
|
8940
8940
|
widget.pivot.dateValuesDictionary[dateStringValue] = element[datesFields[i].name];
|
8941
|
-
invertedDateStringMap[element[datesFields[i].name]] = dateStringValue;
|
8941
|
+
widget.pivot.invertedDateStringMap[element[datesFields[i].name]] = dateStringValue;
|
8942
8942
|
}
|
8943
8943
|
element[datesFields[i].name] = dateStringValue;
|
8944
8944
|
}
|
@@ -8949,7 +8949,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
8949
8949
|
|
8950
8950
|
lodash.forEach(['col_keys', 'row_keys', 'row_keys_by_cols'], (keysListName) => {
|
8951
8951
|
const widgetFields = keysListName === 'col_keys' ? widget.cols : widget.rows;
|
8952
|
-
highchartsRenderer
|
8952
|
+
highchartsRenderer
|
8953
|
+
.replaceSortingKeysWithMappedValues(lodash.get(keysObject, keysListName), widget.pivot.invertedDateStringMap, widgetFields);
|
8953
8954
|
});
|
8954
8955
|
}
|
8955
8956
|
});
|
@@ -9034,12 +9035,17 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
9034
9035
|
});
|
9035
9036
|
}
|
9036
9037
|
} else if (field.sorting && field.sorting.type == "CustomOrder" && field.sorting.values) {
|
9037
|
-
|
9038
|
-
|
9039
|
-
|
9040
|
-
|
9041
|
-
|
9042
|
-
|
9038
|
+
if (field.type === 'Date' && field.sorting.values.length && widget.pivot.invertedDateStringMap) {
|
9039
|
+
const fieldInList = lodash.find(datesFields, { name: field.name });
|
9040
|
+
fieldInList.values = lodash.map(field.sorting.values, value => widget.pivot.invertedDateStringMap[value] || value);
|
9041
|
+
} else {
|
9042
|
+
datesFields.push({
|
9043
|
+
"format": field.format,
|
9044
|
+
"name": field.name,
|
9045
|
+
"type": field.type,
|
9046
|
+
"values": field.sorting.values
|
9047
|
+
});
|
9048
|
+
}
|
9043
9049
|
}
|
9044
9050
|
});
|
9045
9051
|
|