I am having a difficulty with automatic scaling:

As you can see, the chart is "cutting" into the top.
Here is my config:
class BarChartFactory {
create = (id, labels, datasets) => {
return new Chart(document.getElementById(id).getContext("2d"), {
type: "bar",
data: {
labels: labels,
datasets: datasets,
},
plugins: [ChartDataLabels],
options: {
scales: {
y: {
type: "linear",
beginAtZero: true,
scaleLabel: {
display: true,
labelString: "text",
},
},
y2: {
type: "linear",
beginAtZero: true,
position: "right",
scaleLabel: {
display: true,
labelString: "text",
},
gridLines: {
drawOnChartArea: false,
},
},
x: {
type: "time",
ticks: {
source: "labels",
autoSkip: false,
},
adapters: {
date: {
locale: locale,
},
},
},
},
plugins: {
legend: {
position: "bottom",
},
datalabels: {
backgroundColor: function (context) {
let color = context.dataset.backgroundColor;
color = color.replace(/[^,]+(?=\))/, "1");
return color;
},
formatter: function (value, context) {
return value + "%";
},
display: false,
borderRadius: 25,
color: "white",
font: {
weight: "bold",
},
padding: 6,
},
},
},
});
};
}
I am using v3 (3.0.0-beta.10).
I know that I can manually supply either suggestedMax or max values to the scale.
However, I wanted to double check if chart.js offers some other setting or option which I could try?
Ps. I filled this issue as help requested instead of bug, as I am not sure whether this is a bug or a misconfiguration
I am having a difficulty with automatic scaling:
As you can see, the chart is "cutting" into the top.
Here is my config:
I am using v3 (
3.0.0-beta.10).I know that I can manually supply either
suggestedMaxormaxvalues to the scale.However, I wanted to double check if chart.js offers some other setting or option which I could try?
Ps. I filled this issue as help requested instead of bug, as I am not sure whether this is a bug or a misconfiguration