FIX: ensures we don't apply charts options to other modes (#13570)

FIX: ensures we don’t apply charts options to other modes (#13570)

This reverts commit 1f74ea0f08ac57d41e64cc067c6b61f3f92de72b.

diff --git a/app/assets/javascripts/admin/addon/components/admin-report.js b/app/assets/javascripts/admin/addon/components/admin-report.js
index 9daea4b..9f60e09 100644
--- a/app/assets/javascripts/admin/addon/components/admin-report.js
+++ b/app/assets/javascripts/admin/addon/components/admin-report.js
@@ -300,6 +300,7 @@ export default Component.extend({
         return;
       }
     }
+
     if (report.error === "not_found") {
       this.set("showFilteringUI", false);
     }
@@ -382,17 +383,13 @@ export default Component.extend({
       return EmberObject.create(
         Object.assign(tableOptions, this.get("reportOptions.table") || {})
       );
-    } else {
+    } else if (mode === "chart") {
       const chartOptions = JSON.parse(JSON.stringify(CHART_OPTIONS));
-
-      let chartGrouping = this.get("reportOptions.chartGrouping");
-      if (!chartGrouping && report.chartData) {
-        chartGrouping = Report.groupingForDatapoints(report.chartData.length);
-      }
-
       return EmberObject.create(
         Object.assign(chartOptions, this.get("reportOptions.chart") || {}, {
-          chartGrouping,
+          chartGrouping:
+            this.get("reportOptions.chartGrouping") ||
+            Report.groupingForDatapoints(report.chartData.length),
         })
       );
     }

GitHub sha: 33464cb07ecae7f1b3e39c7ef6770d63d8a72163

This commit appears in #13570 which was approved by eviltrout. It was merged by jjaffeux.