score:1
Accepted answer
the x scale left and right paddings are calculated in the calculatexlabelrotation. if you have only these kind of charts you could simply replace this function to return no padding, like below
var originalcalculatexlabelrotation = chart.scale.prototype.calculatexlabelrotation
chart.scale.prototype.calculatexlabelrotation = function () {
originalcalculatexlabelrotation.apply(this, arguments);
this.xscalepaddingright = 0;
this.xscalepaddingleft = 0;
}
fiddle - http://jsfiddle.net/ov9p5qhz/
note that there is still some spacing on the left and right - that comes from your barvaluespacing: 4
option.
if you have other charts on the page that you don't want to keep separate, use chart.noconflict()
Source: stackoverflow.com
Related Query
- In Stacked horizontal bar chart how to remove the vertical line in Chart.js?
- How to remove a label in top of bar in chartjs chart
- How to remove the extra Y axis from a bar chart in chart.js
- How do remove the bottom scale on a Chart.js bar chart
- How to remove percentage calculation on top of bar in ng2-chart bar chart
- How to remove paddings in Bar chart? (Chart.JS)
- Charts.js : How to remove the Vertical Black lines in Bar Chart
- chart js 2 how to set bar width
- Chart.js Bar Chart: How to remove space between the bars in v2.3?
- Chart.js Bar Chart - how to chart bars from 0
- How to put rounded corners on a Chart.js Bar chart
- chartjs : how to set custom scale in bar chart
- How to add second Y-axis for Bar and Line chart in Chart.js?
- How to create stacked bar chart using react-chartjs-2?
- How do I draw a vertical line on a horizontal bar chart with ChartJS?
- How to display inline values in a stacked bar chart with Chart.js?
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- How can I remove extra whitespace from the bottom of a line chart in chart.js?
- Remove the label and show only value in tooltips of a bar chart
- How to have solid colored bars in angular-chart bar chart
- how to make a chart.js bar chart scrollable
- How to draw Horizontal line on Bar Chart Chartjs
- how to add a title to my ng2-charts bar chart
- Chart.js Radar Chart How to Remove Outer Labels
- PrimeNg bar chart how to show a label for the y-axis
- How to set single color on each bar in angular chart js
- How to make bar chart animation where all bars grow at the same speed?
- How to show data values in top of bar chart and line chart in chart.js 3
- How to change Chart.js horizontal bar chart Width?
- ChartJs - Pie Chart - how to remove labels that are on the pie chart
More Query from same tag
- Overlay text message on top of a chart
- How to display value after the bar using chart.js
- Chartjs-2(React), Lines do not appear
- Creating multiple canvas patterns fails
- Can I specify a different font size for each row of text in Chart Title?
- MongoDB based data is not populating in Chart.js
- Save data from REST API Get method and use it one more time
- Price history with chart js
- Chart JS - Line chart with days in x-axis
- Update/re-render Charts.js in Angular 4
- Change the hover data value from to string
- chartjs - edit or remove label
- How can I hide tick marks on Chart.js?
- How can I automatically wrap tooltip text content to multiple lines?
- Chart.js v2.0 - colouring individual bars differently
- How to set the gap between data items in a chartjs chart
- Javascript : import produces a syntax error
- Convert charts from vue-chartjs to a PDF
- How to change X-axis interval in chart.js
- Charts.js does not render chart until I open the console
- How to add datetime formate for public function as key(stdClass) in controller/laravel
- Display API data in line charts dynamically
- How to change the z order of a chartjs polar chart
- Chart js each label for each data
- Chart.js line graph change x axis seperation
- How to drill down charts with ChartJS?
- chart js how do I only show just the low/high dots on line chart?
- Conditional in ChartJS axes tick callback function isn't returning the expected labels
- Vue JS setting data collection in component
- Chart.js pie chart overflowing div