jettro / c3-angular-directive

Contains angularjs directives that use c3js to create good looking graphs
http://jettro.github.io/c3-angular-directive/
MIT License
203 stars 98 forks source link

Customize Tooltip content #178

Closed A-Allam closed 6 years ago

A-Allam commented 6 years ago

I want to use the tooltip of a pie chart to show two things.
The value and the percentage I attached an image with what I need

screen shot 2018-02-18 at 2 11 24 pm
Slandais commented 6 years ago

Hi,

you can do it with the contentFormatFunction directive.

Like this :

`

` This directive is not documented here, but works like this others: http://jettro.github.io/c3-angular-directive/api-docs/1.3/chartTooltip.html And you have the documentation of C3 here : http://c3js.org/reference.html#tooltip-contents I found it with this fixed issue; https://github.com/jettro/c3-angular-directive/issues/108 Available since the 1.3 version : https://github.com/jettro/c3-angular-directive#13