So, I'm using angular-chart-js plugin on an ionic app (Not sure if that relevant).
With linear chart, by default, when clicking on a dot I get a tooltip as shown:
And I want to change the inside of that tooltip, I couldn't find anything on google.
Any help is appreciated
In the chart options you can specify for a chart, you can create a function to return a template for the tooltip.
and in your view:
The label object looks like
Edit: The
multiTooltipTemplate
is used for bar, line, etc, where you have multiple data points for each x axis value. For pie or doughnut, you would just usetooltipTemplate
.Here is a Plunker. For demo purpose. the message is
this is a tooltip
Note: You'll have to create tool tip for complete array object
data
that is used by the charts to plot.I hope it solves your issue.
I know this is an old question but just for anyone else looking for this - there is a simpler way to customize the tooltips globally.
In your module:
There are other options to customize the tooltips and almost everything else globally