{"action":"created","issue":{"url":"https://api.github.com/repos/chartjs/Chart.js/issues/5149","repository_url":"https://api.github.com/repos/chartjs/Chart.js","labels_url":"https://api.github.com/repos/chartjs/Chart.js/issues/5149/labels{/name}","comments_url":"https://api.github.com/repos/chartjs/Chart.js/issues/5149/comments","events_url":"https://api.github.com/repos/chartjs/Chart.js/issues/5149/events","html_url":"https://github.com/chartjs/Chart.js/issues/5149","id":288434494,"node_id":"MDU6SXNzdWUyODg0MzQ0OTQ=","number":5149,"title":"Cannot read property 'transition' of null","user":{"login":"shehan360","id":33398983,"node_id":"MDQ6VXNlcjMzMzk4OTgz","avatar_url":"https://avatars2.githubusercontent.com/u/33398983?v=4","gravatar_id":"","url":"https://api.github.com/users/shehan360","html_url":"https://github.com/shehan360","followers_url":"https://api.github.com/users/shehan360/followers","following_url":"https://api.github.com/users/shehan360/following{/other_user}","gists_url":"https://api.github.com/users/shehan360/gists{/gist_id}","starred_url":"https://api.github.com/users/shehan360/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shehan360/subscriptions","organizations_url":"https://api.github.com/users/shehan360/orgs","repos_url":"https://api.github.com/users/shehan360/repos","events_url":"https://api.github.com/users/shehan360/events{/privacy}","received_events_url":"https://api.github.com/users/shehan360/received_events","type":"User","site_admin":false},"labels":[{"id":42400464,"node_id":"MDU6TGFiZWw0MjQwMDQ2NA==","url":"https://api.github.com/repos/chartjs/Chart.js/labels/status:%20needs%20test%20case","name":"status: needs test case","color":"fef2c0","default":false},{"id":32309888,"node_id":"MDU6TGFiZWwzMjMwOTg4OA==","url":"https://api.github.com/repos/chartjs/Chart.js/labels/type:%20question","name":"type: question","color":"ccbbee","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-01-14T19:54:43Z","updated_at":"2018-06-13T19:05:13Z","closed_at":"2018-01-17T18:36:37Z","author_association":"NONE","body":"Im trying to draw a line chart using ChartJs and Agular4 that takes data from @Input.\r\n\r\n```\r\n  ngOnChanges(){\r\n\t\tif(this.labelY  && this.dataSet){\r\n\t\t\tconsole.log(this.dataSet);\r\n\t\t\tconsole.log(this.labelY);\r\n\t\t\tsetTimeout(()=>{\r\n\t\t\t\tthis.draw();\r\n\t\t\t},500);\r\n\t\t}\r\n\t\t\r\n\t}\r\n```\r\n\r\n\r\nWithout the timeout,\r\n![chartjserr](https://user-images.githubusercontent.com/33398983/34919958-0b797910-f991-11e7-8f20-8844e3813f06.PNG)\r\nerror is generated. Any idea on resolving this issue?\r\n\r\n\r\n\r\nIm using ChartJs 2.7.1\r\nAnd Angular 4\r\n\r\n```\r\ndraw(){\r\n\t\tif (this.mychart) {\r\n\t\t\tthis.mychart.destroy();\r\n\t\t}\r\n\t\tlet ctx = this.mycanvas.nativeElement.getContext('2d');\r\n    this.mychart=new Chart(ctx,\r\n      {type: 'line',\r\n\t\t\tdata: {\r\n\t\t\t\tlabels:this.labels,\r\n\t\t\t\tdatasets: this.dataSet\r\n\t\t\t},\r\n\t\t\toptions: {\r\n\t\t\t\tresponsive: true,\r\n\t\t\t\telements: {\r\n\t\t\t\t\tline: {\r\n\t\t\t\t\t\t\ttension: 0 // disables bezier curves\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\r\n\t\t\t\tscales: {\r\n\t\t\t\t\txAxes: [{\r\n\t\t\t\t\t\ttype: \"time\",\r\n\t\t\t\t\t\tdisplay: true,\r\n\t\t\t\t\t\tscaleLabel: {\r\n\t\t\t\t\t\t\tdisplay: true,\r\n\t\t\t\t\t\t\tlabelString: 'Time'\r\n\t\t\t\t\t\t},\r\n                        ticks: {\r\n                            major: {\r\n                                fontStyle: \"bold\",\r\n                                fontColor: \"#FF0000\"\r\n                            }\r\n                        }\r\n\t\t\t\t\t}],\r\n\t\t\t\t\tyAxes: [{\r\n\t\t\t\t\t\tdisplay: true,\t\t\t\t\t\r\n\t\t\t\t\t\tscaleLabel: {\r\n\t\t\t\t\t\t\tdisplay: true,\r\n\t\t\t\t\t\t\tlabelString: this.labelY\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tticks: {\r\n\t\t\t\t\t\t\tmin: 0, // it is for ignoring negative step.\r\n\t\t\t\t\t\t\tbeginAtZero: true,\r\n\t\t\t\t\t\t\tstepSize: 1  // if i use this it always set it '1', which look very awkward if it have high value  e.g. '100'.\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}]\r\n\t\t\t\t}\r\n\t\t\t}\r\n          \r\n        });    \r\n  }\r\n```"},"comment":{"url":"https://api.github.com/repos/chartjs/Chart.js/issues/comments/397050827","html_url":"https://github.com/chartjs/Chart.js/issues/5149#issuecomment-397050827","issue_url":"https://api.github.com/repos/chartjs/Chart.js/issues/5149","id":397050827,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzA1MDgyNw==","user":{"login":"soumas","id":6518385,"node_id":"MDQ6VXNlcjY1MTgzODU=","avatar_url":"https://avatars2.githubusercontent.com/u/6518385?v=4","gravatar_id":"","url":"https://api.github.com/users/soumas","html_url":"https://github.com/soumas","followers_url":"https://api.github.com/users/soumas/followers","following_url":"https://api.github.com/users/soumas/following{/other_user}","gists_url":"https://api.github.com/users/soumas/gists{/gist_id}","starred_url":"https://api.github.com/users/soumas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soumas/subscriptions","organizations_url":"https://api.github.com/users/soumas/orgs","repos_url":"https://api.github.com/users/soumas/repos","events_url":"https://api.github.com/users/soumas/events{/privacy}","received_events_url":"https://api.github.com/users/soumas/received_events","type":"User","site_admin":false},"created_at":"2018-06-13T19:05:13Z","updated_at":"2018-06-13T19:05:13Z","author_association":"NONE","body":"Try to call mychart.update() after setting the new data... that solved the problem for me."}}
{"actor":{"display_login":"soumas"}}