{"action":"created","issue":{"url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/616","repository_url":"https://api.github.com/repos/jtblin/angular-chart.js","labels_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/616/labels{/name}","comments_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/616/comments","events_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/616/events","html_url":"https://github.com/jtblin/angular-chart.js/issues/616","id":215054675,"number":616,"title":"Setting global colors doesn't work","user":{"login":"thany","id":152227,"avatar_url":"https://avatars2.githubusercontent.com/u/152227?v=3","gravatar_id":"","url":"https://api.github.com/users/thany","html_url":"https://github.com/thany","followers_url":"https://api.github.com/users/thany/followers","following_url":"https://api.github.com/users/thany/following{/other_user}","gists_url":"https://api.github.com/users/thany/gists{/gist_id}","starred_url":"https://api.github.com/users/thany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thany/subscriptions","organizations_url":"https://api.github.com/users/thany/orgs","repos_url":"https://api.github.com/users/thany/repos","events_url":"https://api.github.com/users/thany/events{/privacy}","received_events_url":"https://api.github.com/users/thany/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-03-17T16:26:20Z","updated_at":"2017-03-26T02:17:02Z","closed_at":"2017-03-26T02:17:02Z","body":"### Overview\r\n\r\nSetting the global chart colours in ChartJsProvider doesn't work. It just doesn't work - so there are no errors or warnings. The options appear to be accepted, somewhere, but they're completely ignored. It always uses the default chart colours.\r\n\r\nSo, something like this...\r\n```js\r\nmodule.config([\"ChartJsProvider\", function(ChartJsProvider) {\r\n  ChartJsProvider.setOptions({\r\n    colors: [ \"#00988c\", \"#85cdde\", \"#bd1622\", \"#e74e0f\" ]\r\n  });\r\n}]);\r\n```\r\n...won't work. Please note that this is exactly as in the [Getting started](https://jtblin.github.io/angular-chart.js/#getting_started) section, so I have to assume I'm not doing anything horribly wrong 🙂\r\n\r\nHowever, setting default chart colours like this *will* work:\r\n```js\r\nChart.defaults.global.colors = [ \"#00988c\", \"#85cdde\", \"#bd1622\", \"#e74e0f\" ];\r\n```\r\n\r\n- [x] Use latest version of the library\r\nYup, freshly installed today from bower.\r\n\r\n- [x] Make sure you've included all the dependencies e.g Chart.js, angular, etc.\r\nYup, my application or any charts wouldn't work otherwise.\r\n\r\n- [x] Include a repro case, see below.\r\nYup, see below indeed 🙂\r\n\r\n### Step to reproduce\r\n\r\nSet the chart colours in the same way as the instructions on the [Getting started](https://jtblin.github.io/angular-chart.js/#getting_started) section.\r\n\r\nHere's a [jsbin for convenience](http://jsbin.com/qobiwazuto/edit?html,js,output), it'll demonstrate the custom colours not being used at all."},"comment":{"url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/comments/289253197","html_url":"https://github.com/jtblin/angular-chart.js/issues/616#issuecomment-289253197","issue_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/616","id":289253197,"user":{"login":"jtblin","id":1388974,"avatar_url":"https://avatars1.githubusercontent.com/u/1388974?v=3","gravatar_id":"","url":"https://api.github.com/users/jtblin","html_url":"https://github.com/jtblin","followers_url":"https://api.github.com/users/jtblin/followers","following_url":"https://api.github.com/users/jtblin/following{/other_user}","gists_url":"https://api.github.com/users/jtblin/gists{/gist_id}","starred_url":"https://api.github.com/users/jtblin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtblin/subscriptions","organizations_url":"https://api.github.com/users/jtblin/orgs","repos_url":"https://api.github.com/users/jtblin/repos","events_url":"https://api.github.com/users/jtblin/events{/privacy}","received_events_url":"https://api.github.com/users/jtblin/received_events","type":"User","site_admin":false},"created_at":"2017-03-26T02:17:02Z","updated_at":"2017-03-26T02:17:02Z","body":"Duplicate of #512"}}
{"actor":{"display_login":"jtblin"}}