score:9
I know you said you ruled out padding, but this is the only option I can see working:
options: {
layout: {
padding: {
bottom: -20
}
}
}
Obviously you can play with the -20
to what works for you.
Here is the reference for padding for chartjs, if you wanted to see more
EDIT:
I've updated your jsfiddle, with a colored div below the chart. As you resize it seems to stay at the same spot below the chart.
score:4
Changing the tickMarkLength
to 0 results in no padding on the left or bottom of the chart (or wherever your axis happens to be).
https://www.chartjs.org/docs/latest/axes/styling.html#grid-line-configuration
tickMarkLength
Length in pixels that the grid lines will draw into the axis area.
const options = {
scales: {
xAxes: [
{
ticks: {
display: false,
},
gridLines: {
display: false,
tickMarkLength: 0,
},
},
],
yAxes: [
{
ticks: {
display: false,
},
gridLines: {
display: false,
tickMarkLength: 0,
},
},
],
},
};
Source: stackoverflow.com
Related Query
- How can I remove extra whitespace from the bottom of a line chart in chart.js?
- How to remove the extra Y axis from a bar chart in chart.js
- How can I remove the white border from Chart.js pie chart when all legends are hidden?
- How can I trigger the hover mode from outside the chart with charts.js 2?
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- In Stacked horizontal bar chart how to remove the vertical line in Chart.js?
- I have 10 points inn x-axis, ranging [-25,-20,,-15,-10,0,10,20,30,40,50]. But I want my line chart to start from -15 of x-axis. How we can achieve?
- 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?
- How can I remove the white border from Chart.js V2.6.0 pie chart?
- Is there any way to remove extra space and Horizontal line from Bar chart of Chart.js?
- ChartJs 2 How to remove numbers from the doughnut chart on loading
- How to remove the Legend of chart from angular Chart.js
- How can I remove the grid line in the background of the line chart?
- how can i remove the decimals from the tick when im zooming?
- How do remove the bottom scale on a Chart.js bar chart
- How can I draw a line to the highest datapoint in chart js?
- How to remove a vertical line from the canvas of react-chartjs-2?
- In chart.js how can I change the x axis on my line \chart from January-December to October-September? Basically, fiscal year instead of calendar year
- How can I create a horizontal scrolling Chart.js line chart with a locked y axis?
- Remove the vertical line in the chart js line chart
- How to align Chart.JS line chart labels to the center
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- How to remove the Chart.js x Axis bottom line?
- Chart js: how can I align the legend and the title
- ChartJS Line chart cut off at the top and bottom
- How can I display the xAxes and yAxes data in the tooltip, Chart JS?
- How can I add some text in the middle of a half doughnut chart in Chart.JS?
- How can I make line on chart thinner?
- Chart.js – how to remove data entries from the tooltip?
- Lift the bar up from the bottom in bar type chart
More Query from same tag
- Angular Chart.js Multiple Canvas
- How to make tool tip contents display on multiple lines
- Using Chart.js on Laravel 5.3
- Dataset._meta[0].dataset is null in ChartJS
- Chart.js not being displayed inside Jquery Dialog
- Create stacked bar chart with a single dataset per stack
- how to Fill array with 0 if data is not present?
- Chart.js polar chart
- Chart js shows old chart data when hover
- .destroy() generating error 'window.myChart.destroy()' is not a function
- Styling problems with Chart.Js
- show label in tooltip but not in x axis for chartjs line chart
- Need help adding Chart.js chart to a Modal window (I'm Using AngularJS)
- vue-chartjs not working properly in flexbox and when resize chart goes blank
- Styling background (fill) with ChartJs and React
- Scatter chart in chart.js
- Chart.js xaxis formatter changes the value shown in the chart
- Pause horizontal scrolling in chart.js for real time data
- Age pyramid chart using chart.js
- ChartJS - Horizontal Stacked Bar Chart Tooltip being cut off by Bottom of Canvas
- Chartjs doughnut chart rounded corners for half doghnut
- Chart.js: How can I manually set Y-axis range?
- Printing Chart using ngPrint and tc-chartjs
- Chart.js horizontalBar customization
- ChartJS - x axis labels orientation
- Vue ChartJS is not updating
- ChartJs - Double tooltip Top and Bottom on hover
- chart js how to fill legend box with colour
- Chart.js chart doesn't render when using Angular 2
- ChartJS - Draw chart with label by month, data by day