mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-27 07:34:43 +02:00
✨ Add extra option to hide legend in percentageChart
This commit is contained in:
parent
05f5d71801
commit
1d69fc8617
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user