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 axis style callback #2846

Closed
wants to merge 5 commits into from
Closed

Fix axis style callback #2846

wants to merge 5 commits into from

Conversation

simaQ
Copy link
Contributor

@simaQ simaQ commented Sep 20, 2020

配合 :antvis/component#191 (测试用例也在该 PR 补充)

对于 axis 的样式回调,从样式统一、易用性角度,需要 mix G2 默认主题样式,否则用户需要自己填写样式属性,如果用户不知情,在某些情况下就会以为是 BUG,比如只是对文本内容进行回调:

chart.axis('x', {
  label: {
    style: (val) => { 
      return {
        text: val + '$'
      };
    }
  }
});

@simaQ simaQ requested a review from hustcc September 20, 2020 09:55
@hustcc
Copy link
Member

hustcc commented Sep 20, 2020

好像基于我那个还么有合并的分支吧?先合并那个再rebase,再处理这个?

@simaQ
Copy link
Contributor Author

simaQ commented Sep 21, 2020

好像基于我那个还么有合并的分支吧?先合并那个再rebase,再处理这个?

@simaQ simaQ closed this Sep 21, 2020
@hustcc hustcc deleted the fix-axis-style-callback branch September 21, 2020 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants