From 036077f7706523cf5446dc7169216681b38fa1c2 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Mon, 21 May 2018 21:48:29 +0200
Subject: Mark very low pick rate in talent table

---
 src/HeroTalentTable.vue | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'src/HeroTalentTable.vue')

diff --git a/src/HeroTalentTable.vue b/src/HeroTalentTable.vue
index fee687e..87d6f50 100644
--- a/src/HeroTalentTable.vue
+++ b/src/HeroTalentTable.vue
@@ -16,9 +16,10 @@
         </b-table-column>
 
         <b-table-column field="Winner" label="Win Rate" sortable numeric>
-          <template v-if="!!props.row.Winner">
-            {{ Math.round(100 * props.row.Winner) }}%
-          </template>
+          <span class="tag is-warning mdi mdi-gauge-empty mdi-18px"
+                title="Very low pick rate"
+                v-if="100 * playersPerMatch * props.row.Count / totalPicks < 0.5"></span>
+          {{ Math.round(100 * props.row.Winner) }}%
         </b-table-column>
       </template>
     </b-table>
@@ -54,6 +55,9 @@ export default Vue.component('hero-talent-table', {
         .map((entry) => entry.Count)
         .reduce((agg, cur) => agg + cur, 0);
     },
+    playersPerMatch: function() {
+      return maps.playersPerMatch(this.selectedMode);
+    },
   },
   components: {
     TalentImage,
-- 
cgit v1.3.1

