You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well your example does not make any sense 🙈
You are passing a prop named yTicks to your line-chart but you don't define it anywhere. oO
You need to define the prop and then you can pass it to the options.
import{Line}from'vue-chartjs'exportdefaultLine.extend({props: ['chartData','labelname','yTicks'],mounted(){// Overwriting base render method with actual data.this.renderChart(this.chartData,{responsive: true,legend: {// display: false},layout: {padding: 10},scales: {xAxes: [{gridLines: {display: true}}],yAxes: [{gridLines: {display: true},ticks: {min: this.yTicks.min,max: this.yTicks.max,}}]}})}})
Hi there,
it's not really an issue, but a question. How can I enforce the max value on Y axis. Currently I define it as follows
<LineChart :chart-data="data" :yTicks="{min: 0, max: 5}" :height="300" />
However the max Y value changes according to the data.
I reuse LineChart component in several places and want to have a flexibility of defining the max Y value.
The LineChart component looks as follows:
Thanks
The text was updated successfully, but these errors were encountered: