DEV: drops jquery usage un admin-report-chart (#14661)

DEV: drops jquery usage un admin-report-chart (#14661)

diff --git a/app/assets/javascripts/admin/addon/components/admin-report-chart.js b/app/assets/javascripts/admin/addon/components/admin-report-chart.js
index 7711ca8..1c4ad1c 100644
--- a/app/assets/javascripts/admin/addon/components/admin-report-chart.js
+++ b/app/assets/javascripts/admin/addon/components/admin-report-chart.js
@@ -5,6 +5,7 @@ import loadScript from "discourse/lib/load-script";
 import { makeArray } from "discourse-common/lib/helpers";
 import { number } from "discourse/lib/formatter";
 import { schedule } from "@ember/runloop";
+import { bind } from "discourse-common/utils/decorators";
 
 export default Component.extend({
   classNames: ["admin-report-chart"],
@@ -12,23 +13,16 @@ export default Component.extend({
   total: 0,
   options: null,
 
-  init() {
-    this._super(...arguments);
-
-    this.resizeHandler = () =>
-      discourseDebounce(this, this._scheduleChartRendering, 500);
-  },
-
   didInsertElement() {
     this._super(...arguments);
 
-    $(window).on("resize.chart", this.resizeHandler);
+    window.addEventListener("resize", this._resizeHandler);
   },
 
   willDestroyElement() {
     this._super(...arguments);
 
-    $(window).off("resize.chart", this.resizeHandler);
+    window.removeEventListener("resize", this._resizeHandler);
 
     this._resetChart();
   },
@@ -179,4 +173,9 @@ export default Component.extend({
   _applyChartGrouping(model, data, options) {
     return Report.collapse(model, data, options.chartGrouping);
   },
+
+  @bind
+  _resizeHandler() {
+    discourseDebounce(this, this._scheduleChartRendering, 500);
+  },
 });

GitHub sha: adb302f8011e7161bb2874bd49cdbac5c79d09c3

This commit appears in #14661 which was approved by CvX. It was merged by jjaffeux.