Add clear method to Histogram

This commit is contained in:
Igor Babuschkin
2014-08-02 15:14:44 +02:00
parent 7429e489bd
commit 2485b7584c
+6
View File
@@ -109,5 +109,11 @@ function Histogram(ident) {
draw_hist(ident, this.values.slice(0, this.counter+num));
this.counter += num;
}
this.clear = function() {
d3.select(ident).select("svg").remove();
draw_hist(ident, []);
this.counter = 0;
}
}