I need to make a call to an api to return the tooltip content. Does anyone know, when setting a tooltip, how to acess the arguments in the dataItem, pass them to a function which returns the tooltip content?
I've seen this and this example but I'cant understand how to do this.
The chart provides tooltip templates, as shown in the chart tooltip online demos. These allow custom tooltips to be created:
You can use pipes on the
value
to process it, or render a custom component. Each series can have its custom tooltips, if needed:To make an API call, create a component that makes the request (and probably caches it) and use it in the tooltip template:
Here is a plunker demo that shows this.