ChartJS radar chart start from 0 Angular cli

55 Views Asked by At

I'm using chartJS in Angular. My problem is that when all data is set to 0, the chart reach the 2nd tick instead of being just a dot in the center: chart with all 0

When I have other data and only some are 0 then it shows correct

adding the relevant code:

data: {
                labels: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']
                datasets: [
                    {
                        label: '',
                        data:[0, 0, 0, 0, 0, 0, 0, 0],
                        backgroundColor: 'rgba(0,105,0, 0.2)',
                        borderColor: 'green',
                        pointBackgroundColor: '#green',
                        pointBorderColor: '#fff',
                        pointHoverBackgroundColor: '#fff',
                        pointHoverBorderColor: 'green',
                    },
                ],
            },
                options: {
scales: {
                        r: {
                            ticks: {
                                display: false,
                            },
                            pointLabels: {
                                padding: 13,
                            },
                            suggestedMin: 0,
                            suggestedMax: 0,
                        },
                    },
    plugins: {
                        legend: {
                            display: false,
                        },
                        datalabels: {
                            align: 'end',
                            display: true,
                            offset: 1,
                        },
                    },
}
0

There are 0 best solutions below