mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-30 00:55:36 +02:00
⚡ Show real value on hover, percentage chart
This commit is contained in:
parent
6cd9eac49b
commit
9cd8c21d8e
@ -15,7 +15,7 @@
|
|||||||
<!-- Chart Legend / Key -->
|
<!-- Chart Legend / Key -->
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
<div v-for="(block, inx) in blocks" :key="inx"
|
<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="dot" v-if="block.label" :style="makeDotColor(block)"></div>
|
||||||
<div class="txt" v-if="block.label">{{ block.label }}</div>
|
<div class="txt" v-if="block.label">{{ block.label }}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -59,6 +59,7 @@ export default {
|
|||||||
width: Math.round(value.size * multiplier),
|
width: Math.round(value.size * multiplier),
|
||||||
color: value.color || defaultColor,
|
color: value.color || defaultColor,
|
||||||
label: value.label,
|
label: value.label,
|
||||||
|
value: value.size,
|
||||||
});
|
});
|
||||||
startPositionSum += (value.size * multiplier);
|
startPositionSum += (value.size * multiplier);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user