diff --git a/package-lock.json b/package-lock.json
index c14fdabdf..584327ddd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2166,6 +2166,45 @@
"integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
"dev": true
},
+ "chart.js": {
+ "version": "2.9.4",
+ "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.9.4.tgz",
+ "integrity": "sha512-B07aAzxcrikjAPyV+01j7BmOpxtQETxTSlQ26BEYJ+3iUkbNKaOJ/nDbT6JjyqYxseM0ON12COHYdU2cTIjC7A==",
+ "requires": {
+ "chartjs-color": "^2.1.0",
+ "moment": "^2.10.2"
+ }
+ },
+ "chartjs-color": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.4.1.tgz",
+ "integrity": "sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==",
+ "requires": {
+ "chartjs-color-string": "^0.6.0",
+ "color-convert": "^1.9.3"
+ }
+ },
+ "chartjs-color-string": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz",
+ "integrity": "sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==",
+ "requires": {
+ "color-name": "^1.0.0"
+ }
+ },
+ "chartjs-plugin-annotation": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/chartjs-plugin-annotation/-/chartjs-plugin-annotation-0.5.7.tgz",
+ "integrity": "sha1-G/DjAZmmqf+Yic4PN6HnVagNEL8=",
+ "requires": {
+ "chart.js": "^2.4.0"
+ }
+ },
+ "chartjs-plugin-trendline": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/chartjs-plugin-trendline/-/chartjs-plugin-trendline-0.2.2.tgz",
+ "integrity": "sha512-Zla3736i2M0vQGoMvda3OiLm6pHo4ThBw8ba3BMxElebRH32k+GQPEdJUcWhlCbazsmL4UMpEC8PTXansMA1cw=="
+ },
"chokidar": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz",
@@ -2313,7 +2352,6 @@
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
- "dev": true,
"requires": {
"color-name": "1.1.3"
}
@@ -2321,8 +2359,7 @@
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
- "dev": true
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"color-support": {
"version": "1.1.3",
@@ -5957,6 +5994,11 @@
"xtend": "^4.0.0"
}
},
+ "moment": {
+ "version": "2.29.1",
+ "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
+ "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
+ },
"mri": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/mri/-/mri-1.1.6.tgz",
diff --git a/package.json b/package.json
index 0defe02c1..35d9c14af 100644
--- a/package.json
+++ b/package.json
@@ -42,6 +42,9 @@
}
},
"dependencies": {
- "@babel/runtime": "^7.12.5"
+ "@babel/runtime": "^7.12.5",
+ "chart.js": "^2.9.4",
+ "chartjs-plugin-annotation": "^0.5.7",
+ "chartjs-plugin-trendline": "^0.2.2"
}
}
diff --git a/src/js/global-dependencies.js b/src/js/global-dependencies.js
index 0d8fb3a1a..1d699615f 100644
--- a/src/js/global-dependencies.js
+++ b/src/js/global-dependencies.js
@@ -1,5 +1,12 @@
//this file should be concatenated at the top of the legacy js files
+import Chart from "chart.js";
+import chartTrendline from "chartjs-plugin-trendline";
+import chartAnnotation from "chartjs-plugin-annotation";
+
+Chart.plugins.register(chartTrendline);
+Chart.plugins.register(chartAnnotation);
+
import {
db_getSnapshot,
db_setSnapshot,
diff --git a/static/index.html b/static/index.html
index 9956a22e0..d860a09ba 100644
--- a/static/index.html
+++ b/static/index.html
@@ -3431,10 +3431,6 @@
-
-
-
-