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

Support customing the fill attribute of the chart component #2027

Open
1 task
HelloAny opened this issue Dec 4, 2024 · 2 comments
Open
1 task

Support customing the fill attribute of the chart component #2027

HelloAny opened this issue Dec 4, 2024 · 2 comments

Comments

@HelloAny
Copy link

HelloAny commented Dec 4, 2024

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

What problem does this feature solve?

  1. Help users more flexibly modify the background of the Chart component.
  2. When I adapt to the company's hybrid container, will get some error when useing 'transparent'.

What does the proposed API look like?

const { fillStyle } = props;

  <group
        ref={this.coordRef}
        style={{
          width: width,
          height: height,
          fill: fillStyle || 'transparent',
        }}
      >
...
 </group>
@HelloAny
Copy link
Author

HelloAny commented Dec 4, 2024

fill: 'transparent',

@HelloAny
Copy link
Author

HelloAny commented Dec 5, 2024

I got a idea to extend Chart Instance, and override the Render Function. But this approach seems not very flexible.

class NewChart extends Chart {
   ...super
render() {

}
}

This approach need to compile with babel/plugin-transform-react-jsx. But my project is use Vue framework. This does not seem to be a very good way

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

No branches or pull requests

1 participant