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

104
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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