summaryrefslogtreecommitdiffstats
path: root/site/content/docs/5.2/examples/dashboard/dashboard.js
diff options
context:
space:
mode:
Diffstat (limited to 'site/content/docs/5.2/examples/dashboard/dashboard.js')
-rw-r--r--site/content/docs/5.2/examples/dashboard/dashboard.js53
1 files changed, 53 insertions, 0 deletions
diff --git a/site/content/docs/5.2/examples/dashboard/dashboard.js b/site/content/docs/5.2/examples/dashboard/dashboard.js
new file mode 100644
index 0000000..e137975
--- /dev/null
+++ b/site/content/docs/5.2/examples/dashboard/dashboard.js
@@ -0,0 +1,53 @@
+/* globals Chart:false, feather:false */
+
+(() => {
+ 'use strict'
+
+ feather.replace({ 'aria-hidden': 'true' })
+
+ // Graphs
+ const ctx = document.getElementById('myChart')
+ // eslint-disable-next-line no-unused-vars
+ const myChart = new Chart(ctx, {
+ type: 'line',
+ data: {
+ labels: [
+ 'Sunday',
+ 'Monday',
+ 'Tuesday',
+ 'Wednesday',
+ 'Thursday',
+ 'Friday',
+ 'Saturday'
+ ],
+ datasets: [{
+ data: [
+ 15339,
+ 21345,
+ 18483,
+ 24003,
+ 23489,
+ 24092,
+ 12034
+ ],
+ lineTension: 0,
+ backgroundColor: 'transparent',
+ borderColor: '#007bff',
+ borderWidth: 4,
+ pointBackgroundColor: '#007bff'
+ }]
+ },
+ options: {
+ scales: {
+ yAxes: [{
+ ticks: {
+ beginAtZero: false
+ }
+ }]
+ },
+ legend: {
+ display: false
+ }
+ }
+ })
+})()