Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

238
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda