Ich versuche ein Balkendiagramm mit Chartjs zu erstellen, in dem zwischen benachbarten Gittern kein Platz sein sollte. Das Problem, das ich habe ist, dass ich nicht an den Grenzen zwischen den Balken loszuwerden tun: Bars with bordersChartjs Balkendiagramm ohne Grenzen
Das ist meine config:
new Chart($('#weekly-availabilities-chart'), {
type: 'bar',
data: {
labels: ...,
datasets: [
{
backgroundColor: 'rgba(153, 193, 72, 0.4)',
label: 'label a',
borderWidth: 0,
data: dataset_1
}, {
backgroundColor: 'rgba(13, 39, 73, 0.4)',
label: 'label b',
borderWidth: 0,
data: dataset_2
}
]
},
options: {
scales: {
xAxes: [
{
barPercentage: 1,
categoryPercentage: 1,
gridLines: {
display: false
}
}
],
yAxes: [
{
stacked: true,
gridLines: {
color: 'rgba(0,0,0,0.05)'
},
ticks: {
beginAtZero: true,
max: 40
}
}
]
}
}
});
Kontrolle dieses https://jsfiddle.net/07pzys9t/2/ –