{"action":"created","issue":{"url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/328","repository_url":"https://api.github.com/repos/jtblin/angular-chart.js","labels_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/328/comments","events_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/328/events","html_url":"https://github.com/jtblin/angular-chart.js/issues/328","id":138952910,"number":328,"title":"Pie chart is not getting distoryed if data is set to null","user":{"login":"sandeeproop","id":103842,"avatar_url":"https://avatars.githubusercontent.com/u/103842?v=3","gravatar_id":"","url":"https://api.github.com/users/sandeeproop","html_url":"https://github.com/sandeeproop","followers_url":"https://api.github.com/users/sandeeproop/followers","following_url":"https://api.github.com/users/sandeeproop/following{/other_user}","gists_url":"https://api.github.com/users/sandeeproop/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeeproop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeeproop/subscriptions","organizations_url":"https://api.github.com/users/sandeeproop/orgs","repos_url":"https://api.github.com/users/sandeeproop/repos","events_url":"https://api.github.com/users/sandeeproop/events{/privacy}","received_events_url":"https://api.github.com/users/sandeeproop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-07T11:08:56Z","updated_at":"2016-03-09T13:05:00Z","closed_at":null,"body":"Hi,\r\nI am trying to hide the pie chart if i don't have data but when i pass chat-data=\"null\". It doesn't do any thing.\r\nIt is probably because of following line.\r\n if (! newVal || ! newVal.length || (Array.isArray(newVal[0]) && ! newVal[0].length)) return; \r\nIn my opinion it should destroy existing chart.\r\nRequest you to please let me know if there is some work around already available. "},"comment":{"url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/comments/194287611","html_url":"https://github.com/jtblin/angular-chart.js/issues/328#issuecomment-194287611","issue_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/328","id":194287611,"user":{"login":"gkampjes","id":13245415,"avatar_url":"https://avatars.githubusercontent.com/u/13245415?v=3","gravatar_id":"","url":"https://api.github.com/users/gkampjes","html_url":"https://github.com/gkampjes","followers_url":"https://api.github.com/users/gkampjes/followers","following_url":"https://api.github.com/users/gkampjes/following{/other_user}","gists_url":"https://api.github.com/users/gkampjes/gists{/gist_id}","starred_url":"https://api.github.com/users/gkampjes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkampjes/subscriptions","organizations_url":"https://api.github.com/users/gkampjes/orgs","repos_url":"https://api.github.com/users/gkampjes/repos","events_url":"https://api.github.com/users/gkampjes/events{/privacy}","received_events_url":"https://api.github.com/users/gkampjes/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T13:05:00Z","updated_at":"2016-03-09T13:05:00Z","body":"Use ng-hide/ng-show to hide the chart when it's got no data."}}