score:1
there is a cursor property in css that you can set. for example :
span.crosshair {
cursor: crosshair;
}
span.help {
cursor: help;
}
span.wait {
cursor: wait;
}
Please refer to this link for more information
score:5
I needed the cursor to change only when over a bar or point on a line chart so came up with this simple solution. Place your function outside the chart declaration.
var chart = new Chart(ctx, {
data: {...},
options: {
onHover: graphHover
}
});
function graphHover(e, array) {
if(array.length > 0) {
e.target.style.cursor = 'pointer';
}else {
e.target.style.cursor = '';
}
}
Source: stackoverflow.com
Related Query
- How to change the cursor to a pointer when I hover over a bar in a ChartJS bar chart?
- How to change cursor style to pointer on hovering over points of the chart?
- ChartJS bar chart - trigger hover even when the cursor is outside of the bar
- How can I change the cursor on pie chart segment hover in ChartJS 3?
- Changing cursor to pointer on Chart.js bar chart when hover (mousemove) event is disabled?
- How can I change the label name when you hover your data in Chart.js?
- In ChartJS how do you format the hover over label in a time series?
- How to change the labels to the image (icon) in bar chart.js
- How to change the color of legend in chartjs and be able to add one more legend?
- ChartJS -- How do I change scale color when I have to scales?
- How do I make line charts overlay over bar charts in chartjs
- How to Change the Label Strike-Through with light gray on a ChartJS Doughnut?
- How to make the whole <canvas> element in Chart.js V3.7.0 display cursor as pointer on hover?
- How do I change the colour of a Chart.js line when drawn above/below an arbitary value?
- How to make chartJs stacked bar always rounded when data is 0?
- Chart.JS: How can I only display data labels when the bar width is big enough for the text?
- How to set the chartjs bar graph scale to the highest value in the result data
- Chartjs - how to change the notation of doughnut chart
- How to change cursor on hover of data labels in chart.js version 3?
- In ChartJS how do I change the color of a label in the legend?
- How to change the color of the bar in barchart if the data is negative - Angular Charts
- How to show the chartjs bar chart data values labels as text?
- ChartJS: Highlight dataset in a stacked bar chart when hovering over the legend?
- How to change the z-index of chartjs annotations label?
- Angular-Charts bar chart does not update when I change the data, series, labels
- how to show bar value on the top of each bar in chartjs
- How to add additional label in the middle of each bar using ChartJS
- How can I move chartJs legend left side and change the width and Hight of the chart?
- How to change the position of the tooltip for the Bar type chart in Chart.Js
- How to Change the Y axis of an Primefaces 7.0 ChartJS Linechart with Java?
More Query from same tag
- Can't display data labels in chartJS
- Trying To Change only each Label's title in angular Chartjs
- chart.js : Not all points use defined colors
- Configuring a Radar Chart w/Chart.js
- Chart.js Change color of the values *inside* the bars of a Bar chart
- .datasets is undefined when trying to access bars from chart.js
- chartjs: set default min for the line chart
- How to separete chart series into different pane (Chart.js)
- Chart.js microsoft edge display issue
- How to change the color of legend in chartjs and be able to add one more legend?
- chartjs - edit or remove label
- Change chart.js options based on window width
- chartjs - no smooth rendering on time series plot
- Bar color in ChartJS not updating
- Labels (category type) on left and right of bar chart using chart.js?
- How to display the more then one value inside tooltip in bar chart.js?
- Feeding PHP MySQL Call into Charts.js
- Displaying Chart with data retrieved from Entity Framework in Controller
- Bar Chart in Angular JS Using Chartjs
- chart.js: Place tooltip for stacked bar charts on top of bar
- charts.js add data with date
- How do I connect to a PostgreSQL database on Heroku server and use Chart.js?
- Chart.js multiple datas between labels
- ChartJs events in Angular
- How can configure my y-axis on chart.js?
- Chart.js with JSON data error
- How to add font color in vue-chartjs
- Display API data in line charts dynamically
- ChartJS getting an unwanted line between first data point and last data point
- Different major tick format in Chart.js