Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  7] [ 5]  / answers: 1 / hits: 91477  / 8 Years ago, tue, january 31, 2017, 12:00:00

How can I set the code that there will be no hover effects, hover options, (hover) links etc on chart?



I'm using chart.js. Below is my code, where I set pie chart.



Html..



<div id=canvas-holder style=width:90%;>
<canvas id=chart-area />
</div>


..and js...



$(document).ready(function () {


var config = {
type: 'pie',
data: {
datasets: [{
data: [60,20],
backgroundColor: [
#ddd,
#58AC1C
],

label: 'Dataset 1'
}],
labels: [
Bla1 ,
Bla2 +
]
},
options: {
responsive: true
}
};


window.onload = function() {
var ctx = document.getElementById(chart-area).getContext(2d);
window.myPie = new Chart(ctx, config);
};
});

More From » jquery

 Answers
24

You can try



 showTooltips: false


You can also use the following link



http://jsfiddle.net/TZq6q/298/


[#59137] Sunday, January 29, 2017, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
katharinek

Total Points: 302
Total Questions: 105
Total Answers: 123

Location: Austria
Member since Thu, Jan 7, 2021
3 Years ago
katharinek questions
Sat, Jan 16, 21, 00:00, 3 Years ago
Sat, Dec 5, 20, 00:00, 4 Years ago
Mon, Nov 30, 20, 00:00, 4 Years ago
Fri, Aug 21, 20, 00:00, 4 Years ago
;