diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-27 21:32:42 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-27 21:32:42 +0300 |
| commit | bd86e04f112edbe0f6b4f8c2b6a8a5161ff11699 (patch) | |
| tree | 08b4353a511604fb556f26ec70caea42aa071953 /test | |
| parent | 3c8d9f7aa49b278f3be050f76a8a759d3343b663 (diff) | |
showcase: stretch SVG to fill browser window in both axes (non-uniform scale)
Replace the uniform min(W/CHART_W, H/CHART_H) scale — which left blank bars
along the shorter axis — with independent x/y scales:
sx = W / CHART_W
sy = H / CHART_H
This maps the fixed CHART_W × CHART_H design coordinate space exactly onto
the current window dimensions, filling every pixel with no letterboxing.
The centering translate is no longer needed and is removed.
chartEl.getScreenCTM().inverse() handles the two-component transform
correctly, so tooltip hit-testing remains accurate at any window shape.
Tooltip boundary clamping still uses CHART_W / CHART_H (chart coordinates).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions
