{"action":"created","issue":{"url":"https://api.github.com/repos/chartjs/Chart.js/issues/3573","repository_url":"https://api.github.com/repos/chartjs/Chart.js","labels_url":"https://api.github.com/repos/chartjs/Chart.js/issues/3573/labels{/name}","comments_url":"https://api.github.com/repos/chartjs/Chart.js/issues/3573/comments","events_url":"https://api.github.com/repos/chartjs/Chart.js/issues/3573/events","html_url":"https://github.com/chartjs/Chart.js/issues/3573","id":188260273,"number":3573,"title":"[BUG] Can't create chart with a canvas from document.createElement","user":{"login":"sclausen","id":916076,"avatar_url":"https://avatars.githubusercontent.com/u/916076?v=3","gravatar_id":"","url":"https://api.github.com/users/sclausen","html_url":"https://github.com/sclausen","followers_url":"https://api.github.com/users/sclausen/followers","following_url":"https://api.github.com/users/sclausen/following{/other_user}","gists_url":"https://api.github.com/users/sclausen/gists{/gist_id}","starred_url":"https://api.github.com/users/sclausen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sclausen/subscriptions","organizations_url":"https://api.github.com/users/sclausen/orgs","repos_url":"https://api.github.com/users/sclausen/repos","events_url":"https://api.github.com/users/sclausen/events{/privacy}","received_events_url":"https://api.github.com/users/sclausen/received_events","type":"User","site_admin":false},"labels":[{"id":32309884,"url":"https://api.github.com/repos/chartjs/Chart.js/labels/Category:%20Bug","name":"Category: Bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/chartjs/Chart.js/milestones/11","html_url":"https://github.com/chartjs/Chart.js/milestones/Version%202.5","labels_url":"https://api.github.com/repos/chartjs/Chart.js/milestones/11/labels","id":2087667,"number":11,"title":"Version 2.5","description":"","creator":{"login":"etimberg","id":6757853,"avatar_url":"https://avatars.githubusercontent.com/u/6757853?v=3","gravatar_id":"","url":"https://api.github.com/users/etimberg","html_url":"https://github.com/etimberg","followers_url":"https://api.github.com/users/etimberg/followers","following_url":"https://api.github.com/users/etimberg/following{/other_user}","gists_url":"https://api.github.com/users/etimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/etimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etimberg/subscriptions","organizations_url":"https://api.github.com/users/etimberg/orgs","repos_url":"https://api.github.com/users/etimberg/repos","events_url":"https://api.github.com/users/etimberg/events{/privacy}","received_events_url":"https://api.github.com/users/etimberg/received_events","type":"User","site_admin":false},"open_issues":58,"closed_issues":7,"state":"open","created_at":"2016-10-23T22:40:28Z","updated_at":"2016-11-14T01:56:36Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-11-09T14:28:27Z","updated_at":"2016-11-14T06:38:15Z","closed_at":null,"body":"I tried to render the chart on a procedurally generated canvas, but an error is thrown.\r\n\r\n## Expected Behavior\r\nThe following should have worked.\r\n``` javascript\r\nvar canvas = document.createElement(\"canvas\");\r\ncanvas.width = 800;\r\ncanvas.height = 600;\r\nvar ctx = canvas.getContext('2d');\r\nvar myLineChart = new Chart(ctx, options);\r\n```\r\n## Current Behavior\r\nAn error is thrown\r\n```\r\nTypeError: Cannot read property 'currentStyle' of null\r\n```\r\n\r\n## Steps to Reproduce (for bugs)\r\n[here is a plnkr](http://jsbin.com/sedurayuhe/1/edit?html,js,output)\r\n\r\n## Context\r\nI want to render a chart on a procedurally generated canvas for latter use in an svg `<image>` element as base64 encoded string.\r\n\r\n## Environment\r\n* Chart.js version:2.3.0"},"comment":{"url":"https://api.github.com/repos/chartjs/Chart.js/issues/comments/260259255","html_url":"https://github.com/chartjs/Chart.js/issues/3573#issuecomment-260259255","issue_url":"https://api.github.com/repos/chartjs/Chart.js/issues/3573","id":260259255,"user":{"login":"sclausen","id":916076,"avatar_url":"https://avatars.githubusercontent.com/u/916076?v=3","gravatar_id":"","url":"https://api.github.com/users/sclausen","html_url":"https://github.com/sclausen","followers_url":"https://api.github.com/users/sclausen/followers","following_url":"https://api.github.com/users/sclausen/following{/other_user}","gists_url":"https://api.github.com/users/sclausen/gists{/gist_id}","starred_url":"https://api.github.com/users/sclausen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sclausen/subscriptions","organizations_url":"https://api.github.com/users/sclausen/orgs","repos_url":"https://api.github.com/users/sclausen/repos","events_url":"https://api.github.com/users/sclausen/events{/privacy}","received_events_url":"https://api.github.com/users/sclausen/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T06:38:15Z","updated_at":"2016-11-14T06:38:15Z","body":"@simonbrunel This still doesn't seem to work. [Here is an example](http://jsbin.com/nikosam/edit?html,js,output) Did I do something wrong?"}}
{"actor":{"display_login":"sclausen"}}