Add extra option to hide legend in percentageChart

This commit is contained in:
Rémy GRANDIN 2022-04-23 02:43:38 +02:00
parent 05f5d71801
commit 1d69fc8617
1 changed files with 5 additions and 1 deletions

View File

@ -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,