let chart = new Chart(ctx, {
type: 'bar',
options: {
legend: {
display: false,
labels: {
display: false
}
},
tooltips: {
mode: 'index',
axis: 'x',
},
layout: {
padding: {
left: 0,
right: 0,
top: 0,
bottom: 0
}
},
scales: {
xAxes:[{
ticks: {
beginAtZero: true,
min: 0,
stepSize: 1
},
maxBarThickness: 10,
gridLines:{
drawBorder: false,
display:false
},
}],
yAxes: [{
id: 'data',
type: 'linear',
position: 'left',
gridLines:{
drawBorder: false,
display:false
},
}, {
gridLines:{
drawBorder: false,
display:false
},
id: 'ctr',
type: 'linear',
position: 'left',
ticks: {
max: 1,
min: 0
}
}]
}
}
});