Я использую primeng для визуализации диаграммы с angular, но минимальное значение оси Y не работает. Может кто-нибудь сказать мне, что я делаю не так?
barComponent.ts
import { Component, OnInit } from "@angular/core";
@Component({
selector: "app-grafica-bar",
templateUrl: "./grafica-bar.component.html",
styleUrls: ["./grafica-bar.component.css"]
})
export class GraficaBarComponent implements OnInit {
data: any;
options: any;
constructor() {
this.data = {
labels: [
"Enero",
"Febrero",
"Marzo",
"Abril",
"Mayo",
"Junio",
"Julio",
"Agosto",
"Septiembre",
"Octubre",
"Noviembre",
"Diciembre"
],
datasets: [
{
label: 'Descargas',
backgroundColor: ['#16d24a', '#2ece47', '#40cb44', '#5ac640', '#6ac43e', '#75c23c', '#16d24a', '#3fb37b', '#28ad97', '#1aa9a8', '#02a3c3', '#02a3c3'],
data: [65, 59, 80, 81, 56, 10, 55, 65, 59, 80, 81, 56]
}
]
}
this.options = {
scales: {
yAxes: {
ticks: {
beginAtZero: true,
min: 0,
max: 100
}
}
}
}
}
ngOnInit() {};
}
Полученный результат
введите описание изображения здесь
Спасибо всем.