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

82
Vistas
I want to update my x axis of Line Chart into equal intervals of 10 in react charts. I have the start and end time

I have the start and end time in my x axis, but I want to display upto 10 time intervals on my x axis. For example if my start time is 10:00 am and end time is 10:30, I want to show 10:00am, 10:05am, 10:10am and so on based on what time range we get. How can I do it in react-chartjs? If the difference in start and end time is 1 hour then it should give me an x axis with 10 equal intervals and so on.

chartOption in state is:

chartOptions: {
                scales: {
                    x: {
                        type: 'timeseries',
                        ticks: {
                            maxTicksLimit: 10
                        },
                       distribution: 'linear'
                    },
                    yAxes: {
                        min: 50,
                        max: 100,
                        ticks: {
                            maxTicksLimit: 10
                        }
                    }
                }

data:

formatData = {
           labels: [moment().format('hh:mm'), momentInstance().subtract(30,'m').format('hh:mm')],
           datasets: [{
            }]
        }
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