score:1
Accepted answer
the simplest solution would be to define different borderwidth
and hoverborderwidth
on your dataset
as follows.
new chart(document.getelementbyid('mychart'), {
type: 'doughnut',
data: {
labels: ['red', 'green', 'gray', 'blue'],
datasets: [{
label: 'my first dataset',
backgroundcolor: ['red', 'green', 'gray', 'blue'],
bordercolor: 'white',
data: [3, 4, 5, 3],
borderwidth: 4,
hoverborderwidth: 0,
borderalign: 'center'
}]
},
options: {
responsive:true,
cutoutpercentage: 65
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/2.9.3/chart.bundle.min.js"></script>
<canvas id="mychart"></canvas>
Source: stackoverflow.com
Related Query
- How scale sector in doughnut chartjs on hover?
- How to make integer scale in Chartjs
- chartjs : how to set custom scale in bar chart
- How to trigger hover programmatically in chartjs
- How to render a vertical line on hover in chartjs
- How to change the cursor to a pointer when I hover over a bar in a ChartJS bar chart?
- ChartJS -- How do I change scale color when I have to scales?
- How to add ChartJS code in Html2Pdf to view image
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- Chartjs 2.0 alpha, how to have a static scale for y-axis
- 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 set a time scale to a ChartJS chart from JSON?
- How can I change the cursor on pie chart segment hover in ChartJS 3?
- How to select context or scale on chart in chartjs quickchart io to run getValueForPixel?
- ChartJs 2 How to remove numbers from the doughnut chart on loading
- Chartjs how to show scale label horizontally
- how to change thickness of two doughnut charts in chartjs
- ChartJs - Doughnut Chart - how to remove labels if percentage is less than a limit
- How Can customize chartjs doughnut chart border and tooltip
- How to set chartJs Doughnut labels on right side?
- Angular how to display data inside every part of doughnut chartjs
- How to change legend icon on hover Chartjs
- How can I add functionality to Chartjs Doughnut chart custom legend
- In ChartJS how do you format the hover over label in a time series?
- How to run Chart.js samples using source code
- How to implement doughnut ChartJS with CodeIgniter 3 and display data from database
- How to display data on hover inside doughnut chart in Angular Chart?
- How to add text inside the doughnut chart using Chart.js?
- How to clear a chart from a canvas so that hover events cannot be triggered?
More Query from same tag
- Vue watch not noticing changes on component prop
- React - how to get array from store before first render and use it as dataset for ChartJS
- chartnew.js - remove lines from pie chart on 100%
- How To Format Scale Numbers in Chart.js v2
- Chart.js line chart set background color
- Realtime chart JS in Java obtaining the data from a sensor ;Chart.js: Failed to create chart: can't acquire context from the given item
- Iterating through array in Chart.js data field
- chart.js with JSON Data on Same page not displaying
- chart.js line chart and "correct" spacing between points? (i.e. horizontal position based on percent of width, not fixed)
- chart js - Apply different color for each x-axes label
- Ticks for the minimum and maximum values in a Chart.js v2 axis
- Resizing chart issue with CSS Grid
- Chart.js variable data how can i make this work?
- multiple charts js in page but with same tooltips (about last chart)
- Integrate Blazor with Chart.js: how to pass an object
- Responsive canvas extends beyond div
- function not return values
- Draw a horizontal and vertical line on mouse hover in chart js
- How to display grouped data in ChartJs
- Javascript - How to Transform MiB to GB
- Charts.js scales yaxes ticks min max doesnt work
- Set animation dynamically in Chart.JS
- How can I remove the white border from Chart.js V2.6.0 pie chart?
- Update Chart js chart dynamically in angular 2 from data getting from nodejs service
- I want to multiply chart data according as array length
- chart.js: How do I make the radar chart axis labels bigger?
- angular-chartJs change chart background and highlight colors
- Chartjs Nested Pie/Doughnut charts
- How to add links to chart.js (Doughnut Charts)?
- Tool tip not showing for those label who's data overlapped on each other in chart.js