score:4
Accepted answer
Add this
hover: {
onHover: function(e) {
$("#canvas1").css("cursor", "auto");
}
to options:
Like this:
var ctx = document.getElementById("canvas1").getContext("2d");
var mychart = new Chart(ctx, {
type: 'doughnut',
data: {
labels: ['uno', 'dos', 'tres', 'cuatro'],
datasets: [{
data: [1, 2, 3, 4],
backgroundColor: ["#BDC3C7","#9B59B6","#E74C3C","#26B99A"]
}]
},
options: {
hover: {
onHover: function(e) {
$("#canvas1").css("cursor", "auto");
}
},
legend: {
position: 'bottom',
onHover: function(c) {
console.log(c);
$("#canvas1").css("cursor", "pointer");
}
}
}
});
Source: stackoverflow.com
Related Query
- Add mouseout event handler to legends in Chart.js
- How to add an on click event to my Line chart using Chart.js
- Add zoom event handler to charts for chartjs with chartjs-plugin-zoom
- How to add on click event to chart js
- Angular Chart Js legends click event not working
- How to add chart js legends in ember?
- Add a click event to the bar chart of chartjs
- How to add text inside the doughnut chart using Chart.js?
- Chart.js how to show cursor pointer for labels & legends in line chart
- How to fix chart Legends width-height with overflow scroll in ChartJS
- Add DataSet Bar Chart - Chart.JS
- Click event on stacked bar chart - ChartJs
- How to add an offset to a dataset in Chart js
- ChartJS add tooltip to a grouped bar chart
- How to add second Y-axis for Bar and Line chart in Chart.js?
- How to add text in centre of the doughnut chart using Chart.js?
- How to add OnClick Event on labels in Chart.js v2.0?
- Chart.js v2.6: Add arrows to pie chart output values
- Changing cursor to pointer on Chart.js bar chart when hover (mousemove) event is disabled?
- Is it possible to add a custom font to chart js?
- How to add datas to chart js from javascript array itself?
- Chart.js - Add gradient to bar chart
- How to add panning to chart in chartjs?
- Add all data in the tooltip of Chart JS
- Chart.js - Add text/label to bubble chart elements without using tooltips?
- Map event position to y axis value in chartjs line chart
- how to add a title to my ng2-charts bar chart
- Add chart using chart.js in codeigniter
- How to add comma in this chart js
- How to add gradient background to Line Chart [vue-chart.js]
More Query from same tag
- zeroLineColor and zeroLineWidth not working for the x-axis in Chartjs
- Chart.js get the nearest point when clicked on canvas
- Hide Legend in Chart.js V3.7.1
- How to put 2 labels and distinct tooltips from two bars
- Display values in Pareto chart using Chart.js 2.0.2
- Chartjs blocks jumping to a section in ASP.NET MVC 5
- Prime NG Customise tool tip on Bar Chart
- dump missing date in data for chartjs
- Plot a Line chart using Chart.js with CSV Data
- Adding a Title to a Chart.js line graph
- Why is there an error in ChartJs.Blazor (change in ASPNETCORE_ENVIRONMENT)
- Error when implementing charts.js in angular
- ng2-charts tooltip and legend stopped working
- Fix ChartJS Values not Well Displayed
- Dates not displaying on X Axis using Chart.Js on MVC 5
- Looping variables or array
- Unable to Draw Chart using ChartJS
- Chartjs Line Color Between Two Points
- Create multiple dynamic charts
- how to customize tool tip while mouse go over bars on Chart js bar chart
- Format array output to be readable by chartjs in Laravel
- chart.js label and value overlap issue
- Specify varying thickness of each bar in Chart.js bar chart
- Replace a Canvas Pie Chart Onclick
- Chart JS Tooltip Currency Problem - Stacked Bar Chart
- Chart.js how to modify an existing legend
- How to push element in array in a certain structure
- ChartJS rotate 90' but keep text straight
- Data not displaying in django admin - using chart.js (no errors)
- Chart.js turn labels into links