When I have some positive data I want to see zero value on values axis:
Use HorizontalBar in this way:
<vue-horizontal-bar-chart :chart-data="ordersChartData" :beginzero="true"></vue-horizontal-bar-chart>
I don't really get the problem.
Why don't you pass just the
ticks: {
beginAtZero: true
},
to your options?
@apertureless sorry, it is my mistake, I just forgot pass the begin zero option like a property of the ticks object and done it in this way:
options: {
responsive: false,
beginAtZero: true
}
and I was confused by result. Thank you for help. Close the issue.
I did something like this,
<bar-chart :chart-data="barData" :height="100" :options="{responsive: false, maintainAspectRatio: false, ticks : {beginAtZero : true}}"></bar-chart>
But it goes for nothing, help me please
I have the same problem. I have tried
:options="{maintainAspectRatio: false, ticks : {beginAtZero : true}}"
and
:options="{maintainAspectRatio: false, beginAtZero : true}"
but the y-axis still starts at the value of the lowest data point. How can I get it to start at zero?
@icangku @AndreaRylander
you have to put it in the y or x axis option
see this post
https://github.com/apertureless/vue-chartjs/issues/272#issuecomment-349903067
@miguel-rod Yes, I tried and it worked, thank you!
Most helpful comment
@icangku @AndreaRylander
you have to put it in the y or x axis option
see this post
https://github.com/apertureless/vue-chartjs/issues/272#issuecomment-349903067