score:1
Accepted answer
You don't need to specify yAxis to datasets(It'll be good way what you have done if you have 2 datasets only), it will be there anyway,you are adding data to yAxis in case that you are creating vertical chart, it's only overwriting your data in this case. Remove yAxisID: 'yAxis1'
and yAxisID: 'yAxis2'
from datasets. It'll work.
What you need is:
ticks: {
max: 80,
min: 0
}
Add this to your yAxis conf, it'will look like:
scales: {
yAxes: [
{
id: 'yAxis1',
position: 'left',
ticks: {
max: 80,
min: 0
}
},
{
id: 'yAxis2',
position: 'right',
ticks: {
max: 80,
min: 0
}
}
]
}
Source: stackoverflow.com
Related Query
- Some bars of the bar graph are disappearing from Chart.js
- Chart.js Bar Chart - how to chart bars from 0
- ChartJs bar chart - keep bars left instead of equally spread across the width
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- How to make bar chart animation where all bars grow at the same speed?
- Lift the bar up from the bottom in bar type chart
- I am using chartjs node canvas to render a chart however the graph options are being ignored
- Display Bar chart values in the graph - ChartJS
- Alternating bars in bar chart in chart.js are not labelled
- Can the colors of bars in a bar chart be varied based on their value?
- Issue with chartjs linear gradient for the mixed bar chart in ReactJS is not calculated for each individual Bars
- Sorting the Bars in Chart.JS Bar Graph
- ChartJS line chart or bar graph from a Java program
- How to prevent empty bars from taking up width in Chart.js bar chart
- How to remove the extra Y axis from a bar chart in chart.js
- Chart.js radar chart ticks are hidden behind the graph
- Bar chart from Chart.js not showing the second dataset
- How can I reduce the spacing between my legend and chart proper in my Chart.JS bar chart, and increase it in the graph area?
- Bar chart (chart.js) with only 2 points does not show one of the bars
- How can I remove the white border from Chart.js pie chart when all legends are hidden?
- ChartJS - would like to create a mixed chart with horizontal Bar and a dot to represent the answer from the current user
- Chart js legend are being cut off if the bar height is equal to port height - chart js
- Chart.js Change color of the values *inside* the bars of a Bar chart
- Chart.js stacked bar chart text on top of the stacked bars
- how to highlight the bars in stacked bar chart of chart.js on clicking a legend
- How to keep side bars in Chartjs bar graph from clipping?
- Accessing data from the callback function of a bar chart using chart js
- Chart JS horizontal bar chart width of bars and the chart
- Combo bar chart graph line gets obscured by bars
- How can i get the Chart JS Bar Graph Bar Label and Value on click?
More Query from same tag
- ChartJS: unwanted top/bottom padding when legend is aligned right
- how to change Y axis value dynamically based on user input in Chartjs for Line chart?
- Redraw the old donut and create a new one by clicking on each color Chart.js
- How to toggle between Custom tooltip and normal tooltip in chartjs and angular
- Using lodash to prepare data for "last day user registration" chart
- ChartJs - annotation line can not drawn
- ChartJS Horizontal Bar is displaying backwards
- How to draw one line with different colors in chartjs2?
- Angular 6 with chart.js TypeError: item is null
- How to create chart from a dict?
- How to use log scale with Chart Kick?
- "this" doesn't work in click event handler
- ChartJS: Draw line between two data points on hover
- Creating charts (charts.js) values coming from SQLite database using AngularJS
- Updating chart.js with a dataset of different size not working
- Map through datasets in chartjs
- Using JSON in Chart.js with Angular.js
- Chart.js pie chart not showing
- chartJS label on each side of the chart
- I would like to show a line bar in chart.js with data automatically fetched from mockapi
- ng2-charts access base chart object
- How to update JS variable in value field of charts.js?
- ChartJs pie legend position
- Javascript: Showing bedtimes in Chart.js
- ChartJs. How to stretch up line graph to the edges?
- Tick - no negative
- How display straight corner in chartjs
- AngularJS/ChartJS: Get the current series
- How to rotate custom marker in chart.js?
- ChartJs different data for Tooltips