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

204
Views
Only display current y-value on ToolTip in chart.js

I am working on a developing a chart using Chart.js and I want to only display te y-axis value in the tool-tip. Currently it displays:

date name_of_line: measurement

ex. Jan 1, 2020, 8:00:00 AM 5th Percentile: 100 oz.

And this is what I want it to look like: 5th Percentile: 100 oz

Here is the code I have so far to format the y-axis tooltip:

callbacks: {
                    label: function(context) {
                        let label = context.dataset.label || '';

                        if (label) {
                            label += ': ';
                        }

                        if (context.parsed.y !== null) {
                            label += new Intl.NumberFormat('en-US').format(context.parsed.y);
                            label += ' oz';
                        }

                        return label;
                    }
}
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

I ended up figuring out how to get this to work.

about 4 years ago · Santiago Gelvez 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!