score:2
Accepted answer
You can define xAxes.offset: true
and it should work as expected.
xAxes: [
{
offset: true,
...
}
]
offset
: Iftrue
, extra space is added to both edges and the axis is scaled to fit into the chart area.
Please take a look at your amended StackBlitz.
Source: stackoverflow.com
Related Query
- X axis should have a space in Line chart- Chart JS
- Chartjs 2 - Stacked bar and unstacked line on same chart with same y axis
- show label in tooltip but not in x axis for chartjs line chart
- Show X axis on top and bottom in line chart rendered with Chart.js 2.4.0
- Obtain max value of y axis of line chart rendered with Chart.js
- Changing x axis labels in Chart.js line chart
- Line chart with large number of labels on X axis
- chart.js switch x/y axis on line chart
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- Map event position to y axis value in chartjs line chart
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- chartjs - multi axis line chart - cannot read property 'min' of undefined
- to increase space between x axis and first horizontal bar in chart js
- Change Axis Line color in Chart created using chart.js
- change space between horizontal (grid) lines for line chart
- 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?
- display vertical axis label in line chart using chart.js
- Chart.js - how to make proportional intervals on X axis on line chart
- Chart.js two y axes line chart tooltip value incorrect for 2nd y axis
- Is it possible to have a decimal X axis for a line graph?
- Chart with Time axis only displaying first grid line and tick label (unitStepSize)
- How do you set x and y axis and Title for a line chart using charts.js?
- Is there any way to remove extra space and Horizontal line from Bar chart of Chart.js?
- How to use chart.js to plot line chart with x axis as time stamp in seconds
- X and Y axis labels not displaying on line chart (Chart.js)
- Django chart.js multi axis line chart
- Google Charts, HighCharts or ChartJS Dual Axis Gantt Chart and Line Chart Visualization
- How to start Y Axis Line at 0 from right for negative values in chart js 2?
- How to Add X axis Padding in chart js Line Graph
- hereChartJS Line Chart with Time Axis
More Query from same tag
- Using Charts.js with react
- chart.js 2.7.1 - polar area chart has too much padding
- Chart.js with Node.js
- How to use plugins in chartjs and laravel chart consoletvs/chartsjs
- Vue.js chart not working?
- Adding a chart-js plugin to vue-chart-js
- How to start the chart from specific time and offest hour and then show the data on chart from target datetime in chartjs
- Charts.js: Using an object to graph
- Pushing data from angular typescript to chart.js library complication
- Chart.js Line chart Option does not disable gridlines
- I am having this error in charts v3 chartjs-chart-treemap: fontColor does not exist in type 'ChartDataset<"treemap", TreemapDataPoint[]>
- Unix Timestamp Chart.js with PHP echo
- Angular: How to change color of chartjs?
- How to show values on top of bars in a PDF using chart.js and chartjs-node-canvas?
- chart js put meter square / superscript on y axis
- How to show percentage (%) using chartjs-plugin-labels ( Pie chart ) in angular 2/8
- How to save in chart original ID of element in array that is used to build chart data labels?
- django 'LineChart' object has no attribute 'get'
- Show the latest labels in a bar chart with React.js using react-chartjs
- Dollar sign on y-axis with ChartJS
- Chart js: generate dynamic labels according to the data
- How to group chart labels together?
- Update the Chartjs push data with ajax
- How to set a length difference in chart?
- Y-axis label in chartjs 2.0.0
- ChartJS - line graph, position tooltip
- Chart.js: How can I set paddings and draw a background box in a line chart?
- Angular using PrimeNG charjs problem with font colors
- Missing colors in my Chart.js, my data looks fine, but no color
- first and last value is not displaying in chart.js used with django