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

240
Visualizações
How to Create and Track Values on Chart with Vertical Cursor React-Native-Chart-Kit

I built a chart using the react-native-chart-kit. I do not want to use any solid data points so I set the setDots={false} so it is just a clean line. I am trying to create a vertical cursor to track the line values and create a tool tip to show what the values are. I am trying to use the onDataPointClick function but it is not working - I am assuming it must use the dots for that.

Is there anyway to make the capability ?


    <LineChart
                                          data={{
                                            datasets: [
                                              {
                                                data: this.state.cryptoChartData,
                                                color: (opacity = 1) =>
                                                  `rgba(167, 199, 231, ${opacity})`,
                                              },
                                            ],
                                          }}
                                          onDataPointClick={() => {
                                            console.log('clicked');
                                          }}
                                          width={deviceWidth} // from react-native
                                          height={220}
                                          withDots={false}
                                          yAxisLabel="$"
                                          withInnerLines={false}
                                          chartConfig={{
                                            backgroundColor: '#ffffff',
                                            backgroundGradientFrom: '#ffffff',
                                            backgroundGradientTo: '#ffffff',
                                            fillShadowGradient: '#007AFF',
                                            fillShadowGradientOpacity: 1,
                                            decimalPlaces: 0, // optional, defaults to 2dp
                                            color: (opacity = 1) =>
                                              `rgba(0,0,0,${opacity})`,
                                            labelColor: (opacity = 1) =>
                                              `rgba(0,0,0,${opacity})`,
                                            style: {
                                              borderRadius: 1,
                                            },
                                          }}
                                          bezier
                                          getDotPo
                                          style={{
                                            marginVertical: 5,
                                            borderRadius: 16,
                                          }}
                                        />

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