mirror of
https://github.com/wassname/cardsforscience.git
synced 2026-08-20 12:10:16 +08:00
Add clear method to Histogram
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user