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

144
Views
Custom position tooltip on top

I am trying to make this example work: https://www.chartjs.org/docs/3.5.1/samples/tooltip/position.html

because it have an option to position the tooltip on the bottom of the graph. I need to do so because I have way too much data in my graph and when I move my cursor the tooltip wiggle around too much. My biggest problem is that, even after adding type="module" to my script tag I still get the following error when I do import {Tooltip} from '/chart.js/dist/chart.js':

Uncaught SyntaxError: The requested module '/chart.js/dist/chart.js' does not provide an export named 'Tooltip'

And that is even after losing 3 hours trying to search on every corner of google. Thanks you so much to anyone who can help me!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Since you are using a script tag the Chart object is made available to you.

So you can just write:

Chart.Tooltip.positioners.customName = customPositionerFunction

There is no need to import anything

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!