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

105
Vistas
Second dataset with single point makes y axis too big on Chart.js

I have a Chart.js scatter chart in an HTML document that shows three datasets. The first dataset has 101 datapoints and the chart scales the x- and y- axes correctly.

The other two datasets each contain a single datapoint. In both cases, the x and y values lie within the ranges of the first dataset. However, when I include one or both of these datasets, the y-axis becomes far too large, which causes the plot of the first dataset to be squashed toward the bottom of the chart.

Including one or both of these single-point datasets without the larger dataset has the same effect on the y-axis.

What's going on?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It was simple in the end. I was trying to give it a single datapoint, rather than a list of datapoints containing a single item.

I'm still not entirely sure why that would have affected the y-axis the way it did, but at least this is here now in case anyone else makes the same mistake.

about 4 years ago · Juan Pablo Isaza Denunciar
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