Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: overflowHide error in some case #6597

Merged
merged 2 commits into from
Jan 24, 2025
Merged

fix: overflowHide error in some case #6597

merged 2 commits into from
Jan 24, 2025

Conversation

hustcc
Copy link
Member

@hustcc hustcc commented Jan 24, 2025

Checklist
Description of change

在部分情况下,出现 js 计算精度问题,所以文本的 bounds 会有极小值超出 interval 区域,导致隐藏。

image

Copy link

Walkthrough

This pull request addresses an error related to the overflowHide functionality in certain cases. It includes updates to test snapshots, introduces a new test for label overlap hiding, and adjusts size limits in the package.json. Additionally, it refines the bounds utility functions to include a threshold parameter for more accurate calculations.

Changes

Files Summary
__tests__/integration/snapshots/static/*.svg Updated test snapshots to reflect changes in visual output.
__tests__/integration/spec-animation.spec.ts Removed unused import statement.
__tests__/plots/api/chart-3d.ts Added @ts-ignore comment for TypeScript error suppression.
__tests__/plots/static/index.ts Exported new function salesIntervalLabelOverlapHide.
__tests__/plots/static/sales-interval-label-overlap-hide.ts Added new test for sales interval label overlap hiding.
package.json Increased size limits for certain build artifacts.
src/utils/bounds.ts Added threshold parameter to isInBounds and isOverflow functions for improved accuracy.

@hustcc hustcc force-pushed the fix-label-transform branch from d48f9cb to 1569305 Compare January 24, 2025 09:35
@hustcc hustcc merged commit d67f6df into v5 Jan 24, 2025
2 checks passed
@hustcc hustcc deleted the fix-label-transform branch January 24, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

label的overflowHide转换在默认情况下的异常隐藏
2 participants