You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains 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
Correct directions of arcs converted from lines when the coordinate is reflected in the x dimension.
This allows users to make polar charts counter-clockwise by adding `.reflect('x')`
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.
WIP: 测试暂缺
Checklist
npm test
passesDescription of change
对极坐标系施加
reflect('x')
、scale(-1, 1)
或scale(1, -1)
变换都可以将其由顺时针改为逆时针但在当前版本中都存在一些问题 (Issue #3051)
其中
reflect('x')
似乎更为合适也更容易修复因此本 PR 专注于解决与极坐标系镜像有关的问题
例1:玉珏图
已解决:
reflect('x')
时的弧线方向、line axis 的文字位置未解决:label 不显示(与镜像无关)
例2:极坐标系下的分组柱状图
已解决:
reflect('x')
时柱顶弧线方向、circle axis 的方向、reflect('y')
时图形不显示未解决:shared tooltip 拾取错误(根源在@antv/coord)、active-region 显示位置错误
例3:玫瑰图-限定角度范围
(注释掉
verticalFactor: 1
)已解决:需要手动指定
verticalFactor
、reflect('x')
时柱顶弧线方向、circle axis 的方向、reflect('y')
时 circle axis 的 label 不显示未解决:line axis 的 label 与图例重叠、一条位置错误的 line grid(与镜像无关)、
reflect('x')
时 circle grid 弧线方向(需决定修改@antv/component还是g2)