Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

103
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!