Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I wanted to know if there is a way to show the tooltip on the line chart without going exactly hover the small single point but always, exactly like highcharts or Google.
It's a UX problem.

linechartotolip.mp4
You must be logged in to vote

Take a look at https://www.chartjs.org/docs/latest/samples/tooltip/interactions.html

Edit: not shown in the sample, but you can further adjust the interactions with axis: 'x' | 'y' | 'xy'.
I usually end up using:

new Chart(ctx, {
  data: {...},
  options: {
    interaction: {
      mode: 'nearest',
      axis: 'x',
      intersect: false
    }
  }
});

Replies: 4 comments · 3 replies

Comment options

Take a look at https://www.chartjs.org/docs/latest/samples/tooltip/interactions.html

Edit: not shown in the sample, but you can further adjust the interactions with axis: 'x' | 'y' | 'xy'.
I usually end up using:

new Chart(ctx, {
  data: {...},
  options: {
    interaction: {
      mode: 'nearest',
      axis: 'x',
      intersect: false
    }
  }
});
You must be logged in to vote
1 reply
@AliDarrudi67
Comment options

i use this code but datalabels not show and i have to hover
...
options: {
// events: [],
interaction: {
mode: 'nearest',
axis: 'x',
intersect: false
}
scales: {
y: {
beginAtZero: true,
display: false
}
}
},

Answer selected by DavideViolante
Comment options

For me not work.

You must be logged in to vote
0 replies
Comment options

Not Worked

You must be logged in to vote
2 replies
@LeeLenaleee
Comment options

Can you share your code in a jsfiddle?

@harsh-hcah
Comment options

Hi, check this https://jsfiddle.net/w7amshnf/

Comment options

How to show tooltips on line chart without hovering the single point for me also want solution please anybody help me

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
7 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.