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

display tooltips only at points in chart area #10289

Merged
merged 3 commits into from May 7, 2022

Conversation

t-mangoe
Copy link
Contributor

@t-mangoe t-mangoe commented Apr 9, 2022

I added code to display tooltips only at points in chart area.
This solves the issue of #10108

@LeeLenaleee LeeLenaleee added this to the Version 3.8.0 milestone Apr 11, 2022
@etimberg etimberg requested a review from kurkle April 16, 2022 14:03
@@ -97,6 +97,10 @@ function getIntersectItems(chart, position, axis, useFinalPosition) {
}

const evaluationFunc = function(element, datasetIndex, index) {
const chartArea = chart.chartArea;
if (element.x < chartArea.left || chartArea.right < element.x || element.y < chartArea.top || chartArea.bottom < element.y) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the _isPointInArea helper function here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the only issue here, @t-mangoe will you be able to update this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry. I noticed the comment, but have not yet updated it.
I will try to respond, so I hope you can wait.
(Or, I allow edits by maintainers, so it is ok that maintainers update this PR.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants