const animationEnterProp = {
y: (_: BarchartCountriesDataset[number], index: number, nodes: SVGTextElement[]) => {
const selectedNode = nodes[index]
const y = selectedNode.getAttribute('y')
return y
}
}
<BarData
data={countriesRanking}
dataKey={(d) => d.countryIso3}
y={(d) => d.countryIso3}
x={{ to: () => xDomain[0], base: () => xDomain[1] }}
fill={'#F1F2F5'}
enter={animationEnterProp}
opacity={1}
/>
Dare la possibilità di passare una funzione all'attributo enter