@datarailsshared/dr_renderer 1.2.153-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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.2.153-dragons",
3
+ "version": "1.2.154-dragons",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -7780,8 +7780,8 @@ 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?.date_aggregation_configs;
7784
- if (aggregationConfigs?.length && datesFields?.length) {
7783
+ const aggregationConfigs = widget.options ? widget.options.date_aggregation_configs || [] : [];
7784
+ if (aggregationConfigs.length && datesFields && datesFields.length) {
7785
7785
  highchartsRenderer.formatDatesWithAggregationIfRequired(aggregationConfigs, datesFields, defaultDateFormat);
7786
7786
  }
7787
7787
 
@@ -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?.aggregate_by;
8219
- const isFormattingByAggregation = aggregationConfig?.is_formatting_by_aggregation_method;
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(