Skip to content

armgit / dashy

Public Imported from GitHub
0

🚀 A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:sparkles: Add extra option to hide legend in percentageChart

Rémy GRANDIN1d69fc86177d
diff --git a/src/components/Charts/PercentageChart.vue b/src/components/Charts/PercentageChart.vue
index d4b4b539..0a2ba53c 100644
--- a/src/components/Charts/PercentageChart.vue
+++ b/src/components/Charts/PercentageChart.vue
@@ -13,7 +13,7 @@
></div>
</div>
<!-- Chart Legend / Key -->
- <div class="legend">
+ <div class="legend" v-if="showLegend">
<div v-for="(block, inx) in blocks" :key="inx"
class="legend-item" v-tooltip="`${Math.round(block.width)}% (${block.value})`">
<div class="dot" v-if="block.label" :style="makeDotColor(block)"></div>
@@ -31,6 +31,10 @@ export default {
type: Boolean,
default: true,
},
+ showLegend: {
+ type: Boolean,
+ default: true,
+ },
height: {
number: Boolean,
default: 1,