{"action":"created","issue":{"url":"https://api.github.com/repos/nnnick/Chart.js/issues/559","labels_url":"https://api.github.com/repos/nnnick/Chart.js/issues/559/labels{/name}","comments_url":"https://api.github.com/repos/nnnick/Chart.js/issues/559/comments","events_url":"https://api.github.com/repos/nnnick/Chart.js/issues/559/events","html_url":"https://github.com/nnnick/Chart.js/issues/559","id":40704717,"number":559,"title":"Clear canvas after drawing a chart (AJAX Request)","user":{"login":"RobMue","id":1439847,"avatar_url":"https://avatars.githubusercontent.com/u/1439847?v=3","gravatar_id":"","url":"https://api.github.com/users/RobMue","html_url":"https://github.com/RobMue","followers_url":"https://api.github.com/users/RobMue/followers","following_url":"https://api.github.com/users/RobMue/following{/other_user}","gists_url":"https://api.github.com/users/RobMue/gists{/gist_id}","starred_url":"https://api.github.com/users/RobMue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobMue/subscriptions","organizations_url":"https://api.github.com/users/RobMue/orgs","repos_url":"https://api.github.com/users/RobMue/repos","events_url":"https://api.github.com/users/RobMue/events{/privacy}","received_events_url":"https://api.github.com/users/RobMue/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-08-20T14:36:36Z","updated_at":"2015-02-18T11:25:06Z","closed_at":"2014-08-20T18:14:16Z","body":"Currently I am trying to draw a new chart after a POST request, which transfers the JSON to the \"canvas\" element. Unfortunately the graph starts jumping around and gets \"fuzzy\" between the grid lines.\r\nThis happens every time when the JSON data has changing datasets - which means, that there are different amounts of grid lines zu draw.\r\n\r\nSo far I have tried\r\n```javascript\r\nctx.clearRect(0, 0, canvas.width, canvas.height);\r\n```\r\nand \r\n```javascript\r\nmyLineChart = new Chart(ctx).Line(jsonData, {\r\n    responsive: true,\r\n    bezierCurveTension : 0.3\r\n});\r\nwindow.myLine = myLineChart;\r\n//... chart is drawn\r\n\r\n// before drawing a new chart\r\nmyLine.clear();\r\n```\r\n\r\nBoth without success. Do you have any tipps/hints to destroy the canvas before redrawing on it?"},"comment":{"url":"https://api.github.com/repos/nnnick/Chart.js/issues/comments/74849381","html_url":"https://github.com/nnnick/Chart.js/issues/559#issuecomment-74849381","issue_url":"https://api.github.com/repos/nnnick/Chart.js/issues/559","id":74849381,"user":{"login":"waniel","id":103401,"avatar_url":"https://avatars.githubusercontent.com/u/103401?v=3","gravatar_id":"","url":"https://api.github.com/users/waniel","html_url":"https://github.com/waniel","followers_url":"https://api.github.com/users/waniel/followers","following_url":"https://api.github.com/users/waniel/following{/other_user}","gists_url":"https://api.github.com/users/waniel/gists{/gist_id}","starred_url":"https://api.github.com/users/waniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waniel/subscriptions","organizations_url":"https://api.github.com/users/waniel/orgs","repos_url":"https://api.github.com/users/waniel/repos","events_url":"https://api.github.com/users/waniel/events{/privacy}","received_events_url":"https://api.github.com/users/waniel/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T11:25:06Z","updated_at":"2015-02-18T11:25:06Z","body":"How would one access any chart instances, say from outside of the invocation scope of the chart?\r\n\r\nI can target any canvas elements, but I can't see any reference to the chart instance"}}