{"action":"created","issue":{"url":"https://api.github.com/repos/chartjs/Chart.js/issues/5803","repository_url":"https://api.github.com/repos/chartjs/Chart.js","labels_url":"https://api.github.com/repos/chartjs/Chart.js/issues/5803/labels{/name}","comments_url":"https://api.github.com/repos/chartjs/Chart.js/issues/5803/comments","events_url":"https://api.github.com/repos/chartjs/Chart.js/issues/5803/events","html_url":"https://github.com/chartjs/Chart.js/issues/5803","id":375754367,"node_id":"MDU6SXNzdWUzNzU3NTQzNjc=","number":5803,"title":"How to change background color of legend if you use Stacked bar","user":{"login":"jonjie0317","id":16563175,"node_id":"MDQ6VXNlcjE2NTYzMTc1","avatar_url":"https://avatars1.githubusercontent.com/u/16563175?v=4","gravatar_id":"","url":"https://api.github.com/users/jonjie0317","html_url":"https://github.com/jonjie0317","followers_url":"https://api.github.com/users/jonjie0317/followers","following_url":"https://api.github.com/users/jonjie0317/following{/other_user}","gists_url":"https://api.github.com/users/jonjie0317/gists{/gist_id}","starred_url":"https://api.github.com/users/jonjie0317/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonjie0317/subscriptions","organizations_url":"https://api.github.com/users/jonjie0317/orgs","repos_url":"https://api.github.com/users/jonjie0317/repos","events_url":"https://api.github.com/users/jonjie0317/events{/privacy}","received_events_url":"https://api.github.com/users/jonjie0317/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-31T00:54:17Z","updated_at":"2018-11-01T05:50:18Z","closed_at":null,"author_association":"NONE","body":"I'm trying to change the background color of the legend in stacked bar graph. But the only thing I can change is the border color. Please see my code below.\r\n\r\n\r\n```\r\nfunction createNewDouble2LayerChart(context, type, bgColor, bdColor, labels, targetData, actualData, options){\r\n\tnew Chart(context, {\r\n\t    type: type,\r\n\t    data: {\r\n\t        labels: labels,\r\n\t        datasets: [\r\n\t\t        {\r\n\t\t            label: \"Total\",\r\n\t\t            stack: \"Stack 0\",\r\n\t\t            backgroundColor: bgColor[0],\r\n\t\t            borderColor: bdColor[0],\r\n\t\t            data: targetData,\r\n\t\t        },\r\n\t\t        {\r\n\t\t            label: \"Monde\",\r\n\t\t            stack: \"Stack 1\",\r\n\t\t            backgroundColor: bgColor[1],\r\n\t\t            borderColor: bdColor[1],\r\n\t\t            data: actualData,\r\n\t\t        },\r\n\t\t        {\r\n\t\t            label: \"Non-Monde\",\r\n\t\t            stack: \"Stack 1\",\r\n\t\t            backgroundColor: bgColor[2],\r\n\t\t            borderColor: bdColor[2],\r\n\t\t            data: actualData,\r\n\t\t        }\r\n\t\t    ]\r\n\t    },\r\n\r\n\t    // Configuration options go here\r\n\t    options: options\r\n\t});\r\n}\r\n```\r\n\r\n\r\nThe data I'm passing in `bgColor` is an array of colors. So basically, I have `3 datasets` here which should have 3 different colors."},"comment":{"url":"https://api.github.com/repos/chartjs/Chart.js/issues/comments/434938146","html_url":"https://github.com/chartjs/Chart.js/issues/5803#issuecomment-434938146","issue_url":"https://api.github.com/repos/chartjs/Chart.js/issues/5803","id":434938146,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDkzODE0Ng==","user":{"login":"nagix","id":723188,"node_id":"MDQ6VXNlcjcyMzE4OA==","avatar_url":"https://avatars3.githubusercontent.com/u/723188?v=4","gravatar_id":"","url":"https://api.github.com/users/nagix","html_url":"https://github.com/nagix","followers_url":"https://api.github.com/users/nagix/followers","following_url":"https://api.github.com/users/nagix/following{/other_user}","gists_url":"https://api.github.com/users/nagix/gists{/gist_id}","starred_url":"https://api.github.com/users/nagix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nagix/subscriptions","organizations_url":"https://api.github.com/users/nagix/orgs","repos_url":"https://api.github.com/users/nagix/repos","events_url":"https://api.github.com/users/nagix/events{/privacy}","received_events_url":"https://api.github.com/users/nagix/received_events","type":"User","site_admin":false},"created_at":"2018-11-01T05:50:18Z","updated_at":"2018-11-01T05:50:18Z","author_association":"COLLABORATOR","body":"I don't see any issues in setting background colors. Do you have a fiddle that reproduces this?"}}
{"actor":{"display_login":"nagix"}}