%%'' に入れてコンテナをリサイズする🤔\\
''options'' の ''maintainAspectRatio'' はデフォルトで ''true'' だが、これをキャンバスの縦横比を維持しないように ''false'' に設定する🤔\\
''maintainAspectRatio'': サイズ変更時に元のキャンバスの縦横比 (width/height) を維持します。\\
''aspectRatio'': キャンバスの縦横比 (width/height)。チャートの種類によりデフォルト 1 または 2。\\
**HTML**\\
**js**\\
const config = {
options: {
maintainAspectRatio: false,
}
}
**css**\\
.chart-container {
position: relative;
width: 200px;
height: 400px
}
===== ハーフドーナツ グラフ =====
===== 参考文献 =====
[[https://laracasts.com/discuss/channels/general-discussion/chartjs-and-half-donuts|ChartJS and "half donuts"]]\\
==== 付録 ====
[[tw>tomoyan596sp/status/1579264862232137729|簡単なべろ👅べろ👅ば〜😋グラフ🤤]]\\
[[tw>tomoyan596sp/status/1590550329388830720|これはバームクーヘン?🤔ハーフドーナツ🤤サンプル追加しておきました😊]]\\