[英]react-chartjs-2 how to show legend text on the left with vertical text
我只想将图表图例右对齐,文本将垂直显示。 目标:在此处输入图片描述
我试过使用: position: left enter image description here图例已经向左移动。 但我不知道如何垂直对齐文本enter image description here
例如:在此处输入图片描述
我的意思是,您想在图表左侧显示标题。 在您的输出中,我期望:
const commonOptions: {
maintainAspectRatio: false,
interaction: {
intersect: false,
},
responsive: true,
plugins: {
legend: {
position: 'right',
},
title: {
display: true,
align: 'center',
text: 'Study Count',
position: 'left'
}
}
},
尝试:
https://www.chartjs.org/docs/latest/samples/bar/vertical.html
祝你好运
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.