{"action":"created","issue":{"url":"https://api.github.com/repos/highcharts/highcharts-ios/issues/78","repository_url":"https://api.github.com/repos/highcharts/highcharts-ios","labels_url":"https://api.github.com/repos/highcharts/highcharts-ios/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/highcharts/highcharts-ios/issues/78/comments","events_url":"https://api.github.com/repos/highcharts/highcharts-ios/issues/78/events","html_url":"https://github.com/highcharts/highcharts-ios/issues/78","id":309991591,"number":78,"title":"How to customise ToolTip?","user":{"login":"kuldeep13990","id":5965337,"avatar_url":"https://avatars2.githubusercontent.com/u/5965337?v=4","gravatar_id":"","url":"https://api.github.com/users/kuldeep13990","html_url":"https://github.com/kuldeep13990","followers_url":"https://api.github.com/users/kuldeep13990/followers","following_url":"https://api.github.com/users/kuldeep13990/following{/other_user}","gists_url":"https://api.github.com/users/kuldeep13990/gists{/gist_id}","starred_url":"https://api.github.com/users/kuldeep13990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuldeep13990/subscriptions","organizations_url":"https://api.github.com/users/kuldeep13990/orgs","repos_url":"https://api.github.com/users/kuldeep13990/repos","events_url":"https://api.github.com/users/kuldeep13990/events{/privacy}","received_events_url":"https://api.github.com/users/kuldeep13990/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-30T06:57:45Z","updated_at":"2018-03-31T06:32:14Z","closed_at":"2018-03-30T11:42:13Z","author_association":"NONE","body":"I want to add Text content in ToolTip. and for that I have tried below code.\r\n\r\n```\r\nHIColumn *column1 = [[HIColumn alloc]init];\r\n    column1.name = @\"Actual\";\r\n    column1.data = [NSMutableArray arrayWithArray:arrColumn1Data];\r\n    column1.dataLabels = [[HIDataLabels alloc]init];\r\n    column1.dataLabels.rotation = @-90;\r\n    column1.dataLabels.enabled = [NSNumber numberWithInteger:1];\r\n    column1.dataLabels.formatter = [[HIFunction alloc] initWithFunction:@\"function() { if(this.y == 60) return 'Excellent'; else if(this.y == 30) return 'Good'; else if(this.y == 20) return 'BB'; else if(this.y == 11) return 'AA';}\"];\r\n```\r\n\r\n![simulator screen shot - iphone 8 plus - 2018-03-30 at 12 20 44](https://user-images.githubusercontent.com/5965337/38127728-0d2327f2-3415-11e8-8805-242fcbcff391.png)\r\n\r\n\r\nNow I  want is, when I click on any of the **Excellent, Good, AA, BB** bar I want to display that string  in ToolTip.\r\n\r\n![simulator screen shot - iphone 8 plus - 2018-03-30 at 12 20 49](https://user-images.githubusercontent.com/5965337/38127780-44adc89e-3415-11e8-932a-3f19d71736bb.png)\r\n\r\n\r\n**Rating: Excellent or Rating: Good or Rating: AA or Rating: BB**\r\n\r\nfor that I have tried below code but nothing display in rating.\r\n\r\n```\r\ntooltip.pointFormat = @\"{series.name}: {point.y}<br/>Rating: { if(this.y == 60) return 'Excellent'; else if(this.y == 30) return 'Good'; else if(this.y == 20) return 'BB'; else if(this.y == 11) return 'AA';}\";\r\n    tooltip.headerFormat = @\"<b>{point.x}</b><br/>\";\r\n```\r\n\r\n**and**\r\n\r\n```\r\ntooltip.pointFormat = @\"{series.name}: {point.y}<br/>Rating: { if(point.y == 60) return 'Excellent'; else if(point.y == 30) return 'Good'; else if(point.y == 20) return 'BB'; else if(point.y == 11) return 'AA';}\";\r\n    tooltip.headerFormat = @\"<b>{point.x}</b><br/>\";\r\n```\r\n\r\nIf I pass Static text like this than it works. but I want like above dynamically based on value.\r\n`tooltip.pointFormat = @\"{series.name}: {point.y}<br/>Rating: Good}\";`\r\n\r\nI also refer this but it have static text : http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/maps/tooltip/format/\r\n\r\nIf I use below code than it displays only Text.\r\n`tooltip.formatter = [[HIFunction alloc] initWithFunction:@\"function() { if(this.y == 60) return 'Excellent'; else if(this.y == 30) return 'Good'; else if(this.y == 20) return 'BB'; else if(this.y == 11) return 'AA';}\"];`\r\nHow can I do this?\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/highcharts/highcharts-ios/issues/comments/377670483","html_url":"https://github.com/highcharts/highcharts-ios/issues/78#issuecomment-377670483","issue_url":"https://api.github.com/repos/highcharts/highcharts-ios/issues/78","id":377670483,"user":{"login":"kuldeep13990","id":5965337,"avatar_url":"https://avatars2.githubusercontent.com/u/5965337?v=4","gravatar_id":"","url":"https://api.github.com/users/kuldeep13990","html_url":"https://github.com/kuldeep13990","followers_url":"https://api.github.com/users/kuldeep13990/followers","following_url":"https://api.github.com/users/kuldeep13990/following{/other_user}","gists_url":"https://api.github.com/users/kuldeep13990/gists{/gist_id}","starred_url":"https://api.github.com/users/kuldeep13990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuldeep13990/subscriptions","organizations_url":"https://api.github.com/users/kuldeep13990/orgs","repos_url":"https://api.github.com/users/kuldeep13990/repos","events_url":"https://api.github.com/users/kuldeep13990/events{/privacy}","received_events_url":"https://api.github.com/users/kuldeep13990/received_events","type":"User","site_admin":false},"created_at":"2018-03-31T06:32:14Z","updated_at":"2018-03-31T06:32:14Z","author_association":"NONE","body":"@ihnatmoisieiev  I want to limit 2 decimal points in below function. \r\n\r\n`tooltip.formatter = [[HIFunction alloc] initWithFunction:@\"function() { var tooltip = '<b>' + this.x + '</b><br/>'; tooltip += this.series.name + ': ' + this.point.y + '%<br/>'; if(this.y >= 2 && this.y <= 5) return tooltip + 'Rating: Essential fat'; else if(this.y >= 6 && this.y <= 13) return tooltip + 'Rating: Athlete'; else if(this.y >= 14 && this.y <= 17) return tooltip + 'Rating: Fitness'; else if(this.y >= 18 && this.y <= 24) return tooltip + 'Rating: Average'; else if(this.y >= 25) return tooltip + 'Rating: Obese'; else return tooltip; }\"];`\r\n\r\nhow can I do this?\r\n"}}
{"actor":{"display_login":"kuldeep13990"}}