score:0
Accepted answer
you need to define the cutoutpercentage
option inside the chart options as follows:
<doughnut
data={data}
options={{
responsive: true,
cutoutpercentage: 80,
...
}}
/>
cutoutpercentage
: the percentage of the chart that is cut out of the middle (default value is50
).
score:1
edit cutout property in options
let options = {
responsive: true,
cutout:"80%",
legend: {
display: false,
},
layout: {
padding: 10,
},
};
Source: stackoverflow.com
Related Query
- react-chartjs-2 chart.js: How to make strokewidth of dougnut chart thin?
- How to make chartjs pie chart responsive
- How to make a chart with chartjs and Angular?
- How to set up a simple pie chart using React in ChartJS on codesandbox
- How i can i reduce the borderwidth of a chartjs dougnut chart
- How to access custom property in dataset object in Bar Chart in React ChartJS 2?
- How can I make two of my lines in Chart JS thicker
- How to make integer scale in Chartjs
- chartjs : how to set custom scale in bar chart
- How can I make a stepline or stepped chart in chart.js or D3?
- How to fix chart Legends width-height with overflow scroll in ChartJS
- How to access labels array using chart plugin (Chart.pluginService.register) in Chartjs 2.x?
- how to make a chart.js bar chart scrollable
- How to draw Horizontal line on Bar Chart Chartjs
- how to get React chartjs to resize back down with window
- React ChartJS 2 : Get data on clicking the chart
- how to programmatically make a line chart point active/highlighted
- How to dynamically set ChartJs line chart width based on dataset size?
- How do I make line charts overlay over bar charts in chartjs
- How to make Chart JS responsive?
- How to make points in chartjs draggable?
- How to make bar chart animation where all bars grow at the same speed?
- How to make a chart scroll horizontally (when using Chart.js)
- How to add ChartJS code in Html2Pdf to view image
- How can I make line on chart thinner?
- ChartJS - how to display line chart with single element as a line? (not as a dot)
- ChartJs - Pie Chart - how to remove labels that are on the pie chart
- How to make ChartJS not cut off tooltips?
- ChartJS (React) Line Chart - How to show single tooltip with data and labels from 3 (multiple) dataset?
- Stacked bar chart starting from 0 - ChartJS React
More Query from same tag
- Charts.js how to fix the height with more than 50 horizontal bars
- Vue JS setting data collection in component
- Chart.js - Getting data from HTML
- ReactJS - Moving vertical line when hovering over Line chart using chart.js v3.7.1
- How to add external scripts and css in latest angular-cli
- Make Line Chart Dynamic From JSON File Using Chartjs
- Chart JS - Title missing when clearing canvas if no data is available
- Create a line chart using an user input table from a data table in chart.js
- How to draw a needle on a custom donut chart and add datapoints to the needle?
- chart.js uncaught reference error while updating
- How can I hide a chartjs chart?
- Chartjs change grid line color
- Thicker X-Axis with Charts.js
- Add Horizontal crosshairs using Chart.js
- jquery load with chart.js
- How to drill down charts with ChartJS?
- How to order tooltip values from the biggest to the smallest
- Convert FirestoreCollection into an array?
- display ng2 chart when the property of data returned is >=0
- Show the latest labels in a bar chart with React.js using react-chartjs
- Set animation dynamically in Chart.JS
- Chartjs custom dynamic legend overflowing
- Pie Chart Legend - Chart.js
- How to draw outer labels for polar chart using ng2-charts and chart.js at fixed positions outside the rings?
- VueJs and ChartJs - Chart is responsive in width, but not height?
- Chart.js - Styling Legend
- Linear x axis for bar chart chartjs
- Vuejs parameters in props
- How to set min Value a step down of min value received from database in Y Axis in ChartJS
- Mobile page loading in "zoomed" state