I have a vertical chart that I want to rotate horizontally. Unfortunately, there are no maxRotation and minRotation parameters for the yAxes, so I'm unsure of how to achieve this rotation.
Although I found a similar question, I struggled to implement the provided answer in my code.
One user suggested using the following:
rotation = isLeft ? -0.5 * Math.PI : 0.5 * Math.PI
However, I am uncertain about where exactly to place this piece of code. Can you provide guidance?
Below are the options for my chart:
options = {
scales: {
yAxes: [
{
ticks: {
callback: function (value) {
return numberFormatChanger(value);
},
},
scaleLabel: {
display: true,
labelString: 'My label',
}
}
]
},
legend: {
display: true,
},
tooltips: {
callbacks: {
label: function (tooltipItem, data) {
return data.datasets[tooltipItem.datasetIndex].label + ': ' + numberFormatChanger(tooltipItem.yLabel);
}
}
}
};