{"action":"closed","issue":{"url":"https://api.github.com/repos/naver/billboard.js/issues/275","repository_url":"https://api.github.com/repos/naver/billboard.js","labels_url":"https://api.github.com/repos/naver/billboard.js/issues/275/labels{/name}","comments_url":"https://api.github.com/repos/naver/billboard.js/issues/275/comments","events_url":"https://api.github.com/repos/naver/billboard.js/issues/275/events","html_url":"https://github.com/naver/billboard.js/issues/275","id":294920970,"number":275,"title":"Comma in generated markup for custom tooltip","user":{"login":"rtmalone","id":6342154,"avatar_url":"https://avatars1.githubusercontent.com/u/6342154?v=4","gravatar_id":"","url":"https://api.github.com/users/rtmalone","html_url":"https://github.com/rtmalone","followers_url":"https://api.github.com/users/rtmalone/followers","following_url":"https://api.github.com/users/rtmalone/following{/other_user}","gists_url":"https://api.github.com/users/rtmalone/gists{/gist_id}","starred_url":"https://api.github.com/users/rtmalone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtmalone/subscriptions","organizations_url":"https://api.github.com/users/rtmalone/orgs","repos_url":"https://api.github.com/users/rtmalone/repos","events_url":"https://api.github.com/users/rtmalone/events{/privacy}","received_events_url":"https://api.github.com/users/rtmalone/received_events","type":"User","site_admin":false},"labels":[{"id":622123865,"url":"https://api.github.com/repos/naver/billboard.js/labels/question","name":"question","color":"fbca04","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-06T21:35:48Z","updated_at":"2018-02-07T14:28:44Z","closed_at":"2018-02-07T14:28:44Z","author_association":"NONE","body":"## Description\r\nI'm tying to style a custom tooltip with the following:\r\n```js\r\n  tooltip: {\r\n    grouped: true,\r\n    contents: function (data, title, value, color) {\r\n      console.log('contents', data)\r\n\r\n      return `<div class='custom-tooltip'>\r\n        <h3 class='heading'>${title(data[0].x)}</h3>\r\n        <div class='custom-tooltip-data'>\r\n          ${data.map((d, i) => {\r\n            return `<div><span style='background: ${color(d.id)};'></span>${d.value} ${d.id}</div>`\r\n          })} \r\n        </div>       \r\n      <div>`\r\n    }\r\n  }\r\n```\r\nUnfortunately, a comma is inserted after every `div` created by the map.\r\n\r\n\r\n## Steps to check or reproduce\r\nThis pen displays the issue:\r\n\r\nhttps://codepen.io/rtmalone/pen/JpXMad\r\n"}}
{"actor":{"display_login":"rtmalone"}}