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

Access canvas object from parents #184

Closed
HiepVu511 opened this issue Aug 30, 2017 · 2 comments
Closed

Access canvas object from parents #184

HiepVu511 opened this issue Aug 30, 2017 · 2 comments

Comments

@HiepVu511
Copy link

Hi,
Sorry if this is a noob question.
Basically, I want to add gradient background color to a bar chart which receive data from a parent component, so I guess I have to pass the backgroundColor property from parent component too.
So how can I access the canvas object of a chart from the parent component?

@apertureless
Copy link
Owner

You can access the canvas over the refs . Inside your chart component you can access it over this.$refs.canvas.

@HiepVu511
Copy link
Author

HiepVu511 commented Aug 31, 2017

That works great, Thanks !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants