summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/App.vue66
-rw-r--r--src/ReportTable.vue46
-rw-r--r--src/TalentBox.vue22
3 files changed, 64 insertions, 70 deletions
diff --git a/src/App.vue b/src/App.vue
index 8affd42..a994a01 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -3,47 +3,41 @@
<section class="hero">
<div class="hero-body">
<div class="container">
- <h1 class="title">
- Vainglory Broken Talents Fun Statistics
- </h1>
- <h2 class="subtitle">
- Tilting Brawlers since May 2017
- </h2>
+ <h1 class="title">Vainglory Broken Talents Fun Statistics</h1>
+ <h2 class="subtitle">Tilting Brawlers since May 2017</h2>
</div>
</div>
</section>
- <section>
- <b-tabs v-model="activeTab">
- <b-tab-item label="Blitz">
- <div class="tile is-ancestor">
- <div class="tile is-parent">
- <talent-box class="tile is-child is-warning notification"
- title="Overpowered!"
- :entry="topWins.blitz_pvp_ranked">
- {{ Math.round(100 * topWins.blitz_pvp_ranked.Winner) }}% Win Rate
- </talent-box>
- </div>
+ <b-tabs v-model="activeTab">
+ <b-tab-item label="Blitz">
+ <div class="tile is-ancestor">
+ <div class="tile is-parent">
+ <talent-box class="tile is-child is-warning notification"
+ title="Overpowered!"
+ :entry="topWins.blitz_pvp_ranked">
+ {{ Math.round(100 * topWins.blitz_pvp_ranked.Winner) }}% Win Rate
+ </talent-box>
+ </div>
- <div class="tile is-parent">
- <talent-box class="tile is-child is-success notification"
- title="Trending"
- :entry="topPicks.blitz_pvp_ranked">
- {{ (100 * 6 * topPicks.blitz_pvp_ranked.Count / totalPicks.blitz_pvp_ranked).toFixed(2) }}% Pick Rate
- </talent-box>
- </div>
- </div>
+ <div class="tile is-parent">
+ <talent-box class="tile is-child is-success notification"
+ title="Trending"
+ :entry="topPicks.blitz_pvp_ranked">
+ {{ (100 * 6 * topPicks.blitz_pvp_ranked.Count / totalPicks.blitz_pvp_ranked).toFixed(2) }}% Pick Rate
+ </talent-box>
+ </div>
+ </div>
- <h2 class="title is-2">Blitz Hero Statistics</h2>
- <report-table :report="reports.blitz_pvp_ranked" :totalPicks="totalPicks.blitz_pvp_ranked"></report-table>
- </b-tab-item>
+ <h2 class="title is-2">Blitz Hero Statistics</h2>
+ <report-table :report="reports.blitz_pvp_ranked" :totalPicks="totalPicks.blitz_pvp_ranked"></report-table>
+ </b-tab-item>
- <b-tab-item label="Battle Royale">
- <h2 class="title is-2">Battle Royale Hero Statistics</h2>
- <report-table :report="reports.casual_aral" :totalPicks="totalPicks.casual_aral"></report-table>
- </b-tab-item>
- </b-tabs>
- </section>
+ <b-tab-item label="Battle Royale">
+ <h2 class="title is-2">Battle Royale Hero Statistics</h2>
+ <report-table :report="reports.casual_aral" :totalPicks="totalPicks.casual_aral"></report-table>
+ </b-tab-item>
+ </b-tabs>
</div>
</template>
@@ -66,8 +60,8 @@ for(let mode of MODES) {
totalPicks[mode] = report.map((entry) => entry.Count).reduce((agg, cur) => agg + cur, 0);
topPicks[mode] = reports[mode].sort((entry1, entry2) => entry2.Count - entry1.Count)[0];
topWins[mode] = reports[mode]
- .filter((entry) => 100 * 6 * entry.Count / totalPicks[mode] > 0.05)
- .sort((entry1, entry2) => entry2.Winner - entry1.Winner)[0];
+ .filter((entry) => 100 * 6 * entry.Count / totalPicks[mode] > 0.05)
+ .sort((entry1, entry2) => entry2.Winner - entry1.Winner)[0];
}
export default {
diff --git a/src/ReportTable.vue b/src/ReportTable.vue
index 8550939..00ef643 100644
--- a/src/ReportTable.vue
+++ b/src/ReportTable.vue
@@ -3,33 +3,33 @@
<b-table :data="report"
:default-sort="['Count', 'desc']"
:default-sort-directon="'desc'">
- <template slot-scope="props">
- <b-table-column field="Actor" label="Hero" sortable>
- {{ props.row.Actor.substring(1, props.row.Actor.length - 1) }}
- </b-table-column>
+ <template slot-scope="props">
+ <b-table-column field="Actor" label="Hero" sortable>
+ {{ props.row.Actor.substring(1, props.row.Actor.length - 1) }}
+ </b-table-column>
- <b-table-column field="Talent" label="Talent">
- {{ getTalentName(props.row.Talent) }}
- </b-table-column>
+ <b-table-column field="Talent" label="Talent">
+ {{ getTalentName(props.row.Talent) }}
+ </b-table-column>
- <b-table-column field="Level" label="Average Level" sortable numeric>
- <template v-if="!!props.row.Level">
- {{ props.row.Level.toFixed(2) }}
- </template>
- </b-table-column>
+ <b-table-column field="Level" label="Average Level" sortable numeric>
+ <template v-if="!!props.row.Level">
+ {{ props.row.Level.toFixed(2) }}
+ </template>
+ </b-table-column>
- <b-table-column field="Winner" label="Win Rate" sortable numeric>
- <template v-if="!!props.row.Winner">
- {{ (100 * props.row.Winner).toFixed(2) }}%
- </template>
- </b-table-column>
+ <b-table-column field="Winner" label="Win Rate" sortable numeric>
+ <template v-if="!!props.row.Winner">
+ {{ (100 * props.row.Winner).toFixed(2) }}%
+ </template>
+ </b-table-column>
- <b-table-column field="Count" label="Pick Rate" sortable numeric>
- <template v-if="!!props.row.Count">
- {{ (100 * 6 * props.row.Count / totalPicks).toFixed(2) }}%
- </template>
- </b-table-column>
- </template>
+ <b-table-column field="Count" label="Pick Rate" sortable numeric>
+ <template v-if="!!props.row.Count">
+ {{ (100 * 6 * props.row.Count / totalPicks).toFixed(2) }}%
+ </template>
+ </b-table-column>
+ </template>
</b-table>
</section>
</template>
diff --git a/src/TalentBox.vue b/src/TalentBox.vue
index eb6b4a8..c779e12 100644
--- a/src/TalentBox.vue
+++ b/src/TalentBox.vue
@@ -24,18 +24,18 @@ import Vue from 'vue';
import * as maps from './maps/maps';
export default Vue.component('talent-box', {
- props: [ 'title', 'content', 'entry' ],
- data: function() {
- return {
- };
+ props: [ 'title', 'content', 'entry' ],
+ data: function() {
+ return {
+ };
+ },
+ computed: {
+ hero: function() {
+ return maps.getHero(this.entry.Actor);
},
- computed: {
- hero: function() {
- return maps.getHero(this.entry.Actor);
- },
- rarity: function() {
- return maps.getTalentRarity(this.entry.Talent);
- },
+ rarity: function() {
+ return maps.getTalentRarity(this.entry.Talent);
},
+ },
});
</script>