score:20
Accepted answer
you have to add these parameters to your code - enable stacking for x and disable it for y axis:
xaxes: [{ stacked: true }],
yaxes: [{
stacked: false,
ticks: {
beginatzero: true,
},
}]
score:0
scales: {
xaxes: [{
stacked: true
}],
yaxes: [{
stacked: false,
ticks:{
suggestedmax:50,
suggestedmin:1,
beginatzero:true,
max:100,
autoskip:true,
lineheight:2
}
}]
}
score:11
nevermind, i found the answer.
options: {
scales: {
xaxes: [{ stacked: true }],
yaxes: [{
ticks: {
beginatzero:true
},
stacked: false
}]
}
}
you just need to set the xaxes stacked to true and yaxes to false
Source: stackoverflow.com
Related Query
- chart.js stacked graph that overlaps
- How can I create a stacked bar chart with Charts.JS that displays relative rather than absolute values?
- ChartJS: Is this horizontal stacked bar and line graph multiaxis chart even possible?
- How to clear a chart from a canvas so that hover events cannot be triggered?
- Chartjs v2.0: stacked bar chart
- Horizontal stacked bar chart with chart.js
- Vertical stacked bar chart with chart.js
- Chartjs 2 - Stacked bar and unstacked line on same chart with same y axis
- Click event on stacked bar chart - ChartJs
- How to create stacked bar chart using react-chartjs-2?
- chart js tooltip how to control the data that show
- Hide empty bars in Grouped Stacked Bar Chart - chart.js
- How to display inline values in a stacked bar chart with Chart.js?
- Creating a grouped and stacked chart in Chart.js
- Showing Percentage and Total In stacked Bar Chart of chart.js
- How to use 'time' (data from database, data type: timestamp ) for plotting graph in Chart JS
- Stacked horizontal bar chart along total count with chart.js
- Stacked bar chart results in misaligned bars
- Multiple stacked bar chart using ChartJs
- Chart.js: Minimum value for x-axis at horizontal stacked bar chart
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- Create multiple dynamic stacked chart using chart.js in Angular 10?
- Add a custom label to the top or bottom of a stacked bar chart
- ChartJs - Pie Chart - how to remove labels that are on the pie chart
- Stacked bar chart starting from 0 - ChartJS React
- Chartjs (Non Vue) Not Rendering Graph Chart inside V-if/V-show
- In Stacked horizontal bar chart how to remove the vertical line in Chart.js?
- How to remove border from stacked column chart in Chartkick - Chart.js
- Click event of stacked line chart not working
- Stacked bar chart with rounded corner of bar using Chart.js
More Query from same tag
- Change dot size individually Scatter Chart -- ChartJS
- How do I create a chartjs bar chart?
- Scatter plot not showing anything chartjs needs some debugging
- JS import updated JSON file for use with ChartJS
- Chart JS: Donut/Doughnut Chart: Tooltip to be shown always for all the data. All tooltip is not shown when multiple data are with 0 data
- React with chart js, labelling problems in multiple datasets for doughnut chart
- Animating outerRadius and innerRadius
- SCRIPT438: Object doesn't support property or method 'values'
- Chartjs with zoom plugin zooms too much with wheel just with single turn
- How to add new x axis in chart JS?
- How to show labels above pie chart in chart.js
- In chart.js, how to know if a yAxes tick is bumping/rendering over/into another
- How could I implement chartjs-plugin-datalabels in chartjs-node-canvas?
- Getting the HTML code of a chart created by chart.js
- Colors not showing up on charts in ionic 3
- show label inside the chart - angular.js and chart.js
- Draw vertical and horizonal lines on the radar chart (like x-y axes)
- How to update data from ajax call (chart.js)
- ChartJS Label Names Not Showing, Just ID
- Make chartjs re-render once
- Why won't this html page run, Devexpress documentation ChartJS
- Chart js show levels on top. (Bar chart with Stacked group)
- Put tooltip on the middle of two bars
- Chart.js Multiple charts with one common legend
- How to use two Y axes in Chart.js v2?
- JS node chart from SQL Server not updated
- Angular 2 ng2-charts doughnut text in the middle?
- How to plot chart from external JSON and format X-AXIS to show time using Chart.JS?
- Chartjs: How to offset ticks on radarchart?
- angular Chart data-pushing from another javascript