@datarailsshared/dr_renderer 1.2.174-dragons → 1.2.175-dragons
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
|
@@ -5,6 +5,7 @@ const SERIES_CLASSNAMES = {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
const EMPTY_ROW_N_KEYS = [[]];
|
|
8
|
+
const NULL_VALUE = '[null]';
|
|
8
9
|
|
|
9
10
|
let getHighchartsRenderer = function ($, document, Highcharts, default_colors, highchartsRenderer,
|
|
10
11
|
DataFormatter, lodash, moment_lib, isNewAngular) {
|
|
@@ -8211,9 +8212,16 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
8211
8212
|
lodash.forEach(datesFields, function (row) {
|
|
8212
8213
|
row.values = lodash.uniq(row.values);
|
|
8213
8214
|
|
|
8214
|
-
const isTimestampDateField = row.type === 'Date' &&
|
|
8215
|
+
const isTimestampDateField = row.type === 'Date' && lodash.some(row.values, value => typeof value ==='number');
|
|
8215
8216
|
if (isTimestampDateField) {
|
|
8217
|
+
const nullValueIndex = row.values.indexOf(NULL_VALUE);
|
|
8218
|
+
if (~nullValueIndex) {
|
|
8219
|
+
row.values.splice(nullValueIndex, 1);
|
|
8220
|
+
}
|
|
8216
8221
|
row.values = row.values.sort((a, b) => a - b);
|
|
8222
|
+
if (~nullValueIndex) {
|
|
8223
|
+
row.values.push(NULL_VALUE);
|
|
8224
|
+
}
|
|
8217
8225
|
} else {
|
|
8218
8226
|
row.values = row.values.sort();
|
|
8219
8227
|
}
|