score:21
Accepted answer
the linked question is for chart.js version 1.x. for the new version you need to use the ticks
option. see http://www.chartjs.org/docs/#scales
...
xaxes: [{
ticks: {
min: 0,
stepsize: 1,
max: 4
},
...
fiddle - https://jsfiddle.net/jkufz1b9/
Source: stackoverflow.com
Related Query
- How to make integer scale in Chartjs
- chartjs : how to set custom scale in bar chart
- ChartJS -- How do I change scale color when I have to scales?
- How do I make line charts overlay over bar charts in chartjs
- How to make points in chartjs draggable?
- How to add ChartJS code in Html2Pdf to view image
- How to make ChartJS not cut off tooltips?
- How to make chartJs stacked bar always rounded when data is 0?
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- Chartjs 2.0 alpha, how to have a static scale for y-axis
- How to set the chartjs bar graph scale to the highest value in the result data
- How can I make small grid lines above ChartJS labels?
- How to set a time scale to a ChartJS chart from JSON?
- How to select context or scale on chart in chartjs quickchart io to run getValueForPixel?
- how labels in chartjs can make data invisible
- How to make chartjs pie chart responsive
- How to make y axis only integer scaling in ChartJS?
- Angular Chartjs How to make it reactive to data change?
- How to make a chart with chartjs and Angular?
- Chartjs how to show scale label horizontally
- how to make chartjs columns smaller in width for bar chart?
- How to make custom text appear underneath each bar in chartjs bar chart?
- How scale sector in doughnut chartjs on hover?
- How do I make the Line in ChartJS not exceed the maximum of yAxes
- Chartjs - how to make line position to vertical center and how to display dotted sharp in the backround?
- How to make a interactive legend with chartjs
- How to make Chart JS ignore the scale between DatasSets
- How to make multiple horizontal bar chartjs
- How to make dashed thick lines with dots in ChartJS ? Is it possible?
- How to run Chart.js samples using source code
More Query from same tag
- React-Chart.js legend onClick function
- Update the chart data from an array stored in a variable on button click
- How to destroy chart object in order to change chart data dynamically (Chart.js)?
- How to use JSON data as chartjs data?
- angular-chart not showing Pie Chart
- react chart js skip zero value month
- How to turn off tooltip for primeng pie chart?
- Tooltip flickering when hovered on chart
- Delay animation of chart.js
- How to combine lines with different starting points in chartjs
- How to set max ticks count in chart.js 3.*.*
- specify bar width for a single bar
- Change point size and color on hover in chartjs
- How to set and adjust plots with equal axis aspect ratios - CHART.js
- Why using logarithmic gives 8e+2 value?
- Error: Cannot read property 'props' of undefined, Calling parent Method in Child
- How to send data to chart js using angular
- Display API data in line charts dynamically
- Make Chart.js canvas responsive inside the resizeable div
- Visualizing iris dataset
- ChartJS different background gradient depending on data (line graph)
- then function not returning values Angular js
- Links in bar charts (charts.js)
- Loop Dataset ChartJS Javascript
- How to create float charts with chartjs?
- chart.js 2.0 current mouse coordinates tooltip
- Chart.js canvas keeps shifting upwards if I add things below it? (Angular - Chart.JS - NG2Charts)
- How to expand the "Y" scale of the data in chart.js?
- Chart.js with handlebar.js shows empty canvas
- Chart.js (Radar Chart) different scaleLineColor for each scaleLine