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
- Reloading ChartJs Image
- Chartjs v2.5 - only show min and max on scale, absolute positioning on scale
- chart.js - How draw x and y axes lines on the left and bottom
- Setting Canvas Limits Over the Existing Dataset Values
- Increase space between largest bar and top grid line in charts.js
- Charts.js tooltip overlapping text on chart
- Chart.js line chart looking as area chart with smooth lines but not sharp
- I get to do scroll
- Vue JS setting data collection in component
- When using chart.js to draw a line chart, if the peak is between two x values instead of "at a x value"
- setting QuickCharts color
- angular-charts.js doesnt work with ionic
- chart.js tooltip position, tooltip not displayed
- Why don't my datasets show up on line graph using Chart.js?
- Canvas not rendering after animation without resizing viewport
- Link in ChartJS tooltip not clickable
- Javascript array not initialized
- chart.js reduce file size
- Chart.js with Angular component - Type 'string' is not assignable to type 'ChartTitleOptions | undefined'
- Custom data in label on ChartJS pie chart
- I want to hide the label in a tooltip because it shows undefined
- DiscordAPIError: Invalid Form Body embed.image.url: Scheme "[object response]" is not supported. Scheme must be one of ('http', 'https')
- how to create multiple chart on one component vue
- opening json file to create chart in chart.js
- Is it Possible to get the base 64 of graph without showing it on page / canvas (Graph.Js)
- create a multi line chart using Chart.js
- Angular ChartJS 2.9.4 issue updating chart
- Chart.js More than 1 charts on same web page
- Modifying values in a radar chart.js based on user input
- React/Chartjs change data with a button