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

Update colors #4

Open
Christilut opened this issue May 27, 2017 · 1 comment
Open

Update colors #4

Christilut opened this issue May 27, 2017 · 1 comment

Comments

@Christilut
Copy link

The value of the pie chart updates properly but the color does not. Any way to force a redraw?

  data () {
    return {
      data: '100/100',
      fillColor: 'green'
    }
  },
  mounted() {
    setTimeout(() => {
      this.data = '50/100'
      this.fillColor = 'red'
    }, 1000);
  },
@tomshand
Copy link

tomshand commented Nov 24, 2017

Managed to fix by updating the watch method in Peity.vue:

watch: { data (val) { this.$nextTick(() => { this.chart.raw = val this.chart.draw() }) }, **options (val) { this.$nextTick(() => { this.chart.options = val this.chart.draw() }) }** }

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