score:0
One propose solution (perhaps there is a better way - still be interested...)
I found, in my case, I could do this just by adjusting the bottom of my container.
Using the following markup..
<div id='graphc'>
<canvas (click)='updateClick($event)' #mygraph></canvas>
</div>
and the following css
#graphc{
width:100%;
height: 100%;
padding: 10px;
padding-bottom: 120px; // <-- this moves it up
}
This at least does what I was after, though if I stretch, I do always have the gap....
Maybe I could make the css "dynamic" to fix this
score:1
I think the space might be due to your css. Try changing that. This solves your problem as well.
legend:{
position: 'bottom',
labels: {
boxWidth: 20,
padding: -10
}
}
Source: stackoverflow.com
Related Query
- Chart,js Pie Chart can the gap between a pie chart and the legend be adjusted
- 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?
- ChartJS - How to add Text between Pie Chart and Legend
- Chart js: how can I align the legend and the title
- How can I change the cursor on pie chart segment hover in ChartJS 3?
- how to increase space between legend and chart in chartjs (ng2charts ) using angular
- Increase gap between line-chart and legend ChartJS
- How to set the gap between data items in a chartjs chart
- How can I move chartJs legend left side and change the width and Hight of the chart?
- How to increase the size of the donut or pie chart and keep the legend next to it in chart JS?
- ChartJS distinguish clicks between chart area, dataset and legend
- How do I increase the space between the Legend and the Chart when using angular-chart.js?
- Chart.js - Increase spacing between legend and chart
- chartjs datalabels change font and color of text displaying inside pie chart
- How to change the color of legend in chartjs and be able to add one more legend?
- Find intersection between the chart lines in chartjs
- ChartJS Line chart cut off at the top and bottom
- How can I display the xAxes and yAxes data in the tooltip, Chart JS?
- Increase padding between legend and chart with react-chartjs-2
- increase the gap between y-axis and first x-axis value chart.js
- ChartJs - Pie Chart - how to remove labels that are on the pie chart
- chartjs Adding percentages to Pie Chart Legend
- React chartjs-2 - Increase spacing between legend and chart
- How can I have different values for the chart and the tooltip in chart.js?
- 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 space between legend and chart
- How to reuse a Chartjs Chart component in with different Data and get past the **Canvas is already in use** error?
- How can I re-distribute values within a charts.js pie chart when a legend item is turned off/on?
- ChartJS : Hook before values are given to doughnut (absolute value in chart and real values in the tooltips)
More Query from same tag
- Does the chartjs supports localization?
- Chart content not getting loaded in popup
- How to hide a dataset with your own button?
- Chart.js Polar Area Chart is not scale right
- ChartJS zoom/pan onPan event not firing in React useEffect hook
- charts.js data doesn't fit second y-axis
- Updating Chart.js with JSON, cannot read property 'length' of undefined
- How to realize a discontinuous section (jumps) in a continuous line plot with Chart.js?
- How to rotate a linear graphic in chart.js?
- Chart.js bar thickness
- Difficulty in using php json_encode data received in javascript to display graph using chart.js library
- How to hide the labels of graphs that are not toggled in ChartJS
- How to create logarithmic scale in chart.js with normal numbers?
- Load data from a JSON object into an array
- How do you create a Radar chart using chart.js with a y-axis of 0 to 100?
- How to scale label size radar chart chart.js
- How can I get the active label element on click in ChartJS?
- How to show both overlapping lines in in chartjs
- Second yAxes values not charting correctly with Chart.js
- chart.js: How do I make the radar chart axis labels bigger?
- How to reload a jQuery element when a button is pressed
- In rails Label X and Y axis in chart. Implemented through chartkick and chart.js
- React component wont re-render ChartJS chart with redux props
- Chart.js axes always show zero
- ChartJS – Set baseline above zero
- How to bind json array data to chart.js with same canvas id?
- Chart.js More than 1 charts on same web page
- In chart.js , change color of chart by clicking button
- ChartJS - Set different hover-text than x-axis description
- How to decrease the interval for Horizontal Stacked bar in ChartNew.js?