Skip to content
Snippets Groups Projects
Commit 9fc043f9 authored by Prasad's avatar Prasad
Browse files

Fixes #445: Avoid overlapping replots

parent 34b848c8
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
this.element = false; this.element = false;
this.init = function(element,data,options) { this.init = function(element,data,options) {
jQuery(element).empty(); /* Clear any existing content to avoid overlapping redraw */
vtChart.prototype.init.call(this,element,data,options); vtChart.prototype.init.call(this,element,data,options);
} }
...@@ -32,10 +33,10 @@ ...@@ -32,10 +33,10 @@
console.log('supported interface not found!'); console.log('supported interface not found!');
return this.each(function(index,element){ return this.each(function(index,element){
var jQElement = jQuery(element); var jQElement = jQuery(element).empty(); /* Clear any existing content to avoid overlapping redraw */
var instance = new vtChart(); var instance = new vtChart();
instance.init(jQElement,data[0],data[1]); instance.init(jQElement,data[0],data[1]);
}); });
} }
})( jQuery ); })( jQuery );
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment