Chart.js: radar chart , smallest point is always used as the base point

Created on 11 Jun 2019  路  5Comments  路  Source: chartjs/Chart.js

I used a radar chart
only one data, But the smallest point is always used as the base point, how to change it to 0 as the base point?

my code, the "2" be regarded as the minimum on the chart...

{
            backgroundColor: "rgba(179,181,198,0.2)",
            borderColor: "rgba(179,181,198,1)",
            pointBackgroundColor: "rgba(179,181,198,1)",
            pointBorderColor: "#fff",
            pointHoverBackgroundColor: "#fff",
            pointHoverBorderColor: "rgba(179,181,198,1)",
            data: [5, 5, 3, 2, 4, 5]

 },

00000

bug

All 5 comments

You can use the ticks.beginAtZero scale option.

How to change the radar ratio from 0.5, 1, 1.5, 2, 2.5, ... 5 to 0, 1, 2, 3, 4, 5

0.5,1,1.5,2,2.5

Chart.defaults.scale.ticks.beginAtZero = true;

Hi @whiteme1210,

How to change the radar ratio from 0.5, 1, 1.5, 2, 2.5, ... 5 to 0, 1, 2, 3, 4, 5

options: {
  scale: {
    ticks: {
      beginAtZero: true,
      stepSize: 1,
    },
  },
},

Closing as resolved

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adriantombu picture adriantombu  路  3Comments

gabrieldesouza picture gabrieldesouza  路  3Comments

bytesnz picture bytesnz  路  3Comments

Woogles picture Woogles  路  3Comments

akashrajkn picture akashrajkn  路  3Comments