tooltipTemplate equivalent in Chart.js 2.0 ?
See original GitHub issueCan’t find anything on this. What I want to do is to show percentages in the pie chart. Below worked in Chart.js 1.0
this.chart = new Chart(ctx, {
type: 'pie',
animateRotate: true,
responsive: true,
animationEasing: "easeOut",
animationSteps: 40,
tooltipTemplate: " <%=label%>: <%= value %> - <%= numeral(circumference / 6.283).format('(0[.][00]%)') %>",
data: topBrowsers
});
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to use the tooltipTemplate on Chart.JS 2.0 - Stack Overflow
The Chart.js 1.x tooltipsTemplate is equivalent to options.tooltips.callbacks.title in Chart.js 2.x: var ctx = document.getElementById("myChart"); var ...
Read more >Tooltip - Chart.js
Tooltip. # Tooltip Configuration. Namespace: options.plugins.tooltip , the global options for the chart tooltips is defined in Chart.
Read more >How to Add More Information in the Tooltips in Chart JS
How to Add More Information in the Tooltips in Chart JSIn this video we will explore how to add more information in the...
Read more >Chart.js Bar Chart Custom Tooltip - CodePen
A bar chart from my getting started with chart.js blog post...
Read more >An Introduction to Chart.js 2.0 — Six Simple Examples
Polar charts give each data point an equal amount of radial space. Segments with larger values extend further from the center of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@etimberg thanks for the swift response! I’ll try that out!
Edit:
Noticed that it should be
tooltips
instead oftooltip
Complete example
tooltips: { mode: 'label' }