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 @@ + + + + + diff --git a/src/views/Match.vue b/src/views/Match.vue index a4e1cb1..631d418 100644 --- a/src/views/Match.vue +++ b/src/views/Match.vue @@ -37,7 +37,7 @@ @@ -66,8 +66,13 @@ /> -
- Grenades +
+
@@ -83,6 +88,7 @@ import {DisplayRank, FormatFullDate, GetHLTV_1, GoToPlayer, LoadImage} from "../ const ScoreTeam = defineAsyncComponent(() => import('../components/ScoreTeam')) const FlashChart = defineAsyncComponent(() => import('../components/FlashChart')) +const UtilityChart = defineAsyncComponent(() => import('../components/UtilityChart')) export default { name: 'Match', @@ -90,6 +96,7 @@ export default { components: { ScoreTeam, FlashChart, + UtilityChart, }, setup(props) { // Refs @@ -207,7 +214,7 @@ export default { rgba(0, 0, 0, .6) 100% ); - #scoreboard, #flashes, #grenades, #damage { + #scoreboard, #flashes, #utility, #damage { display: none; flex-direction: column; align-items: center; @@ -215,7 +222,7 @@ export default { #scoreboard.active, #flashes.active, - #grenades.active, + #utility.active, #damage.active { display: flex; }