ngx-charts icon indicating copy to clipboard operation
ngx-charts copied to clipboard

bugfix: tooltip content placement

Open Algoritm211 opened this issue 7 months ago • 0 comments

What kind of change does this PR introduce? (check one with "x")

  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Other... Please describe:

What is the current behavior? (You can also link to an open issue here) Initial bug - https://github.com/swimlane/ngx-charts/issues/1640 . Unfortunately, now when using a custom tooltipTemplate in a vertical bar chart, the left most bar's tooltip is not calculated correctly and can be clipped based on template content. Screenshot 2024-07-09 at 17 55 15

What is the new behavior? This is a solution for https://github.com/swimlane/ngx-charts/issues/1640. Now tooltip's content won't be outside the screen and will be always in viewport. The tooltip position is automatically adjusted for maximum visibility aligning with left corner

Screenshot 2024-07-09 at 17 56 47

Does this PR introduce a breaking change? (check one with "x")

  • [ ] Yes
  • [x] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

Algoritm211 avatar Jul 09 '24 14:07 Algoritm211