Decrease columns Chartjs Bar Chart

Asked

Viewed 1,010 times

1

Does anyone know how I can work with the size and width of the blue columns within the Chartjs Bar Chart chart? Following image example. inserir a descrição da imagem aqui

I’d like to keep the columns thinner and farther apart from each other.....

  • gives a look here at the documentation of the configuration itself http://www.chartjs.org/docs/#bar-Chart-Chart-options, if you do not have a look at the general configuration http://www.chartjs.org/docs/#Getting-Started-global-Chart-Configuration

  • I couldn’t find anything similar in the documentation.. But thanks for now. If anyone has any more ideas, I’m grateful

1 answer

1


What I might have found in the documentation was the xAxes option.

options: {
    scales: {
        xAxes: [{
          categoryPercentage: 0.9,
          barPercentage: 0.7
      }],
      ...
    }

as can be seen in this example https://jsfiddle.net/smw9949v/1/ changing the values between 0 - 1.

I hope it helps what you need.

  • It seems to work well, however, in my chart is not occurring successfully. I will give another searched, thank you

  • qq thing take a look at this http://jsfiddle.net/beehe4eg/ , I don’t know if it has to do with version, but in this case it uses categorySpacing

Browser other questions tagged

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