react-chartjs-2
react-chartjs-2 copied to clipboard
Any way to get Multiple Y-axis graph ?
I need a line graph with two Y-axis sharing one X-axis. Do we have feature here ? if yes how we can achieve that ?
Achieved this using below code in "options" prop , hence closing the issue
scales: { xAxes: [{ barPercentage: 0.5, barThickness: 22, maxBarThickness: 38, minBarLength: 18,
ticks: {
beginAtZero: false
}
}]
,
yAxes: [
{
type: 'linear',
display: true,
position: 'left',
id: 'y-axis-1',
labels: {
show: false
},
ticks: {
beginAtZero: true,
}
},
{
type: 'linear',
display: true,
position: 'right',
gridLines: {
display: false
},
id: 'y-axis-2',
labels: {
show: false
},
ticks: {
beginAtZero: true
}
}
]
}