score:12
Accepted answer
Move the options
part to the Chart creation:
var LineGraph = new Chart(ctx, {
type: 'line',
data: chartdata,
options: {
responsive: true,
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
Here's an example from the docs.
score:0
options: {
resposive: true,
scales: {
y: {
suggestedMin: 0,
suggestedMax: 100
}
}
}
Source: stackoverflow.com
Related Query
- Chart.js Bar graph will not start at zero as minimum value
- Last value not showing in bar graph of charts.js-library
- 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
- Chartjs - Set start and end value into a Bar Chart
- Charts.js - Bar chart different colors for value intervals not working
- Want to show small part of js Bar Chart when value is zero
- Chartjs Bar Chart Y Axis set base starting value to not be 0
- Chart.js with line chart and bar chart - bar chart not rendered although the max value of it is shown
- How can i get the Chart JS Bar Graph Bar Label and Value on click?
- Chartjs bar chart ranges y-axis -1 to +1 if bars value zero
- Chart.js: bar chart first bar and last bar not displaying in full
- Show bar with zero value in ChartJs v2
- Chart js data to start at zero
- Remove the label and show only value in tooltips of a bar chart
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- chart.js bar chart color change based on value
- Chart.js update function (chart,labels,data) will not update the chart
- Chart JS display Data Value on the top of the Bar
- How to remove bars for those bars with zero value in Chartjs bar chart?
- Chartjs (Non Vue) Not Rendering Graph Chart inside V-if/V-show
- Chart.js Ionic 2 Angular2: Background color of bar graph not changing
- How to hide value in Chart JS bar
- How to access or get value of specific graph on chart plot by click event?
- Chart js space above bar graph
- react chart js skip zero value month
- Chart.js stacked bar chart - sorting values in bar by value
- Mark X value on Chart Js graph
- Chart.js Date and Time Bar Chart Not Rendering - Line Works Though
- Bar Chart of ChartJS does not Render
More Query from same tag
- Where is the appropriate place to instantiate a javascript widget/chart/utility when using angular.js?
- Chart.js - tooltiptemplate with one decimal value in pie chart
- How to convert chart.js library chart to image in pure node.js without using HTML and CSS?
- Data not displaying properly in Chart.js line chart
- Get last 6 month name in Array for Chartjs
- Chartjs show labels but not ticks
- Pie chart.js - show all 3 segment borders
- How to set subscript text in Chart.js axis title
- Chart.js chart in vue.js component does not update
- How to include adapters and plugins with ChartJS
- Adding Image inside Linechart points in ChartJs
- Inverting X axis number labels in chart.js scatter chart
- ChartJS in React throws 'too may re-renders'
- ng2-charts access base chart object
- ChartJS bubble plot categorical y-labels with numbers in string plot issue
- Mixed Diagram (Line/Bar) with two y-Axis won't display data on 2nd Axis
- Chart.js - Toggle visibility of charts
- Chartjs display multiple info with different units in label
- ChartJs - displaying data dynamically from back-end
- How could I implement chartjs-plugin-datalabels in chartjs-node-canvas?
- Chart.js showing time (HH:MM:SS - 24 hour clock) on xAxis
- how to display text information on hover in chart js?
- charts disappear if rendered in hidden divs
- ChartJS only show me data when I zoom-in or zoom-out
- Create a pie chart in chart js with labels
- charts.js show dates 1 year
- White space at start and end of data with time scale in chart.js
- Customizing Chart.js tool tips
- Chart.js line chart does not render data lines on iOS
- Chart.js - each dataset value = different axis