Show real value on hover, percentage chart

This commit is contained in:
Alicia Sykes 2022-01-21 13:00:58 +00:00
parent 6cd9eac49b
commit 9cd8c21d8e
1 changed files with 2 additions and 1 deletions

View File

@ -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);
});