Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable hiding of tooltips on hover? #11808

Closed
1 of 3 tasks
vsevjednom-cz opened this issue Jun 11, 2024 · 5 comments
Closed
1 of 3 tasks

How to disable hiding of tooltips on hover? #11808

vsevjednom-cz opened this issue Jun 11, 2024 · 5 comments

Comments

@vsevjednom-cz
Copy link

vsevjednom-cz commented Jun 11, 2024

Documentation Is:

  • Missing or needed?
  • Confusing
  • Not sure?

Please Explain in Detail...

Version: 2.9.4
Tooltips hides when I move with my mouse. Only sometimes. You can check it here: https://asteroid.vsevjednom.cz/ - move with your mouse slowly. It was more broken and I was do it better with tooltips: { enabled: true, but sometimes tooltips still hides.

Your Proposal for Changes

Disable hidding.

Example

move with your mouse slowly

@vsevjednom-cz
Copy link
Author

I tried many many changes of my code. For example: events: ["mousemove", "mouseout", "click", "touchstart", "touchmove", "touchend"] - but hiding is still there when I remove mousemove and mouseout.

@vsevjednom-cz vsevjednom-cz changed the title How to disable hide of tooltips on hover? How to disable hiding of tooltips on hover? Jun 12, 2024
@vsevjednom-cz
Copy link
Author

vsevjednom-cz commented Jun 12, 2024

Uaaa, options -> events: [], stops hiddening things but I don't see where is my mouse - ctx.moveTo and ctx.lineTo doesn't work.

@vsevjednom-cz
Copy link
Author

vsevjednom-cz commented Jun 12, 2024

When I delete this, hidding is gone but I can't see where is my mouse:

     afterEvent: (chart, evt) => {
      const {
        chartArea: {
          top,
          bottom,
          left,
          right
        }
      } = chart;
      const {
        x, y
      } = evt;
      if (x < left || x > right || y < top || y > bottom) {
        chart.corsair = {
          x, y,
          draw: true
        };
        chart.draw();
        return;
      };
      chart.corsair = {
        x,y,
        draw: true
      };

      chart.draw();
    },

@vsevjednom-cz
Copy link
Author

vsevjednom-cz commented Jun 12, 2024

Wow, "error" was here: chart.draw();. Hidding is gone! But there is new little "error": I can see where was my mouse soon (point) when I move with my mouse too fast.

@LeeLenaleee
Copy link
Collaborator

Chart.js version 2 is not supported anymore, you are using custom code and don't have a reproducible sample.

If you still have this issue with version 4 and a reproducible sample you can re open this. Otherwise you will need to ask your question on stack overflow

@LeeLenaleee LeeLenaleee closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants