{"action":"opened","issue":{"url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/91","labels_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/91/comments","events_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/91/events","html_url":"https://github.com/jtblin/angular-chart.js/issues/91","id":65539972,"number":91,"title":"Number Formating","user":{"login":"n0n3br","id":371808,"avatar_url":"https://avatars.githubusercontent.com/u/371808?v=3","gravatar_id":"","url":"https://api.github.com/users/n0n3br","html_url":"https://github.com/n0n3br","followers_url":"https://api.github.com/users/n0n3br/followers","following_url":"https://api.github.com/users/n0n3br/following{/other_user}","gists_url":"https://api.github.com/users/n0n3br/gists{/gist_id}","starred_url":"https://api.github.com/users/n0n3br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n0n3br/subscriptions","organizations_url":"https://api.github.com/users/n0n3br/orgs","repos_url":"https://api.github.com/users/n0n3br/repos","events_url":"https://api.github.com/users/n0n3br/events{/privacy}","received_events_url":"https://api.github.com/users/n0n3br/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-31T20:36:54Z","updated_at":"2015-03-31T20:36:54Z","closed_at":null,"body":"I'm trying to format the value of the tooltip.\r\nI already tried to put the function inside the string, like\r\n\"<%if (label){%><%=label%>: <%}%>addCommas(<%= value %>)\"\r\nor\r\n\"<%if (label){%><%=label%>: <%}%><%= addCommas(value) %>\"\r\nbut every option I use returns no tooltip.\r\nThe addCommas value code is:\r\n```javascript\r\nfunction addCommas(nStr)\r\n{\r\n    nStr += '';\r\n    x = nStr.split('.');\r\n    x1 = x[0];\r\n    x2 = x.length > 1 ? '.' + x[1] : '';\r\n    var rgx = /(\\d+)(\\d{3})/;\r\n    while (rgx.test(x1)) {\r\n        x1 = x1.replace(rgx, '$1' + ',' + '$2');\r\n    }\r\n    return x1 + x2;\r\n}\r\n```"}}