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!

:zap: Show real value on hover, percentage chart

Alicia Sykes9cd8c21d8ed8
diff --git a/src/components/Charts/PercentageChart.vue b/src/components/Charts/PercentageChart.vue
index be5c0324..d4b4b539 100644
--- a/src/components/Charts/PercentageChart.vue
+++ b/src/components/Charts/PercentageChart.vue
@@ -15,7 +15,7 @@
<!-- Chart Legend / Key -->
<div class="legend">
<div v-for="(block, inx) in blocks" :key="inx"
- class="legend-item" v-tooltip="`${Math.round(block.width)}%`">
+ class="legend-item" v-tooltip="`${Math.round(block.width)}% (${block.value})`">
<div class="dot" v-if="block.label" :style="makeDotColor(block)"></div>
<div class="txt" v-if="block.label">{{ block.label }}</div>
</div>
@@ -59,6 +59,7 @@ export default {
width: Math.round(value.size * multiplier),
color: value.color || defaultColor,
label: value.label,
+ value: value.size,
});
startPositionSum += (value.size * multiplier);
});