mirror of
				https://github.com/KevinMidboe/vue-chartjs.git
				synced 2025-10-29 18:00:20 +00:00 
			
		
		
		
	fix(mixins): Check for chartjs instance before rendering chart
Closes #288
This commit is contained in:
		| @@ -63,6 +63,9 @@ module.exports = { | ||||
|             this.renderChart(this.chartData, this.options) | ||||
|           } | ||||
|         } else { | ||||
|           if (this.$data._chart) { | ||||
|             this.$data._chart.destroy() | ||||
|           } | ||||
|           this.renderChart(this.chartData, this.options) | ||||
|         } | ||||
|       } | ||||
|   | ||||
| @@ -63,6 +63,9 @@ module.exports = { | ||||
|             this.renderChart(this.chartData, this.options) | ||||
|           } | ||||
|         } else { | ||||
|           if (this.$data._chart) { | ||||
|             this.$data._chart.destroy() | ||||
|           } | ||||
|           this.renderChart(this.chartData, this.options) | ||||
|         } | ||||
|       } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user