2
Chart.jsを使用して、同じオプションオブジェクトを使用しているデータ量が異なる2つの横棒グラフがあります。棒グラフ間のマージンに関して、下(「場所」)チャートを上(「色」)のように見せる方法はありますか?Chart.jsの2つの異なる棒グラフの棒間の間隔を保持する方法2
私のオプションのオブジェクトは次のようになります、私は困惑しています:
options={{
elements: {
rectangle: {
borderSkipped: 'left',
},
},
onClick: this.chartLink,
animation: false,
legend: {
display: false,
},
tooltips: {
enabled: false,
},
maintainAspectRatio: true,
scales: {
xAxes: [{
gridLines: {
display: false,
drawBorder: false,
},
ticks: {
beginAtZero: true,
display: false,
},
}],
yAxes: [{
tabIndex: 0,
maxBarThickness: 100,
categoryPercentage: 1.0,
barPercentage: 1.0,
barThickness: 20,
gridLines: {
display: false,
drawBorder: false,
},
ticks: {
fontColor: 'black',
fontStyle: 'normal',
maxTicksLimit: 5,
paddingLeft: 20,
mirror: true,
},
}],
},
を動作するように、このため
maintainAspectRatio: false
を設定するために必要なこれが欠けていました。ありがとうございました。私はそれを可能にするとすぐに賞金を授与します。 – TheNovice