score:4

Accepted answer

You can access this.$refs.canvas in your chart component. If you want to access it from your parent component there are several ways.

The fast unclean way is over this.$children https://vuejs.org/v2/api/#vm-children

A better way would be to setup the gradient stuff into a own method and pass in all data as props to your chart component.


Related Query

More Query from same tag