score:12
Accepted answer
To start the y-axis from 0
, you would have to set the beginAtZero
property to true
for y-axis ticks, in your chart options, like so :
options={{
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}}
see - working demo
score:0
You need to add this piece of code to the dataset object
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
}
}]
}
}
You can read more in the docs Axes Range setting
Source: stackoverflow.com
Related Query
- Is it possible to set up 0 as a minimum number for bar chart? react-chart.js-2
- How to set X coordinate for each bar with react chart js 2?
- Chart.js: Minimum value for x-axis at horizontal stacked bar chart
- Minimum value for x Axis doesn't work for horizontal bar chart | ChartJS
- Set minimum number of steps in line chart
- How to use set the color for each bar in a bar chart using chartjs?
- Set fixed label size for grouped bar chart in angular Chartjs
- How to set minimal value for bar chart in Chart.js? (ver. 2.0.2)
- chart js 2 how to set bar width
- Set minimum step size in chart js
- chartjs : how to set custom scale in bar chart
- How to add second Y-axis for Bar and Line chart in Chart.js?
- Chart JS - set start of week for x axis time series
- Different color for each column in angular-chartjs bar chart
- Border radius for the bar chart in ChartJS
- Can't get bar chart colors in Chart js working in React Js
- Chartjs - data format for bar chart with multi-level x-axes
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- How to set a full length background color for each bar in chartjs bar
- set y-axis scale manually in a bar chart using angular-chart.js
- In chart.js, Is it possible to hide x-axis label/text of bar chart if accessing from mobile?
- how to set chart.js grid color for line chart
- Grouping the object by key for Chartjs bar chart
- PrimeNg bar chart how to show a label for the y-axis
- X-axis multiple colored label for bar chart using chart.js
- How to set single color on each bar in angular chart js
- Possible to merge 2 bars in bar chart (chart.js)
- ChartJS bar chart fixed width for dynamic data sets
- Stacked bar chart starting from 0 - ChartJS React
- Is it possible to change pointStyle for elements of a ChartJS bubble chart per dataset?
More Query from same tag
- Chart.js moment locale
- How to remove legend at the bottom of chartjs doughnuts
- how to use chart.js with angular-chart using requirejs
- Add MQTT topics and data to chartjs
- Need help adding Chart.js chart to a Modal window (I'm Using AngularJS)
- How to change font size of labeled scales in Chart.js?
- Chart js - render images on only one dataset
- Multiple Chart JS percentage labels
- how to setting chart js customization
- Chart.JS Time Axis Not Parsing
- JavaScript function based on counter
- How to line break a label object in ChartsJS (nested arrays won't work)
- How can I create a bar chart that has multiple yAxes scales?
- Uncaught TypeError: Cannot read property 'draw' of undefined : Angular chart js
- How to allow zooming in between range only in chartjs-plugin-zoom
- How can I get a point to be drown over the line?
- Chart.js using the value of certain data in external json file
- Laravel query builder for Charts.js
- ChartJs line chart time cartesian axis number of ticks and wierd offset
- chart.js modify style from dataset label
- How do I add JSON Data into ChartJS
- How to display data with percentage from database in pie chartjs?
- Chart.JS Bar Chart Throwing Error About Missing )
- Chart.js v2 overwrite draw function
- Is it possible to show labels for all lines?
- How to assign different background colors to chart.js pie chart data set?
- Using chart.js with laravel passing data from controller to view
- Timeline on Y axis, with chart.js
- Align lines and bars in a mixed chart
- Chartjs Polar Area Chart: Category missing