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

Set active color and inactive color of legend in dark theme #3375

Closed
1 task
wangtao0101 opened this issue Apr 15, 2021 · 1 comment · Fixed by #3376
Closed
1 task

Set active color and inactive color of legend in dark theme #3375

wangtao0101 opened this issue Apr 15, 2021 · 1 comment · Fixed by #3376

Comments

@wangtao0101
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

在黑色主题下,legend active的时候颜色有点暗,而inactive比较亮。希望能够改成active的时候亮一点,inactive的时候灰一点。
或者能够提供自定义的api

Environment Info
g2 4.1.14
System -
Browser -
@visiky
Copy link
Member

visiky commented Apr 15, 2021

和主题进行一个 merge 设置一下主题:

theme: {
   components: {
          legend: {
            top: {
              itemStates: {
                unchecked: {
                  nameStyle: {
                    fill: '#666',
                  },
                  markerStyle: {
                    stroke: '#666'
                  },
                },
              }
            }
          }
        }
}

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 a pull request may close this issue.

2 participants