{"action":"created","issue":{"url":"https://api.github.com/repos/chartjs/Chart.js/issues/4273","repository_url":"https://api.github.com/repos/chartjs/Chart.js","labels_url":"https://api.github.com/repos/chartjs/Chart.js/issues/4273/labels{/name}","comments_url":"https://api.github.com/repos/chartjs/Chart.js/issues/4273/comments","events_url":"https://api.github.com/repos/chartjs/Chart.js/issues/4273/events","html_url":"https://github.com/chartjs/Chart.js/issues/4273","id":229948953,"number":4273,"title":"Uncaught TypeError: Cannot read property 'length' of null","user":{"login":"xBootstrap","id":16588124,"avatar_url":"https://avatars1.githubusercontent.com/u/16588124?v=3","gravatar_id":"","url":"https://api.github.com/users/xBootstrap","html_url":"https://github.com/xBootstrap","followers_url":"https://api.github.com/users/xBootstrap/followers","following_url":"https://api.github.com/users/xBootstrap/following{/other_user}","gists_url":"https://api.github.com/users/xBootstrap/gists{/gist_id}","starred_url":"https://api.github.com/users/xBootstrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xBootstrap/subscriptions","organizations_url":"https://api.github.com/users/xBootstrap/orgs","repos_url":"https://api.github.com/users/xBootstrap/repos","events_url":"https://api.github.com/users/xBootstrap/events{/privacy}","received_events_url":"https://api.github.com/users/xBootstrap/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},{"id":42400464,"url":"https://api.github.com/repos/chartjs/Chart.js/labels/Needs%20test%20case","name":"Needs test case","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-05-19T11:35:44Z","updated_at":"2017-05-22T07:26:05Z","closed_at":null,"body":"- Experiencing uncaught TypeError :\r\n\r\n<pre>const MULTILINEONEFILL = document.getElementById(\"SOMEID\");\r\n        console.log(MULTILINEONEFILL);\r\n        let MultiLineOneFill = new Chart(MULTILINEONEFILL, {\r\n        type: 'line',\r\n        data: {\r\n    labels: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\"],\r\n    datasets: [\r\n        {\r\n            label: \"My First dataset\",\r\n            fill: true,\r\n            lineTension: 0.3,\r\n            backgroundColor: \"rgba(75,192,192,0.4)\",\r\n            borderColor: \"rgba(75,192,192,1)\",\r\n            borderCapStyle: 'butt',\r\n            borderDash: [],\r\n            borderDashOffset: 0.0,\r\n            borderJoinStyle: 'miter',\r\n            pointBorderColor: \"rgba(75,192,192,1)\",\r\n            pointBackgroundColor: \"#fff\",\r\n            pointBorderWidth: 1,\r\n            pointHoverRadius: 5,\r\n            pointHoverBackgroundColor: \"rgba(75,192,192,1)\",\r\n            pointHoverBorderColor: \"rgba(220,220,220,1)\",\r\n            pointHoverBorderWidth: 2,\r\n            pointRadius: 1,\r\n            pointHitRadius: 10,\r\n            data: [65, 59, 80, 81, 56, 55, 40],\r\n            spanGaps: false,\r\n        },\r\n        {\r\n            label: \"My Second dataset\",\r\n            fill: false,\r\n            lineTension: 0.3,\r\n            backgroundColor: \"rgba(169,68,66,0.98)\",\r\n            borderColor: \"rgba(169,68,66,0.98)\",\r\n            borderCapStyle: 'butt',\r\n            borderDash: [],\r\n            borderDashOffset: 0.0,\r\n            borderJoinStyle: 'miter',\r\n            pointBorderColor: \"rgba(169,68,66,0.98)\",\r\n            pointBackgroundColor: \"#fff\",\r\n            pointBorderWidth: 1,\r\n            pointHoverRadius: 5,\r\n            pointHoverBackgroundColor: \"rgba(169,68,66,0.98)\",\r\n            pointHoverBorderColor: \"rgba(220,220,220,1)\",\r\n            pointHoverBorderWidth: 2,\r\n            pointRadius: 1,\r\n            pointHitRadius: 10,\r\n            data: [60, 79, 90, 61, 76, 56, 80],\r\n            spanGaps: false,\r\n        }\r\n    ]\r\n}\r\n    });\r\n </pre>"},"comment":{"url":"https://api.github.com/repos/chartjs/Chart.js/issues/comments/303020249","html_url":"https://github.com/chartjs/Chart.js/issues/4273#issuecomment-303020249","issue_url":"https://api.github.com/repos/chartjs/Chart.js/issues/4273","id":303020249,"user":{"login":"simonbrunel","id":3874900,"avatar_url":"https://avatars1.githubusercontent.com/u/3874900?v=3","gravatar_id":"","url":"https://api.github.com/users/simonbrunel","html_url":"https://github.com/simonbrunel","followers_url":"https://api.github.com/users/simonbrunel/followers","following_url":"https://api.github.com/users/simonbrunel/following{/other_user}","gists_url":"https://api.github.com/users/simonbrunel/gists{/gist_id}","starred_url":"https://api.github.com/users/simonbrunel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonbrunel/subscriptions","organizations_url":"https://api.github.com/users/simonbrunel/orgs","repos_url":"https://api.github.com/users/simonbrunel/repos","events_url":"https://api.github.com/users/simonbrunel/events{/privacy}","received_events_url":"https://api.github.com/users/simonbrunel/received_events","type":"User","site_admin":false},"created_at":"2017-05-22T07:26:04Z","updated_at":"2017-05-22T07:26:04Z","body":"@xBootstrap it *seems* to happen at [that line](/chartjs/Chart.js/blob/master/src/platforms/platform.dom.js#L189), meaning that the element you give when creating a chart is **null** in `new Chart(MULTILINEONEFILL, ...` (`MULTILINEONEFILL === null`). I don't know how you retrieve this item in your premium project (`document.getElementById(\"SOMEID\")`?) but maybe the `id` is not correct or the element is not added to the DOM at the time you try to create the chart (can't help without more context)."}}
{"actor":{"display_login":"simonbrunel"}}