From ee2742fde6da08f1ac0e0669f0ab6572001d2a0b Mon Sep 17 00:00:00 2001
From: cnachtigall1991 <40701475+cnachtigall1991@users.noreply.github.com>
Date: Sun, 10 Oct 2021 22:23:02 +0200
Subject: [PATCH] added pie-chart for utility damage, updated flashchart
---
src/components/FlashChart.vue | 15 +--
src/components/UtilityChart.vue | 173 ++++++++++++++++++++++++++++++++
src/views/Match.vue | 17 +++-
3 files changed, 193 insertions(+), 12 deletions(-)
create mode 100644 src/components/UtilityChart.vue
diff --git a/src/components/FlashChart.vue b/src/components/FlashChart.vue
index 49ee135..8888e14 100644
--- a/src/components/FlashChart.vue
+++ b/src/components/FlashChart.vue
@@ -88,7 +88,7 @@ export default {
{
name: 'Flash-Count',
type: 'pie',
- radius: [0, '30%'],
+ radius: [0, '40%'],
avoidLabelOverlap: true,
itemStyle: {
borderRadius: 10,
@@ -96,7 +96,9 @@ export default {
borderWidth: 3
},
label: {
- show: false
+ position: 'inside',
+ fontsize: 36,
+ fontWeight: 'bold'
},
labelLine: {
show: false
@@ -120,7 +122,7 @@ export default {
{
name: 'Flash-Duration (in s)',
type: 'pie',
- radius: ['35%', '55%'],
+ radius: ['45%', '65%'],
avoidLabelOverlap: true,
itemStyle: {
borderRadius: 10,
@@ -128,7 +130,7 @@ export default {
borderWidth: 3
},
labelLine: {
- length: 10
+ length: 20
},
label: {
formatter: '{a|{a}}{abg|}\n{hr|}\n {b|{b}:}{c} {per|{d}%} ',
@@ -165,8 +167,7 @@ export default {
data: [
{
value: props.duration.self ? props.duration.self.toFixed(2) : null,
- name: 'Self',
- selected: true
+ name: 'Self'
},
{
value: props.duration.team ? props.duration.team.toFixed(2) : null,
@@ -197,7 +198,7 @@ export default {
.heading {
display: flex;
margin-top: 10px;
- margin-bottom: -30px;
+ margin-bottom: -20px;
.avatar {
width: 50px;
diff --git a/src/components/UtilityChart.vue b/src/components/UtilityChart.vue
new file mode 100644
index 0000000..030e9f2
--- /dev/null
+++ b/src/components/UtilityChart.vue
@@ -0,0 +1,173 @@
+
+ Total UD:
+ {{ (props.ud.flames ? props.ud.flames : 0) + (props.ud.flash ? props.ud.flash : 0) + (props.ud.he ? props.ud.he : 0) }}
+
+
{{ props.name }}
+