{"action":"created","issue":{"url":"https://api.github.com/repos/amcharts/amcharts4/issues/67","repository_url":"https://api.github.com/repos/amcharts/amcharts4","labels_url":"https://api.github.com/repos/amcharts/amcharts4/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/amcharts/amcharts4/issues/67/comments","events_url":"https://api.github.com/repos/amcharts/amcharts4/issues/67/events","html_url":"https://github.com/amcharts/amcharts4/issues/67","id":331460647,"node_id":"MDU6SXNzdWUzMzE0NjA2NDc=","number":67,"title":"Adapter for series tooltipText/tooltipHTML","user":{"login":"arm1n","id":2787041,"node_id":"MDQ6VXNlcjI3ODcwNDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2787041?v=4","gravatar_id":"","url":"https://api.github.com/users/arm1n","html_url":"https://github.com/arm1n","followers_url":"https://api.github.com/users/arm1n/followers","following_url":"https://api.github.com/users/arm1n/following{/other_user}","gists_url":"https://api.github.com/users/arm1n/gists{/gist_id}","starred_url":"https://api.github.com/users/arm1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arm1n/subscriptions","organizations_url":"https://api.github.com/users/arm1n/orgs","repos_url":"https://api.github.com/users/arm1n/repos","events_url":"https://api.github.com/users/arm1n/events{/privacy}","received_events_url":"https://api.github.com/users/arm1n/received_events","type":"User","site_admin":false},"labels":[{"id":770370960,"node_id":"MDU6TGFiZWw3NzAzNzA5NjA=","url":"https://api.github.com/repos/amcharts/amcharts4/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-12T06:58:16Z","updated_at":"2018-06-13T19:03:16Z","closed_at":null,"author_association":"NONE","body":"This is rather a question than an issue. I would like to customize `tooltipText` as shown in [adapters documentation](https://www.amcharts.com/docs/v4/concepts/adapters/#Adding_adapters) to display other values from bound data item. I'm using type `LineSeries` and want to customize as follows:\r\n\r\n```typescript\r\n// data source for chart's `data` property\r\nlet data: Array<object> = [\r\n  {\r\n    category: 'Car',  // = categoryX\r\n    price: 5000,      // = valueY\r\n    time: 1528786360  // = some other data\r\n  },\r\n  ...\r\n];\r\n\r\n// adapter for `tooltipText` from line series\r\nlineSeries.adapter.add('tooltipText', (text, target: LineSeriesDataItem) => {\r\n  let data = target.tooltip.dataItem.dataContext; // = undefined\r\n  let data = target.dataItem.dataContext; // = undefined\r\n\r\n  let data = ... // how to access `time` from data source here?\r\n\r\n  return `Price: ${data.price}\\nTime: ${data.time}`;\r\n});\r\n```\r\n\r\nBesides, also `text` parameter is constantly providing `undefined` in callback. Could you please tell me how to access the bound data item properly to show different values from data source? Thanks!"},"comment":{"url":"https://api.github.com/repos/amcharts/amcharts4/issues/comments/397050259","html_url":"https://github.com/amcharts/amcharts4/issues/67#issuecomment-397050259","issue_url":"https://api.github.com/repos/amcharts/amcharts4/issues/67","id":397050259,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzA1MDI1OQ==","user":{"login":"arm1n","id":2787041,"node_id":"MDQ6VXNlcjI3ODcwNDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2787041?v=4","gravatar_id":"","url":"https://api.github.com/users/arm1n","html_url":"https://github.com/arm1n","followers_url":"https://api.github.com/users/arm1n/followers","following_url":"https://api.github.com/users/arm1n/following{/other_user}","gists_url":"https://api.github.com/users/arm1n/gists{/gist_id}","starred_url":"https://api.github.com/users/arm1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arm1n/subscriptions","organizations_url":"https://api.github.com/users/arm1n/orgs","repos_url":"https://api.github.com/users/arm1n/repos","events_url":"https://api.github.com/users/arm1n/events{/privacy}","received_events_url":"https://api.github.com/users/arm1n/received_events","type":"User","site_admin":false},"created_at":"2018-06-13T19:03:16Z","updated_at":"2018-06-13T19:03:16Z","author_association":"NONE","body":"Thanks for your response - just tried your suggestion for the (category) axis tooltip, which works fine, great! Considering the `tooltipText` of (line) series. In my setup I'm only using combined with `XYCursor`. Would be great to access original data here in a similar way for showing other properties from input data. Thanks for taking a public API for this things into consideration, it increases flexibility tremendously 👍 "}}
{"actor":{"display_login":"arm1n"}}