score:22
Accepted answer
you just need to change the canvas size.
when you are creating the chart you can specify it right in the element:
<canvas id="top10itemschart" width="1000" height="1000"></canvas>
or if you prefer to do it in javascript
var ctx = $("#top10itemschart").get(0).getcontext("2d");
ctx.width = 1000;
ctx.height = 1000;
if the resizing doesn't work as you wish, you can also try setting the maintainaspectratio
option to false:
var optionspie = {
/** ... */
responsive: true,
maintainaspectratio: false,
/** ... */
};
hope it helps.
Source: stackoverflow.com
Related Query
- How can I increase the size of the pie (Chart.JS)?
- How to increase the size of the donut or pie chart and keep the legend next to it in chart JS?
- How to Increase the label font size and decrease the size of my pie using chart.js?
- Chart is too big. How can I reduce size for the chart in vue js?
- How can I change the cursor on pie chart segment hover in ChartJS 3?
- How do I increase the arrow length on the pie chart in Charts.js?
- How can I reduce the spacing between my legend and chart proper in my Chart.JS bar chart, and increase it in the graph area?
- How can I remove the white border from Chart.js pie chart when all legends are hidden?
- How to make the size of pie chart fixed without using canvas (chart.js)
- How can I control the placement of my Chart.JS pie chart's legend, as well as its appearance?
- How can I remove extra whitespace from the bottom of a line chart in chart.js?
- Chart js: how can I align the legend and the title
- How can I display the xAxes and yAxes data in the tooltip, Chart JS?
- Chart,js Pie Chart can the gap between a pie chart and the legend be adjusted
- How can I trigger the hover mode from outside the chart with charts.js 2?
- How can I add some text in the middle of a half doughnut chart in Chart.JS?
- ChartJs - Pie Chart - how to remove labels that are on the pie chart
- How can I rotate a pie chart in charts.js?
- How can I have different values for the chart and the tooltip in chart.js?
- How can I show a subset of data on pie pieces in Chart.JS while still displaying the superset when hovering?
- Chart JS, ng2-Charts - How to make the label to the right of pie chart instead on top?
- How to style a pie chart in chart js? I want to change the border color, border width and give them shadow
- how can i use chart.js to create a chart that has one time series line and one linear line on it at the same time?
- increase the label size of a line chart in chart.js
- How can I remove the white border from Chart.js V2.6.0 pie chart?
- How can I re-distribute values within a charts.js pie chart when a legend item is turned off/on?
- How can I fix the offset of the gradient to be aligned with the chart points(chart.js)?
- Chart.JS: How can I only display data labels when the doughnut size is big enough for the text?
- How can i give the full Legend a background color in chart js?
- How add the sizes of the slices in the pie chart (at the top) in Chart.js?
More Query from same tag
- How to subscribe to elements in a response object
- How to have more controls over the borderColor per arc segment for chart.js pie charts
- NuxtJS ChartJS Gradient Color doesnt apply
- Pass custom labels as an array to Chart JS Tool tip
- Passing data from Express to HTML (Pug) to display Chart.js
- How to group smaller Pie Chart slices together to Improve Readability in chartjs
- How to create a variable for chart js datalabel plugin formatter
- ng2-charts customize data and whole html content of tooltip displayed when hovering on bar chart
- ChartJS How to set max labels for X axis?
- Put array in chart data
- How can I have different values for the chart and the tooltip in chart.js?
- Chart.js - Changing value of hover labels
- problem with chart js pie chart dataset data
- Synchronous XMLHttpRequest when loading charts.js in to a div
- Chart.js render in hidden Bootsrap tab
- Line graph - ChartJS
- Change chartType onclick ChartJS
- how can i remove the grid lines in chartJs
- Cannot read property 'length' of undefined for ChartJS when I use it inside React
- Reference Javascript variable in JSON
- downhole chart - recharts or chart.js or anything else?
- How to import Chart.js with Webpack
- How to create an animate-on-update Stacked Bar chart using Chart.js(or Chartist)?
- Chart.js, dashed line, full width chart
- Array is not being updated in useState hook?
- How to display chart using Chartjs with JSON data in Laravel
- Remove background on Chartjs v2 fixed tooltips
- Chart JS - Grid colors and gradient fill not showing
- Chart.js radar chart ticks are hidden behind the graph
- Chartjs Polar Area Chart: Category missing