{"action":"created","issue":{"url":"https://api.github.com/repos/y-takey/chartjs-plugin-stacked100/issues/17","repository_url":"https://api.github.com/repos/y-takey/chartjs-plugin-stacked100","labels_url":"https://api.github.com/repos/y-takey/chartjs-plugin-stacked100/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/y-takey/chartjs-plugin-stacked100/issues/17/comments","events_url":"https://api.github.com/repos/y-takey/chartjs-plugin-stacked100/issues/17/events","html_url":"https://github.com/y-takey/chartjs-plugin-stacked100/issues/17","id":324960229,"number":17,"title":"How to show raw data in tooltip legend","user":{"login":"dlewand691","id":1159913,"avatar_url":"https://avatars3.githubusercontent.com/u/1159913?v=4","gravatar_id":"","url":"https://api.github.com/users/dlewand691","html_url":"https://github.com/dlewand691","followers_url":"https://api.github.com/users/dlewand691/followers","following_url":"https://api.github.com/users/dlewand691/following{/other_user}","gists_url":"https://api.github.com/users/dlewand691/gists{/gist_id}","starred_url":"https://api.github.com/users/dlewand691/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlewand691/subscriptions","organizations_url":"https://api.github.com/users/dlewand691/orgs","repos_url":"https://api.github.com/users/dlewand691/repos","events_url":"https://api.github.com/users/dlewand691/events{/privacy}","received_events_url":"https://api.github.com/users/dlewand691/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-21T15:33:06Z","updated_at":"2018-05-21T15:48:39Z","closed_at":null,"author_association":"NONE","body":"I'd like to show the raw tooltip legend percentage only and not the computed valued. I was able to do it for the bar label but can't seem to get it to work for the tooltip. What would be the proper way?\r\n\r\n<img width=\"503\" alt=\"screen shot\" src=\"https://user-images.githubusercontent.com/1159913/40315903-b58225bc-5cea-11e8-8952-5d47f45919d1.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/y-takey/chartjs-plugin-stacked100/issues/comments/390695130","html_url":"https://github.com/y-takey/chartjs-plugin-stacked100/issues/17#issuecomment-390695130","issue_url":"https://api.github.com/repos/y-takey/chartjs-plugin-stacked100/issues/17","id":390695130,"user":{"login":"y-takey","id":1817802,"avatar_url":"https://avatars2.githubusercontent.com/u/1817802?v=4","gravatar_id":"","url":"https://api.github.com/users/y-takey","html_url":"https://github.com/y-takey","followers_url":"https://api.github.com/users/y-takey/followers","following_url":"https://api.github.com/users/y-takey/following{/other_user}","gists_url":"https://api.github.com/users/y-takey/gists{/gist_id}","starred_url":"https://api.github.com/users/y-takey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y-takey/subscriptions","organizations_url":"https://api.github.com/users/y-takey/orgs","repos_url":"https://api.github.com/users/y-takey/repos","events_url":"https://api.github.com/users/y-takey/events{/privacy}","received_events_url":"https://api.github.com/users/y-takey/received_events","type":"User","site_admin":false},"created_at":"2018-05-21T15:48:39Z","updated_at":"2018-05-21T15:48:39Z","author_association":"OWNER","body":"Hi @dlewand691 :) thanks for the issue.\r\n\r\nYou can show raw data with tooltip option. like this:\r\n\r\n```javascript\r\nnew Chart(~, {\r\n  ~,\r\n  options: {\r\n    tooltips: {\r\n      callbacks: {\r\n        label: (tooltipItem, data) => {\r\n          const datasetIndex = tooltipItem.datasetIndex;\r\n          const datasetLabel = data.datasets[datasetIndex].label;\r\n          const originalValue = data.originalData[datasetIndex][tooltipItem.index];\r\n          return `${datasetLabel}: ${originalValue}`;\r\n        }\r\n      }\r\n    },\r\n    plugins: {\r\n      stacked100: { enable: true, replaceTooltipLabel: false }\r\n    }\r\n  }\r\n});\r\n```"}}
{"actor":{"display_login":"y-takey"}}