diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js
index f246dae7c..023231ae2 100644
--- a/docs/.vitepress/config.js
+++ b/docs/.vitepress/config.js
@@ -45,6 +45,7 @@ export default {
{ text: 'Copy Code', link: '/components/copy-code' },
{ text: 'Notifications', link: '/components/notifications' },
{ text: 'Share Modal', link: '/components/share-modal' },
+ { text: 'Analytics', link: '/components/analytics' },
],
},
],
diff --git a/docs/components/analytics.md b/docs/components/analytics.md
new file mode 100644
index 000000000..a8ac71a24
--- /dev/null
+++ b/docs/components/analytics.md
@@ -0,0 +1,108 @@
+# Analytics
+
+
+
+
+
+
+```vue
+
+```
+```vue
+
+```
diff --git a/lib/components/base/LineChart.vue b/lib/components/base/LineChart.vue
new file mode 100644
index 000000000..7aee0212b
--- /dev/null
+++ b/lib/components/base/LineChart.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
diff --git a/lib/components/base/PieChart.vue b/lib/components/base/PieChart.vue
new file mode 100644
index 000000000..caa5c0f58
--- /dev/null
+++ b/lib/components/base/PieChart.vue
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
diff --git a/lib/components/index.js b/lib/components/index.js
index 6951c7ddf..6151b05eb 100644
--- a/lib/components/index.js
+++ b/lib/components/index.js
@@ -24,6 +24,8 @@ export { default as ModalConfirm } from './base/ModalConfirm.vue'
export { default as Breadcrumbs } from './base/Breadcrumbs.vue'
export { default as DropdownButton } from './base/DropdownButton.vue'
export { default as ShareModal } from './base/ShareModal.vue'
+export { default as LineChart } from './base/LineChart.vue'
+export { default as PieChart } from './base/PieChart.vue'
export { default as Categories } from './search/Categories.vue'
export { default as SearchFilter } from './search/SearchFilter.vue'
diff --git a/package.json b/package.json
index e5a743c6e..66ecf50e5 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "omorphia",
"type": "module",
- "version": "0.4.38",
+ "version": "0.4.39",
"files": [
"dist",
"lib"
@@ -25,12 +25,14 @@
"docs:preview": "vitepress preview docs"
},
"dependencies": {
+ "chart.js": "^4.3.3",
"dayjs": "^1.11.7",
"floating-vue": "^2.0.0-beta.20",
"highlight.js": "^11.8.0",
"markdown-it": "^13.0.1",
"qrcode.vue": "^3.4.0",
"vue": "^3.3.4",
+ "vue-chartjs": "^5.2.0",
"vue-router": "^4.2.1",
"vue-select": "^4.0.0-beta.6",
"xss": "^1.0.14"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8d22d8a58..0d92d0767 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1,6 +1,9 @@
lockfileVersion: '6.0'
dependencies:
+ chart.js:
+ specifier: ^4.3.3
+ version: 4.3.3
dayjs:
specifier: ^1.11.7
version: 1.11.7
@@ -19,6 +22,9 @@ dependencies:
vue:
specifier: ^3.3.4
version: 3.3.4
+ vue-chartjs:
+ specifier: ^5.2.0
+ version: 5.2.0(chart.js@4.3.3)(vue@3.3.4)
vue-router:
specifier: ^4.2.1
version: 4.2.1(vue@3.3.4)
@@ -552,6 +558,10 @@ packages:
'@jridgewell/sourcemap-codec': 1.4.14
dev: true
+ /@kurkle/color@0.3.2:
+ resolution: {integrity: sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==}
+ dev: false
+
/@nodelib/fs.scandir@2.1.5:
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@@ -1040,6 +1050,13 @@ packages:
supports-color: 7.2.0
dev: true
+ /chart.js@4.3.3:
+ resolution: {integrity: sha512-aTk7pBw+x6sQYhon/NR3ikfUJuym/LdgpTlgZRe2PaEhjUMKBKyNaFCMVRAyTEWYFNO7qRu7iQVqOw/OqzxZxQ==}
+ engines: {pnpm: '>=7'}
+ dependencies:
+ '@kurkle/color': 0.3.2
+ dev: false
+
/chokidar@3.5.3:
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
engines: {node: '>= 8.10.0'}
@@ -2309,6 +2326,16 @@ packages:
resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==}
dev: true
+ /vue-chartjs@5.2.0(chart.js@4.3.3)(vue@3.3.4):
+ resolution: {integrity: sha512-d3zpKmGZr2OWHQ1xmxBcAn5ShTG917+/UCLaSpaCDDqT0U7DBsvFzTs69ZnHCgKoXT55GZDW8YEj9Av+dlONLA==}
+ peerDependencies:
+ chart.js: ^4.1.1
+ vue: ^3.0.0-0 || ^2.7.0
+ dependencies:
+ chart.js: 4.3.3
+ vue: 3.3.4
+ dev: false
+
/vue-demi@0.14.5(vue@3.3.4):
resolution: {integrity: sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==}
engines: {node: '>=12'}