Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
Victory Native Scatter Chart is not detecting click events consistently on Android

I'm trying to use Victory Native to show a graph, where I can click each point to trigger an event. However, the click event doesn't seem to be recorded every time. After a long time trying, I got it to detect clicks sometimes if I spam a point. Furthermore, the weird part is that the name of the event that is being caught is 'onPress', when in the docs it mentions 'onClick' and in the library itself, it only shows 'onclick' (without camelscase) as the valid event.

Code:

<Svg style={{borderWidth: 5, width: ls(1200), height: ls(500)}}>
  <VictoryChart
      theme={theme}
      maxDomain={{y: 1, x: MAX_NUMBER_SCORES}}
      domainPadding={{x: 10}}
      width={ls(1200)}
      height={ls(500)}>
    <VictoryAxis dependentAxis />
    <VictoryAxis style={{tickLabels: {fontSize: 0}, ticks: {size: 0}}} />
    <VictoryLine
        data={data}
        style={{data: {stroke: '#315356', strokeWidth: 4}}} />
    <VictoryArea
        style={{data: {fill: 'rgba(97, 214, 214, 0.1)'}}}
        data={data} />
    <VictoryScatter
        data={data}
        size={10}
        style={{
          data: {
            fill: ({datum: {color, aboveThreshold}}) =>
              color ??
              (aboveThreshold
                ? graphColors.ACTIVE_DEFECT
                : graphColors.NO_DEFECT),
          },
        }}
        events={[
          {
            target: 'data',
            eventHandlers: {
              onPress: () => {
                console.log('onPress');
              },
              onclick: () => console.log('onclick'),
              onClick: () => console.log('onClick'),
              onpress: () => console.log('onpress'),
            },
          },
        ]} />
  </VictoryChart>
</Svg>

Also is there a way to make each point responsive to touch?

Thank you.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda