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

View File

@ -13,7 +13,7 @@
></div> ></div>
</div> </div>
<!-- Chart Legend / Key --> <!-- Chart Legend / Key -->
<div class="legend"> <div class="legend" v-if="showLegend">
<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)}% (${block.value})`"> 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>
@ -31,6 +31,10 @@ export default {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
showLegend: {
type: Boolean,
default: true,
},
height: { height: {
number: Boolean, number: Boolean,
default: 1, default: 1,