Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Tooltip yAlign handle overflow

Open Mushr0000m opened this issue 2 years ago • 1 comments

Expected behavior

By setting the tooltip config to yAlign: 'bottom' I though it would always be shown on top of the point and flip if point is on top of the canvas.

Current behavior

The current behavior is that it works except if the point is on the top of the canvas like here https://codepen.io/Mushr00m/pen/jOaPQzP?editors=1010 for the blue value, the tooltip does not flip to position top it just stick to the top with the caret still on the bottom.

Reproducible sample

https://codepen.io/Mushr00m/pen/jOaPQzP?editors=1010

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

v3.7.0

Browser name and version

No response

Link to your project

No response

Mushr0000m avatar Jan 28 '22 15:01 Mushr0000m

I feel like this is currently working as designed. When a specific tooltip alignment is set, the tooltip maintains that even if it is not the optimal arrangement. I'm actually surprised that the xAlign changes the point at the first and last points.

etimberg avatar Feb 05 '22 15:02 etimberg

Any news about this bug?

NelsonSilvaHubel avatar Jan 04 '23 12:01 NelsonSilvaHubel