diff --git a/.changeset/open-rocks-move.md b/.changeset/open-rocks-move.md deleted file mode 100644 index 2534cb18..00000000 --- a/.changeset/open-rocks-move.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@devgateway/dvz-ui-react": patch ---- - -Fix chart tooltips extending off-screen near the edges of the viewport, on both desktop and mobile. Tooltips are now clamped to stay within the visible viewport bounds instead of relying solely on the chart library's own (container-relative) positioning. - -- `Tooltip.jsx` (used by Bar, Line, Pie and Bump charts) and `ChartTooltip.jsx` (used by GroupedBars and Sankey) now measure the rendered tooltip and nudge it back on-screen if it overflows the left, right, top or bottom edge of the viewport. -- The manual d3 tooltip in `LineLayer.jsx` (line-over-bar overlay) is clamped the same way instead of always positioning itself using unbounded `pageX`/`pageY` offsets. diff --git a/packages/dvz-ui/CHANGELOG.md b/packages/dvz-ui/CHANGELOG.md index 7d6e45d7..9c5a9ecb 100644 --- a/packages/dvz-ui/CHANGELOG.md +++ b/packages/dvz-ui/CHANGELOG.md @@ -1,5 +1,13 @@ # @devgateway/dvz-ui-react +## 1.9.5 + +### Patch Changes + +- [#269](https://github.com/devgateway/data-viz-ui/pull/269) [`a4cd716`](https://github.com/devgateway/data-viz-ui/commit/a4cd71672a7cfee8c1a317d43327ae2361ec0f91) Thanks [@timothygachengo](https://github.com/timothygachengo)! - Fix chart tooltips extending off-screen near the edges of the viewport, on both desktop and mobile. Tooltips are now clamped to stay within the visible viewport bounds instead of relying solely on the chart library's own (container-relative) positioning. + - `Tooltip.jsx` (used by Bar, Line, Pie and Bump charts) and `ChartTooltip.jsx` (used by GroupedBars and Sankey) now measure the rendered tooltip and nudge it back on-screen if it overflows the left, right, top or bottom edge of the viewport. + - The manual d3 tooltip in `LineLayer.jsx` (line-over-bar overlay) is clamped the same way instead of always positioning itself using unbounded `pageX`/`pageY` offsets. + ## 1.9.4 ### Patch Changes diff --git a/packages/dvz-ui/package.json b/packages/dvz-ui/package.json index b20fc5b0..f0a65cf7 100644 --- a/packages/dvz-ui/package.json +++ b/packages/dvz-ui/package.json @@ -1,6 +1,6 @@ { "name": "@devgateway/dvz-ui-react", - "version": "1.9.4", + "version": "1.9.5", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", "types": "dist/types/index.d.ts",