@datarailsshared/dr_renderer 1.2.152-dragons → 1.2.154-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
|
@@ -7780,9 +7780,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
7780
7780
|
datesFields = lodash.filter(widget.rows, element => element.type == 'Date');
|
|
7781
7781
|
datesFields = datesFields.concat(lodash.filter(widget.cols, element => element.type == 'Date'));
|
|
7782
7782
|
|
|
7783
|
-
const aggregationConfigs = widget.options
|
|
7784
|
-
if (aggregationConfigs
|
|
7785
|
-
|
|
7783
|
+
const aggregationConfigs = widget.options ? widget.options.date_aggregation_configs || [] : [];
|
|
7784
|
+
if (aggregationConfigs.length && datesFields && datesFields.length) {
|
|
7785
|
+
highchartsRenderer.formatDatesWithAggregationIfRequired(aggregationConfigs, datesFields, defaultDateFormat);
|
|
7786
7786
|
}
|
|
7787
7787
|
|
|
7788
7788
|
const isCustomSorting = widget.options.sortingFields && Array.isArray(widget.options.sortingFields) && widget.options.sortingFields.length > 0;
|
|
@@ -8215,8 +8215,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
8215
8215
|
|
|
8216
8216
|
highchartsRenderer.formatDatesWithAggregationIfRequired = function(aggregationConfigs, datesFields, defaultDateFormat) {
|
|
8217
8217
|
_.forEach(aggregationConfigs, aggregationConfig => {
|
|
8218
|
-
const aggregationTimeframe = aggregationConfig
|
|
8219
|
-
const isFormattingByAggregation = aggregationConfig
|
|
8218
|
+
const aggregationTimeframe = aggregationConfig ? aggregationConfig.aggregate_by : null;
|
|
8219
|
+
const isFormattingByAggregation = aggregationConfig ? aggregationConfig.is_formatting_by_aggregation_method : false;
|
|
8220
8220
|
|
|
8221
8221
|
if (aggregationTimeframe && isFormattingByAggregation) {
|
|
8222
8222
|
const dateField = lodash.find(
|