score:4
Accepted answer
Because the item you are drawing is larger than 400 pixels, this is actually a bug in ChartJS. The current Alpha of ChartJS 2.0.0 addresses and fixes this problem. The segmentStrokeWidth
is not taken into account when drawing the chart on the canvas, that causes the it to be larger than the canvas.
A fix for this version would be to subtract the outerRadius
of your graph by half the stroke width:
var strokeWidth = 5;
var options = {
animation: true,
segmentStrokeWidth : strokeWidth
};
...
myNewChart = new Chart(ct).Doughnut(data, options);
myNewChart.outerRadius -= (strokeWidth/2);
Source: stackoverflow.com
Related Query
- Chart.js canvas cuts off doughnut stroke
- chart.js cuts off canvas - but padding makes doughnut very small
- ChartJS - Horizontal Stacked Bar Chart Tooltip being cut off by Bottom of Canvas
- Chart.js canvas resize of pie / doughnut chart
- Chart.js doughnut and pie chart at same canvas mixed
- getting additional value fields from data source for dx.chartjs doughnut chart
- Pie chart inside doughnut on same canvas
- While placing chart.js Doughnut Chart inside Primeng Carousel, the text inside the canvas seems blurred/distorted a little bit
- 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?
- Converting Chart.js canvas chart to image using .toDataUrl() results in blank image
- How to prevent first/last bars from being cut off in a chart with time scale
- chartjs tooltip is cut off when out of canvas
- Chart.js line chart is cut off at the top?
- Chart.js doughnut chart tooltip size?
- How to add text in centre of the doughnut chart using Chart.js?
- Can't resize react-chartjs-2 doughnut chart
- set background color to save canvas chart
- Display Doughnut Pie Chart As Circle Progress Chart.js
- Can Chart.js combines Line Chart and Bar Chart in one canvas
- Chart.JS full-width, responsive doughnut chart with Bootstrap
- Chart.js - Multiple Doughnut Charts on same Canvas
- How to display the labels in doughnut chart using ng2 charts?
- Chart.js HTML custom legend issues with doughnut chart
- How to create single value Doughnut or Pie chart using Chart.js?
- (Vue, ChartJS) Create gradient background for chart from child component canvas context
- Chart.js doughnut canvas padding
- Adding a label to a doughnut chart in Chart.js shows all values in each chart
- Doughnut chart adjusting problem in chart.js
- Chart.js pie chart not showing in Google Chrome canvas
More Query from same tag
- How to write with good practice?
- Chart.js date x-axis with sparse datapoints
- Dynamically updating time data in chart.js freezes the chart
- How can I format chart.js data labels while using chart.js datalabels plugin?
- Floating clone does not show in chrome if dragged element contains a chartjs component
- How to display inline values in a stacked bar chart with Chart.js?
- Increase space between legend and chart
- Implementing Data Decimation in vue chartjs
- Chart.js glitches and reverts to previous dataset on hover
- Using array as data in Chart.js
- Hovering over line chart shows old chart data issue in chart.js
- chart js label not showing
- getBoundingClientRect gives incorrect value
- ng2-charts does not work When data is between 2 and 5
- Chart.JS removing data stuck in loop
- Chart.js label value
- Chart.js dataset controller 'null' when chart drawn
- ChartJS keeps resizing canvas to the default size
- Remove Angularjs-Chart border and reduce chart arc thickness
- Update chart data in angular2-chartjs
- ChartJS Horizontal bars barely visible with 50 records on the Y axis
- Chart.js will not show up second line
- How to reach to a chartjs chart's value?
- Load data from a JSON object into an array
- Change line point to triangle in Chart.js
- How to get an attribute of element by jquery
- Highlighting point in all datasets on hover over
- How to display a progress over time in one horizontally stacked bar with chartjs
- Why is each character displayed on a new line/row?
- Chart.js addData is undefined when using SignalR