fix(axis): 修复旋转标签采样角度单位不一致 - #4690
Merged
Merged
Conversation
skie1997
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
旋转坐标轴标签使用
angle: 90时,绘制路径转换为弧度,采样路径却把90当作弧度,导致标签被过度抽样。本次在公共采样入口复用transformToGraphic,使采样和绘制使用一致的角度单位,同时保留原始 spec。🤔 这个分支是...
🐞 Bugserver 用例 id
646745e9cb5fa8011f4e0344 — axis-lable style
💡 问题的背景&解决方案
transformToGraphic改为返回新对象后,采样路径不能再依赖绘制时原地转换角度的副作用。AxisComponent._tickTransformOption()现在通过同一个工具转换labelStyle,生产代码只改一行。原 style 不会被修改,重复更新也不会对已转换的角度再次转换。新增真实图表回归测试,覆盖正负 90° 下长短标签采样一致、更新为 0° 后恢复原角度,以及输入和轴内部 spec 角度保持不变。补充中文 patch 记录及验证文档。
📝 Changelog
☑️ 自测
验证:
update-spec测试:8 个套件、77 个测试通过。develop(a6c1e7f48),新增的 2 个回归测试再次通过。git diff --check通过。poptip/simple-register.test.ts、animation/manual-ticker.test.ts的Compiler.initView初始化处出现defaultLayer === null;失败套件在另一轮可通过,poptip 单独重跑也通过。jest --runInBand执行完整 VChart 测试:89 个套件、507 个测试全部通过;vutils-extension 的 1 个测试也通过,其余包未定义测试。🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough