From 10a653c764683e33c336bb00962e17c4cc27b53c Mon Sep 17 00:00:00 2001 From: Dakota Wray Date: Mon, 7 Oct 2019 17:35:11 -0400 Subject: [PATCH 1/2] Described reactive options workaround --- docs/guide/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/README.md b/docs/guide/README.md index bbf84bc5..e1846522 100644 --- a/docs/guide/README.md +++ b/docs/guide/README.md @@ -206,7 +206,7 @@ The reactivity system at its current state is not **robust**. You will run into #### Options -The `options` object is not reactive right now. So if you dynamically change the chart options, they will not be recognized by the mixin. +The `options` object is not reactive right now. So if you dynamically change the chart options, they will not be recognized by the mixin. You can create a watcher to destory and rerender when chart options are updated. If you are using the mixin you need to pass in your options as a prop names `options`. This is important because the mixin will call chart.js `update()` method or destroy and render a new chart. If the mixin renders a new chart it calls `this.renderChart(this.chartData, this.options)`. From d9649967fac14eb15e9f9c7d8ba736623cedcc04 Mon Sep 17 00:00:00 2001 From: Dakota Wray Date: Mon, 7 Oct 2019 17:37:08 -0400 Subject: [PATCH 2/2] Update options reactive workaround. --- docs/guide/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/README.md b/docs/guide/README.md index e1846522..877a0f18 100644 --- a/docs/guide/README.md +++ b/docs/guide/README.md @@ -206,7 +206,7 @@ The reactivity system at its current state is not **robust**. You will run into #### Options -The `options` object is not reactive right now. So if you dynamically change the chart options, they will not be recognized by the mixin. You can create a watcher to destory and rerender when chart options are updated. +The `options` object is not reactive right now. So if you dynamically change the chart options, they will not be recognized by the mixin. You can create a watcher to destroy and rerender when chart options are updated. If you are using the mixin you need to pass in your options as a prop names `options`. This is important because the mixin will call chart.js `update()` method or destroy and render a new chart. If the mixin renders a new chart it calls `this.renderChart(this.chartData, this.options)`.