{"action":"closed","issue":{"url":"https://api.github.com/repos/nnnick/Chart.js/issues/1437","labels_url":"https://api.github.com/repos/nnnick/Chart.js/issues/1437/labels{/name}","comments_url":"https://api.github.com/repos/nnnick/Chart.js/issues/1437/comments","events_url":"https://api.github.com/repos/nnnick/Chart.js/issues/1437/events","html_url":"https://github.com/nnnick/Chart.js/issues/1437","id":104717104,"number":1437,"title":"Wrong legend generation","user":{"login":"Evg100","id":5781434,"avatar_url":"https://avatars.githubusercontent.com/u/5781434?v=3","gravatar_id":"","url":"https://api.github.com/users/Evg100","html_url":"https://github.com/Evg100","followers_url":"https://api.github.com/users/Evg100/followers","following_url":"https://api.github.com/users/Evg100/following{/other_user}","gists_url":"https://api.github.com/users/Evg100/gists{/gist_id}","starred_url":"https://api.github.com/users/Evg100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evg100/subscriptions","organizations_url":"https://api.github.com/users/Evg100/orgs","repos_url":"https://api.github.com/users/Evg100/repos","events_url":"https://api.github.com/users/Evg100/events{/privacy}","received_events_url":"https://api.github.com/users/Evg100/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nnnick/Chart.js/labels/v1.x","name":"v1.x","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/nnnick/Chart.js/milestones/3","html_url":"https://github.com/nnnick/Chart.js/milestones/Version%201.1","labels_url":"https://api.github.com/repos/nnnick/Chart.js/milestones/3/labels","id":917794,"number":3,"title":"Version 1.1","description":"We follow semantic versioning (mostly) so these issues are NOT breaking API.","creator":{"login":"derekperkins","id":3588778,"avatar_url":"https://avatars.githubusercontent.com/u/3588778?v=3","gravatar_id":"","url":"https://api.github.com/users/derekperkins","html_url":"https://github.com/derekperkins","followers_url":"https://api.github.com/users/derekperkins/followers","following_url":"https://api.github.com/users/derekperkins/following{/other_user}","gists_url":"https://api.github.com/users/derekperkins/gists{/gist_id}","starred_url":"https://api.github.com/users/derekperkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekperkins/subscriptions","organizations_url":"https://api.github.com/users/derekperkins/orgs","repos_url":"https://api.github.com/users/derekperkins/repos","events_url":"https://api.github.com/users/derekperkins/events{/privacy}","received_events_url":"https://api.github.com/users/derekperkins/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":14,"state":"open","created_at":"2014-12-30T17:36:19Z","updated_at":"2015-12-26T04:03:20Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-09-03T15:08:11Z","updated_at":"2015-12-26T04:03:20Z","closed_at":"2015-12-26T04:03:20Z","body":"Good day!\r\nThere is an error when generating legend.\r\nIt returns \r\n`<ul class=\"doughnut-legend\"><li><span style=\"background-color:#F7464A\"></span>Red</li><li><span style=\"background-color:#46BFBD\"></span>Green</li><li><span style=\"background-color:#FDB45C\"></span>Yellow</li><li><span style=\"background-color:#949FB1\"></span>Grey</li><li><span style=\"background-color:#4D5360\"></span>Dark Grey</li></ul> `\r\ninstead of \r\n`<ul class=\"doughnut-legend\"><li><span style=\"background-color:#F7464A\">Red</span></li><li><span style=\"background-color:#46BFBD\">Green</span></li><li><span style=\"background-color:#FDB45C\">Yellow</span></li><li><span style=\"background-color:#949FB1\">Grey</span></li><li><span style=\"background-color:#4D5360\">Dark Grey</span></li></ul>`.\r\nError is easy to fix by changing in Chart.js code:\r\n`legendTemplate : \"<ul class=\\\"<%=name.toLowerCase()%>-legend\\\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\\\"background-color:<%=datasets[i].fillColor%>\\\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>\"`\r\nto \r\n`legendTemplate : <ul class=\\\"<%=name.toLowerCase()%>-legend\\\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\\\"background-color:<%=datasets[i].fillColor%>\\\"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>`\r\nfor every similar block of code.\r\nThis error exist in Chart.js and Chart.min.js, but not in srs .j files."}}