From dd7991653042bb75f1dc6a4b31784e7a019675c3 Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Sat, 7 Sep 2024 01:29:53 +0200 Subject: [PATCH] improve reporting chart, fix project table with long client name, fixes ST-414 --- .../Common/Project/ProjectTable.vue | 2 +- .../Common/Reporting/ReportingPieChart.vue | 25 ++++++------------- resources/js/Pages/Reporting.vue | 2 +- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/resources/js/Components/Common/Project/ProjectTable.vue b/resources/js/Components/Common/Project/ProjectTable.vue index 6f87aa8f..9937b65a 100644 --- a/resources/js/Components/Common/Project/ProjectTable.vue +++ b/resources/js/Components/Common/Project/ProjectTable.vue @@ -49,7 +49,7 @@ const { clients } = storeToRefs(useClientsStore());
+ style="grid-template-columns: 1fr 1fr 1fr 150px 80px">
{ ...el, ...{ itemStyle: { - color: new LinearGradient(0, 0, 0, 1, [ - { - offset: 0, - color: hexToRGBA(el.color, 0.8), - }, - { - offset: 1, - color: hexToRGBA(el.color, 0.4), - }, - ]), + color: el.color + }, }, }; @@ -93,7 +85,8 @@ const option = ref({ trigger: 'item', }, legend: { - top: 'bottom', + show: true, + top: '250px' }, backgroundColor: 'transparent', series: [ @@ -107,21 +100,17 @@ const option = ref({ }, }, data: seriesData, - radius: ['30%', '65%'], + radius: ['30%', '60%'], + top: '-50%', type: 'pie', - top: '-10%', }, ], }); diff --git a/resources/js/Pages/Reporting.vue b/resources/js/Pages/Reporting.vue index a75e72d5..98fa2961 100644 --- a/resources/js/Pages/Reporting.vue +++ b/resources/js/Pages/Reporting.vue @@ -146,7 +146,7 @@ async function createTag(tag: string) {