This release adds segregation reactivity to #legend slots, exposing the following additional attributes you can use on your custom legend:
- segregate (function): will update the chart without the segregated series (just like the built-in default legend does)
- isSegregated (boolean): true if the series is segregated
<VueUiDonut
:dataset="dataset"
:config="config"
>
<template #legend="{ legend }">
<div :style="`opacity:${legend.isSegregated ? '0.5' : '1'}`" @click="legend.segregate()">
{{ legend.name }}
</div>
</template>
</ VueUiDonut>
The following components are concerned:
- VueUiDonut
- VueUiDonutEvolution
- VueUiNestedDonuts
- VueUiXy
- VueUiGalaxy
- VueUiIOnion
- VueUiQuadrant
- VueUiRadar
- VueUiRings
- VueUiScatter
- VueUiVerticalBar
- VueUiWaffle