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
- Mixed Chart calculating difference between two bars - ChartJS
- How to make lines in line charts from ng2-charts straight lines?
- Class declaration merging for an existing type
- Bar charts not getting displayed correctly when bar is below zero (chart.js)
- Remove padding from chartJs horizontal bar chart
- Chart.js 3.x migration problem – thin white border / padding appears around chart on first load
- Setting Chart.js Pie-Graph Options
- Chart.js 2 - label overlapping
- Chart.js - How to remove percentage data labels?
- Importing data from Model into a View gives me an error I cannot solve
- Set backgroundColor of bar-char (chart.js)
- Create space between legend and chart in charts.js
- Show statistics in my diagram (php mysqli)
- Specify varying thickness of each bar in Chart.js bar chart
- Chart.js: grid lines only on dataset points
- How to use ChartJS object in a click event handler?
- Doughnut chart, in some cases if quantity is 1, its showing without back ground color, but color shows correctly while hovering
- Binding Chart to Canvas height width
- I want to multiply chart data according as array length
- change axis scale to be round numbers instead of decimal - chart.js
- Ability to rotate y axis title in chart.js
- Change ChartJs axis title dynamically
- Plotting JSON data onto a chart using Chart.js
- How to limit chart JS hover to take only one value from each line chart when zoomed out?
- Chart.js plugin datalabels - formatter- Add space between thousands
- Chart.js: colouring tooltip labels
- My pie chart (chartJs) does not appear
- How do I create stacked chart with Chart.js version 2.0.0-beta
- Add Time Scaling to linechart (Chart.js)
- Multiple data sets not working when using ChartJS