fix: clean up
This commit is contained in:
parent
ba8ec8dcdd
commit
3540f9ec01
|
|
@ -83,7 +83,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
|
|||
|
||||
<template v-for="(category, i) in categories" :key="category">
|
||||
<VisArea
|
||||
:x="(_: Data, i: number) => i"
|
||||
:x="(_d: Data, i: number) => i"
|
||||
:y="(d: Data) => d[category]"
|
||||
color="auto"
|
||||
:curve-type="curveType"
|
||||
|
|
@ -98,7 +98,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
|
|||
|
||||
<template v-for="(category, i) in categories" :key="category">
|
||||
<VisLine
|
||||
:x="(_: Data, i: number) => i"
|
||||
:x="(_d: Data, i: number) => i"
|
||||
:y="(d: Data) => d[category]"
|
||||
:color="colors[i]"
|
||||
:curve-type="curveType"
|
||||
|
|
|
|||
|
|
@ -71,14 +71,14 @@ const selectorsBar = computed(() => props.type === 'grouped' ? GroupedBar.select
|
|||
<ChartCrosshair v-if="showTooltip" :colors="colors" :items="legendItems" :custom-tooltip="customTooltip" :index="index" />
|
||||
|
||||
<VisBarComponent
|
||||
:x="(_: Data, i: number) => i"
|
||||
:x="(_d: Data, i: number) => i"
|
||||
:y="categories.map(category => (d: Data) => d[category]) "
|
||||
:color="colors"
|
||||
:rounded-corners="roundedCorners"
|
||||
:bar-padding="0.05"
|
||||
:attributes="{
|
||||
[selectorsBar]: {
|
||||
opacity: (_: Data, i:number) => {
|
||||
opacity: (_d: Data, i:number) => {
|
||||
const pos = i % categories.length
|
||||
return legendItems[pos]?.inactive ? filterOpacity : 1
|
||||
},
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ const totalValue = computed(() => props.data.reduce((prev, curr) => {
|
|||
:central-label="type === 'donut' ? valueFormatter(totalValue) : ''"
|
||||
:events="{
|
||||
[Donut.selectors.segment]: {
|
||||
click: (d: Data, _: PointerEvent, i: number, elements: HTMLElement[]) => {
|
||||
click: (d: Data, _ev: PointerEvent, i: number, elements: HTMLElement[]) => {
|
||||
if (d?.data?.[index] === activeSegmentKey) {
|
||||
activeSegmentKey = undefined
|
||||
elements.forEach(el => el.style.opacity = '1')
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
|
|||
|
||||
<template v-for="(category, i) in categories" :key="category">
|
||||
<VisLine
|
||||
:x="(_: Data, i: number) => i"
|
||||
:x="(_d: Data, i: number) => i"
|
||||
:y="(d: Data) => d[category]"
|
||||
:curve-type="curveType"
|
||||
:color="colors[i]"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ function template(d: any) {
|
|||
}
|
||||
}
|
||||
|
||||
function color(_: unknown, i: number) {
|
||||
function color(_d: unknown, i: number) {
|
||||
return props.colors[i] ?? 'transparent'
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user