@datarailsshared/dr_renderer 1.2.161-dragons → 1.2.162

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.161-dragons",
3
+ "version": "1.2.162",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -7801,7 +7801,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7801
7801
  }
7802
7802
 
7803
7803
  datesFields = lodash.map(datesFields, function (row) {
7804
- return {"format": highchartsRenderer.getDateFieldFormat(widget, row), "name": row.name, "type": row.type, "values": [], "sorting": row.sorting} //'MMM - yyyy' format
7804
+ return { "format": highchartsRenderer.getDateFieldFormat(widget, row), "name": row.name, "type": row.type, "values": [], "sorting": row.sorting } //'MMM - yyyy' format
7805
7805
  });
7806
7806
 
7807
7807
  var data = res;
@@ -8222,16 +8222,11 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8222
8222
 
8223
8223
  highchartsRenderer.getDateFieldFormat = function(widget, dateField) {
8224
8224
  const aggregationConfig = widget.options && widget.options.date_aggregation_configs
8225
- ? _.find(widget.options.date_aggregation_configs, {field_id: dateField.id})
8225
+ ? _.find(widget.options.date_aggregation_configs, { field_id: dateField.id })
8226
8226
  : null;
8227
8227
 
8228
- if (aggregationConfig) {
8229
- const aggregationTimeframe = aggregationConfig ? aggregationConfig.aggregate_by : null;
8230
- const isFormattingByAggregation = aggregationConfig ? aggregationConfig.is_formatting_by_aggregation_method : false;
8231
-
8232
- if (aggregationTimeframe && isFormattingByAggregation) {
8233
- return highchartsRenderer.getDateFormatByTimeframe(aggregationTimeframe, dateField.format);
8234
- }
8228
+ if (aggregationConfig && aggregationConfig.aggregate_by && aggregationConfig.is_formatting_by_aggregation_method) {
8229
+ return highchartsRenderer.getDateFormatByTimeframe(aggregationConfig.aggregate_by, dateField.format);
8235
8230
  }
8236
8231
  return dateField.format;
8237
8232
  }