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

chartOptions reactivity #116

Closed
sudo-shubham opened this issue Jun 2, 2017 · 1 comment
Closed

chartOptions reactivity #116

sudo-shubham opened this issue Jun 2, 2017 · 1 comment

Comments

@sudo-shubham
Copy link

Feature Request
Set reactivity in chartOptions

@apertureless
Copy link
Owner

apertureless commented Jun 2, 2017

@shubhampatel812

You can add a watcher yourself, and then call renderChart again.

export default Line.extend({
  props: ['data', 'options'],
  mounted () {
    this.renderChart(this.data, this.options)
  },
 watch: {
  'options':  function (newOptions) {
      this.renderChart(this.data, newOptions)
    }
  }
})

It is however hard to implement this by default, as you set the name of your chart data and chart options props by yourself. And pass them to the render function.

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

2 participants