From 98c7e93755eb9080a32e4e32f86ab407af7d7fe1 Mon Sep 17 00:00:00 2001 From: Jakob Vogel Date: Fri, 12 Jan 2024 13:19:34 +0100 Subject: [PATCH] =?UTF-8?q?Adapts=20doughnut=20stuff=20to=20changes=20up-s?= =?UTF-8?q?tream=20=F0=9F=8D=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- ...tChartJobFactory.java => DoughnutChartJobFactory.java} | 8 ++++---- .../{dougnutchart.html.pasta => doughnutchart.html.pasta} | 8 +++++--- .../templates/biz/process/process-output-chart.html.pasta | 4 +++- 4 files changed, 13 insertions(+), 9 deletions(-) rename src/main/java/sirius/biz/jobs/interactive/{DougnutChartJobFactory.java => DoughnutChartJobFactory.java} (55%) rename src/main/resources/default/templates/biz/jobs/{dougnutchart.html.pasta => doughnutchart.html.pasta} (70%) diff --git a/pom.xml b/pom.xml index a1cf4ed69..2edc9b27b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ dev-42.2.0 - dev-75.2.0 + dev-75.3.0 dev-57.0.0 diff --git a/src/main/java/sirius/biz/jobs/interactive/DougnutChartJobFactory.java b/src/main/java/sirius/biz/jobs/interactive/DoughnutChartJobFactory.java similarity index 55% rename from src/main/java/sirius/biz/jobs/interactive/DougnutChartJobFactory.java rename to src/main/java/sirius/biz/jobs/interactive/DoughnutChartJobFactory.java index 2782e7b79..e505ee505 100644 --- a/src/main/java/sirius/biz/jobs/interactive/DougnutChartJobFactory.java +++ b/src/main/java/sirius/biz/jobs/interactive/DoughnutChartJobFactory.java @@ -9,17 +9,17 @@ package sirius.biz.jobs.interactive; /** - * Provides a base implementation for interactive dougnut charts. + * Provides a base implementation for interactive doughnut charts. */ -public abstract class DougnutChartJobFactory extends SingleDatasetChartJobFactory { +public abstract class DoughnutChartJobFactory extends SingleDatasetChartJobFactory { @Override public String getIcon() { - return "fas fa-chart-pie"; + return "fa-solid fa-chart-pie"; } @Override protected String getTemplate() { - return "/templates/biz/jobs/dougnutchart.html.pasta"; + return "/templates/biz/jobs/doughnutchart.html.pasta"; } } diff --git a/src/main/resources/default/templates/biz/jobs/dougnutchart.html.pasta b/src/main/resources/default/templates/biz/jobs/doughnutchart.html.pasta similarity index 70% rename from src/main/resources/default/templates/biz/jobs/dougnutchart.html.pasta rename to src/main/resources/default/templates/biz/jobs/doughnutchart.html.pasta index d9e15631e..16922480d 100644 --- a/src/main/resources/default/templates/biz/jobs/dougnutchart.html.pasta +++ b/src/main/resources/default/templates/biz/jobs/doughnutchart.html.pasta @@ -9,13 +9,15 @@ context="context" additionalMetrics="additionalMetrics">
- +
diff --git a/src/main/resources/default/templates/biz/process/process-output-chart.html.pasta b/src/main/resources/default/templates/biz/process/process-output-chart.html.pasta index 6dfa6c2c4..9a6b745e4 100644 --- a/src/main/resources/default/templates/biz/process/process-output-chart.html.pasta +++ b/src/main/resources/default/templates/biz/process/process-output-chart.html.pasta @@ -27,7 +27,9 @@ polarAreaChart('#chart-@id', chartData.labels, chartData.data); } else if (chartData.type === 'dougnut') { $('#chart-@id').attr('height', 180); - dougnutChart('#chart-@id', chartData.labels, chartData.data); + doughnutChart('#chart-@id', chartData.labels, chartData.data, { + maintainAspectRatio: false + }); } }); }