score:2
Accepted answer
you can define hoverborderwidth
on your dataset
as shown in the code below:
new chart(document.getelementbyid("chart"), {
type: "bar",
data: {
labels: ["january", "february", "march", "april", "may", "june", "july"],
datasets: [{
label: "my first dataset",
data: [65, 59, 80, 81, 56, 55, 40],
fill: false,
backgroundcolor: ["rgba(255, 99, 132, 0.2)", "rgba(255, 159, 64, 0.2)", "rgba(255, 205, 86, 0.2)", "rgba(75, 192, 192, 0.2)", "rgba(54, 162, 235, 0.2)", "rgba(153, 102, 255, 0.2)", "rgba(201, 203, 207, 0.2)"],
bordercolor: ["rgb(255, 99, 132)", "rgb(255, 159, 64)", "rgb(255, 205, 86)", "rgb(75, 192, 192)", "rgb(54, 162, 235)", "rgb(153, 102, 255)", "rgb(201, 203, 207)"],
borderwidth: 1,
hoverborderwidth: 5
}]
},
options: {
scales: {
yaxes: [{
ticks: {
beginatzero: true
}
}]
}
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/2.9.3/chart.min.js"></script>
<canvas id="chart" height="80"></canvas>
Source: stackoverflow.com
Related Query
- Showing border for columns in barchart of chart js on hover?
- Border radius for the bar chart in ChartJS
- Chart.js tooltip hover customization for mixed chart
- Chart JS not showing On hover with small data
- chartjs: How to create single outer border for stacked barchart
- Chartjs : Can I overwrite bar value on hover for every bar chart
- ChartJS/High Charts Radar chart - Different radial axis labels for each category that appear on hover
- ChartJS not showing data for time series bar chart
- How make border radius for chart area chart.js?
- Chart JS version 3 not showing in pdf for engine wkhtmltopdf
- chart.js 3 stacked bar chart - tooltip showing for zero values
- Chart.js showing old chart on hover
- ChartJS: Custom legend not showing Labels for Multi-Pie chart
- getting additional value fields from data source for dx.chartjs doughnut chart
- Chart.js doughnut chart isn't showing tooltip when you hover over the left/right of the doughnut
- charts.js chart showing old data on hover
- Chart js - Line chart cuts border for lines in boundaries
- How to clear a chart from a canvas so that hover events cannot be triggered?
- How can labels/legends be added for all chart types in chart.js (chartjs.org)?
- Chartjs Bar Chart showing old data when hovering
- Chart Js Change Label orientation on x-Axis for Line Charts
- Chartjs random colors for each part of pie chart with data dynamically from database
- Chart.js - Hover labels to display data for all data points on x-axis
- Chart.js how to show cursor pointer for labels & legends in line chart
- Chart JS - Use time for xAxes
- show label in tooltip but not in x axis for chartjs line chart
- chartjs show dot point on hover over line chart
- Detecting hover events over parts of a chart using Chart.js
- How to add second Y-axis for Bar and Line chart in Chart.js?
- chart.js Line chart with different background colors for each section
More Query from same tag
- 0 line style of Chart.js line chart
- Dynamically Creating Json Array Javascript
- Cannot zoom in Chart.js
- TypeError: CanvasRenderService is not a constructor
- Scatter plot not showing anything chartjs needs some debugging
- ChartJs does not render chart when binding canvas id in Angular
- Font size will not change Chart.js version 3.2.1
- Chartjs: how to remove datapoint info from label?
- Chart.js: compare two periods like Google Analytics with a line chart
- Beginner using chart.js: having trouble display state full of data into a column chart using variables
- ChartJS - Issues with positioning and viewing various components of horizontal bar
- Height for chart area (not the canvas size)?
- Chart.js - barchart - plugin labels
- The real time chart sometimes does not display when I switch the target
- Chart.js canvas and chart width gets overwritten when redrawn
- How to format the left legend on chartjs
- ChartJS: Limit label's length on an axis and show a tooltip on hover?
- passing json data to chartjs
- Chart.js: Get point index from chart.getPointsAtEvent(e)
- React-Chart.js : How do I increase the space between the legends and chart?
- Automatic resize of chart - AngularChartJS
- Chartjs Data via json request not populating
- ChartJS different border color for legend
- How to Convert an Array of Objects into an Object of Associative Arrays in Javascript
- How to resize Chart.JS element in React.js?
- Iterating over an IEnumerable in Javascript for Chartjs
- Chart.js ignore options
- chart.js label color change based on value
- Vertical Line chart with ChartJS
- Canvas not rendering after animation without resizing viewport