Improve visual information on Chart.js

Asked

Viewed 364 times

0

I am developing a system and I use Chart.js to generate my graphics. However, at the level of usability, it is bad, because it does not show all the information of the columns.

inserir a descrição da imagem aqui

Looking at the above graph it seems to show that there is information only in the Total column. When I click on the total caption to remove the view from that column, it shows me the rest of the information

inserir a descrição da imagem aqui

It’s just that I’d like him to show me the information without having to remove the column, because the information is close and not too far away, there’s some way I can do this?

Demo: Jsfiddle

1 answer

1


Try to add the beginAtZero in the scale configuration on yAxes, where it will make it clear that the scale starts at zero.

 scales: {
    yAxes: [{ 
      ticks: {
              beginAtZero: true
              },
              scaleLabel: {
                  display: true,
              labelString: "Quantidade"
            }
       }],
  • Hi @valdeir-psr could inform me why the -1?

  • Thanks @Alessandra ! It worked!

  • @Alessandra_ And why do you believe it was me, only I have formatted your answer? BTW: It wasn’t me, just fix the formatting.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.