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
- Error when changing data after migrating to vue-chartjs 4
- Format array output to be readable by chartjs in Laravel
- Google Pie Chart php mysql
- Remove the vertical line in the chart js line chart
- time series stream, removing am/pm on x axis and 24 hour format
- How to change position of label of y-axes in chartjs?
- How to have more controls over the borderColor per arc segment for chart.js pie charts
- Y-axis label in chartjs 2.0.0
- How to update a chart taking by querying a database?
- How to ignore same values on ChartJs?
- Set size chartjs in div
- How to access or get value of specific graph on chart plot by click event?
- How to I optimise these javscript options which is used multiple times on different chart.js graphs?
- Chart.js manipulate each bar in chart with different labels
- Chartjs v7.0 with plugin zoom, strange effect when use "drag" mode.
- Generate multiple line charts in Django with ChartJS
- How can I do a sensitivity range with chart.js?
- Chartjs: update the min and maximum of the yaxes ticks on a click
- Is it possible to display values where the display ends instead of on top of the points with chartjs?
- How can I load multiple Chartjs charts with different data on the same page?
- Chart.js xaxis formatter changes the value shown in the chart
- How to create chartjs chart with data from database C#
- Problem in making chart with Chart.js in wix?
- Adding label inside multiseries doughnut chart through chart.js
- Display ellipsis for null or empty values in the bar chart using Chart.js
- Charts js showing only when positives data
- How can i do this chart in react?
- chartjs improvement display label
- How change chart height in chart.js
- angular chartjs line chart default options