Skip to content

Update enter attribute #6

@BenedettaMenaggia

Description

@BenedettaMenaggia

  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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions