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

173
Vistas
React: react-google-charts timeline: displaying two different formats on the same axis

Right now I'm trying to update an hourly timeline chart to use the following horizontal axis format:

  • For the tick at the left side of the chart, or for any ticks where the date changes, use the format "EE HH:mm" (display day and time)
  • Otherwise, just use the format "HH:mm" (just display time)

I've looked on stack overflow and at the google tutorials and have been unable to find any examples on how to do this. Does anybody know how to use two different formats on the same axis?

Here's the current Chart object:

<Chart
      width="100%"
      chartType="Timeline"
      loader={<div>Loading Chart ...</div>}
      data={[metaData, ...passes]}
      options={{
        title: "timeline chart", 
        height: ch*41+100,
        hAxis: {
          format: "EE HH:mm",
          minValue: min,
          maxValue: max,
        }
      }}
    />

How can I have different formats for different ticks on the chart's horizontal axis?

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