Skip to content

Commit

Permalink
destory line charts on focus
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjennings committed Sep 18, 2015
1 parent 9bf5df2 commit 7200a33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eon-chart",
"version": "0.3.7",
"version": "0.3.8",
"homepage": "https://github.com/pubnub/eon-chart",
"authors": [
"Ian Jennings <ian@meetjennings.com>"
Expand Down
7 changes: 6 additions & 1 deletion pubnub-c3.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,13 @@ eon.c = {
var updateInterval = false;

var kill = function() {
// self.chart.destroy(); this breaks circular charts (pie, donut, gauge)

if(['donut', 'pie', 'gauge'].indexOf(options.generate.data.type) == -1) {
self.chart.destroy();
}

delete self.chart;

};

var boot = function() {
Expand Down

0 comments on commit 7200a33

Please sign in to comment.