From 3149ae54f145b0955db87c299655c6f958c6a728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Thu, 16 Feb 2023 18:09:29 +0100 Subject: [PATCH 1/3] Bump Chart.js from 2.9.4 to 4.2.1 in dashboard examples --- .../docs/5.3/examples/dashboard-rtl/dashboard.js | 16 +++++----------- .../docs/5.3/examples/dashboard-rtl/index.html | 4 ++-- .../docs/5.3/examples/dashboard/dashboard.js | 16 +++++----------- .../docs/5.3/examples/dashboard/index.html | 4 ++-- 4 files changed, 14 insertions(+), 26 deletions(-) diff --git a/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js b/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js index 96e0895bf2c1..d85ea6b11c83 100644 --- a/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js +++ b/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js @@ -7,8 +7,7 @@ // Graphs const ctx = document.getElementById('myChart') - // eslint-disable-next-line no-unused-vars - const myChart = new Chart(ctx, { + new Chart(ctx, { type: 'line', data: { labels: [ @@ -38,15 +37,10 @@ }] }, options: { - scales: { - yAxes: [{ - ticks: { - beginAtZero: false - } - }] - }, - legend: { - display: false + plugins: { + legend: { + display: false + } } } }) diff --git a/site/content/docs/5.3/examples/dashboard-rtl/index.html b/site/content/docs/5.3/examples/dashboard-rtl/index.html index 699586c7fad5..9b2eb8caf7e8 100644 --- a/site/content/docs/5.3/examples/dashboard-rtl/index.html +++ b/site/content/docs/5.3/examples/dashboard-rtl/index.html @@ -7,8 +7,8 @@ extra_js: - src: "https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js" integrity: "sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE" - - src: "https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js" - integrity: "sha384-zNy6FEbO50N+Cg5wap8IKA4M/ZnLJgzc6w2NqACZaK0u0FXfOWRRJOnQtpZun8ha" + - src: "https://cdn.jsdelivr.net/npm/chart.js@4.2.1/dist/chart.umd.min.js" + integrity: "sha384-gdQErvCNWvHQZj6XZM0dNsAoY4v+j5P1XDpNkcM3HJG1Yx04ecqIHk7+4VBOCHOG" - src: "dashboard.js" --- diff --git a/site/content/docs/5.3/examples/dashboard/dashboard.js b/site/content/docs/5.3/examples/dashboard/dashboard.js index e1379758b222..52a860d52679 100644 --- a/site/content/docs/5.3/examples/dashboard/dashboard.js +++ b/site/content/docs/5.3/examples/dashboard/dashboard.js @@ -7,8 +7,7 @@ // Graphs const ctx = document.getElementById('myChart') - // eslint-disable-next-line no-unused-vars - const myChart = new Chart(ctx, { + new Chart(ctx, { type: 'line', data: { labels: [ @@ -38,15 +37,10 @@ }] }, options: { - scales: { - yAxes: [{ - ticks: { - beginAtZero: false - } - }] - }, - legend: { - display: false + plugins: { + legend: { + display: false + } } } }) diff --git a/site/content/docs/5.3/examples/dashboard/index.html b/site/content/docs/5.3/examples/dashboard/index.html index 6fbf812b1345..88ac303ab716 100644 --- a/site/content/docs/5.3/examples/dashboard/index.html +++ b/site/content/docs/5.3/examples/dashboard/index.html @@ -6,8 +6,8 @@ extra_js: - src: "https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js" integrity: "sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE" - - src: "https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js" - integrity: "sha384-zNy6FEbO50N+Cg5wap8IKA4M/ZnLJgzc6w2NqACZaK0u0FXfOWRRJOnQtpZun8ha" + - src: "https://cdn.jsdelivr.net/npm/chart.js@4.2.1/dist/chart.umd.min.js" + integrity: "sha384-gdQErvCNWvHQZj6XZM0dNsAoY4v+j5P1XDpNkcM3HJG1Yx04ecqIHk7+4VBOCHOG" - src: "dashboard.js" --- From 35b7a21c2be8bfad58aa8e95c88bf5bcf9c4d0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Fri, 17 Feb 2023 08:22:19 +0100 Subject: [PATCH 2/3] Rollback myChart var modification --- site/content/docs/5.3/examples/dashboard-rtl/dashboard.js | 3 ++- site/content/docs/5.3/examples/dashboard/dashboard.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js b/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js index d85ea6b11c83..8c5a4daa49b0 100644 --- a/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js +++ b/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js @@ -7,7 +7,8 @@ // Graphs const ctx = document.getElementById('myChart') - new Chart(ctx, { + // eslint-disable-next-line no-unused-vars + const myChart = new Chart(ctx, { type: 'line', data: { labels: [ diff --git a/site/content/docs/5.3/examples/dashboard/dashboard.js b/site/content/docs/5.3/examples/dashboard/dashboard.js index 52a860d52679..4be383902fc9 100644 --- a/site/content/docs/5.3/examples/dashboard/dashboard.js +++ b/site/content/docs/5.3/examples/dashboard/dashboard.js @@ -7,7 +7,8 @@ // Graphs const ctx = document.getElementById('myChart') - new Chart(ctx, { + // eslint-disable-next-line no-unused-vars + const myChart = new Chart(ctx, { type: 'line', data: { labels: [ From 4f4c059f9d02a245a3a8adc1cf41036ba19186f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Fri, 17 Feb 2023 08:34:30 +0100 Subject: [PATCH 3/3] Add some padding between tooltip color and text --- site/content/docs/5.3/examples/dashboard-rtl/dashboard.js | 3 +++ site/content/docs/5.3/examples/dashboard/dashboard.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js b/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js index 8c5a4daa49b0..d278c628bd60 100644 --- a/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js +++ b/site/content/docs/5.3/examples/dashboard-rtl/dashboard.js @@ -41,6 +41,9 @@ plugins: { legend: { display: false + }, + tooltip: { + boxPadding: 3 } } } diff --git a/site/content/docs/5.3/examples/dashboard/dashboard.js b/site/content/docs/5.3/examples/dashboard/dashboard.js index 4be383902fc9..d190d79616df 100644 --- a/site/content/docs/5.3/examples/dashboard/dashboard.js +++ b/site/content/docs/5.3/examples/dashboard/dashboard.js @@ -41,6 +41,9 @@ plugins: { legend: { display: false + }, + tooltip: { + boxPadding: 3 } } }