antvis/G2

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

wangtao0101 posted onGitHub

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

Edit on CodeSandbox

Steps to reproduce

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

Environment Info
g2 4.1.14
System -
Browser -

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


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

theme: {
   components: {
          legend: {
            top: {
              itemStates: {
                unchecked: {
                  nameStyle: {
                    fill: '#666',
                  },
                  markerStyle: {
                    stroke: '#666'
                  },
                },
              }
            }
          }
        }
}
posted by visiky about 4 years ago

Fund this Issue

$0.00
Funded

Pull requests