Vue-chartjs: Bar chart, barPercentage in X axis

Created on 9 Jun 2017  ·  2Comments  ·  Source: apertureless/vue-chartjs

How can I modify the width of each bar (in a Bar Chart), I know in chartjs you can modify the barPercentage, but I cannot do it in vue-chartjs. Sorry if my question is stupid, I'am novice.

Environment

  • vue.js version: 2.1.10
  • vue-chart.js version: development
❓ question

Most helpful comment

Hello @xiclopex

well you actually do it the same way as in chart.js simply pass in the options.

// first argument is the data, second argument the options
this.renderChart(data, {
  scales: {
    xAxes: [ {    
       categoryPercentage: 0.9,
       barPercentage: 0.5
    }]
  }
})

All 2 comments

Hello @xiclopex

well you actually do it the same way as in chart.js simply pass in the options.

// first argument is the data, second argument the options
this.renderChart(data, {
  scales: {
    xAxes: [ {    
       categoryPercentage: 0.9,
       barPercentage: 0.5
    }]
  }
})

🔐 Closed due to inactivity.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jcalonso picture jcalonso  ·  4Comments

sylvaincaillot picture sylvaincaillot  ·  3Comments

timster picture timster  ·  5Comments

m-jooibar picture m-jooibar  ·  4Comments

jacobmischka picture jacobmischka  ·  3Comments