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


Related Query

More Query from same tag