fix: keep crosshair visible for explicitly bound band axes - #4642
Open
biubiukam wants to merge 1 commit into
Open
fix: keep crosshair visible for explicitly bound band axes#4642biubiukam wants to merge 1 commit into
biubiukam wants to merge 1 commit into
Conversation
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.
🤔 这个分支是...
🔗 相关 issue 链接
Fix #4127
Issue #4127
🔗 相关的 PR 链接
N/A
🐞 Bugserver 用例 id
N/A
💡 问题的背景&解决方案
在 common chart 中同时配置 bottom 和 top 两个 band 轴,并通过:
显式绑定多个离散轴时,crosshair 无法显示。
问题原因是
_setAllAxisValues原先只要检测到同方向存在多个离散轴,就会将 crosshair 的enable设置为false,没有区分用户是否已经通过bindingAxesIndex明确选择了轴。本次修改:
bindingAxesIndex时,允许 crosshair 同时处理多个明确绑定的 band 轴。[1, 2],且未绑定的同向轴不会被处理。未修改公开 API 和 TypeScript 类型定义;未显式绑定多个离散轴时仍保持原有行为。
📝 Changelog
bindingAxesIndex.bindingAxesIndex显式绑定多个 band 轴时 crosshair 消失的问题。☑️ 自测
✅ 验证结果
pnpm --filter @visactor/vchart exec jest __tests__/unit/core/vchart-event.test.ts --runInBandpnpm --filter @visactor/vchart run compilenode common/scripts/install-run-rush.js run -p @visactor/vchart -s build:cjsnode common/scripts/install-run-rush.js test -t @visactor/vchartgit diff --check均通过🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough