{"id":11928,"date":"2026-05-11T15:51:32","date_gmt":"2026-05-11T06:51:32","guid":{"rendered":"https:\/\/code-plus.jp\/gp\/?p=11928"},"modified":"2026-05-11T15:53:16","modified_gmt":"2026-05-11T06:53:16","slug":"chart-js-11928","status":"publish","type":"post","link":"https:\/\/code-plus.jp\/gp\/chart-js-11928\/","title":{"rendered":"Chart.js\u3067\u7a4d\u307f\u4e0a\u3052\u68d2\u30b0\u30e9\u30d5\u3092\u4f5c\u308b\u304b\u3093\u305f\u3093\u306a\u4f7f\u3044\u65b9\u3010\u30b3\u30d4\u30daOK\u3011"},"content":{"rendered":"<!-- title: Chart.js\u3067\u7a4d\u307f\u4e0a\u3052\u68d2\u30b0\u30e9\u30d5\u3092\u4f5c\u308b\u304b\u3093\u305f\u3093\u306a\u4f7f\u3044\u65b9\u3010\u30b3\u30d4\u30daOK\u3011\r\ndescription: Chart.js\u3092\u4f7f\u3063\u3066\u7a4d\u307f\u4e0a\u3052\u68d2\u30b0\u30e9\u30d5\u3092\u3059\u3050\u4f5c\u308c\u308b\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\u3002CDN\u306e\u8aad\u307f\u8fbc\u307f\u304b\u3089\u3001\u68d2\u306e\u8272\u30fb\u5e45\u30fb\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u306a\u3069\u3088\u304f\u4f7f\u3046\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u307e\u3067\u3001\u624b\u3063\u53d6\u308a\u65e9\u304f\u5b9f\u88c5\u3057\u305f\u3044\u4eba\u5411\u3051\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002\r\n\u30bf\u30b0: Chart.js, \u68d2\u30b0\u30e9\u30d5, \u7a4d\u307f\u4e0a\u3052\u68d2\u30b0\u30e9\u30d5, JavaScript, \u30b0\u30e9\u30d5\u4f5c\u6210, CDN, chart.umd.js, barPercentage, categoryPercentage, \u6298\u308c\u7dda\u30b0\u30e9\u30d5\u6df7\u5408 -->\r\n\r\n<h2 class=\"fz-xl\">Chart.js\u3068\u306f<\/h2>\r\n<p>Chart.js\u306f\u3001HTML\u306e <code>&lt;canvas&gt;<\/code> \u8981\u7d20\u3092\u4f7f\u3063\u3066\u30b0\u30e9\u30d5\u3092\u63cf\u753b\u3059\u308bJavaScript\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/p>\r\n<p>Canvas\u30d9\u30fc\u30b9\u306a\u306e\u3067<b class=\"bold\">\u8efd\u91cf\u304b\u3064\u9ad8\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9<\/b>\u3067\u3001\u68d2\u30b0\u30e9\u30d5\u30fb\u6298\u308c\u7dda\u30fb\u5186\u30b0\u30e9\u30d5\u306a\u30698\u7a2e\u985e\u306e\u30b0\u30e9\u30d5\u3092\u624b\u8efd\u306b\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002MIT\u30e9\u30a4\u30bb\u30f3\u30b9\u3067\u5546\u7528\u5229\u7528\u3082\u7121\u6599\u3067\u3059\u3002<\/p>\r\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f<b class=\"bold\">\u7a4d\u307f\u4e0a\u3052\u68d2\u30b0\u30e9\u30d5\uff08\uff0b\u6298\u308c\u7dda\u306e\u6df7\u5408\u30b0\u30e9\u30d5\uff09<\/b>\u306b\u7d5e\u3063\u3066\u3001\u3059\u3050\u4f7f\u3048\u308b\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\r\n\r\n<!-- \u2605\u76ee\u6b21\u30ea\u30b9\u30c8 -->\r\n<ul class=\"tocList mt-1r\" data-toc-id=\"js-tocBWGD\"><\/ul>\r\n<ins class=\"tocBtn is-fixed\" data-toc-id=\"js-tocBWGD\"><\/ins>\r\n<!-- \u76ee\u6b21\uff1aJS -->\r\n<script src=\"https:\/\/code-plus.jp\/cdn\/js\/_gimmicks\/inppend-tocList.js\"><\/script>\r\n<script src=\"https:\/\/code-plus.jp\/cdn\/js\/_gimmicks\/inppend-tocBtn.js\"><\/script>\r\n\r\n\r\n\r\n\r\n<h2 class=\"fz-xl\">CDN\u3067\u8aad\u307f\u8fbc\u3080<\/h2>\r\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e0d\u8981\u3067\u3001HTML\u306b1\u884c\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067\u4f7f\u3048\u307e\u3059\u3002<\/p>\r\n<pre><code class=\"language-html\">&lt;script src=&quot;https:\/\/cdn.jsdelivr.net\/npm\/chart.js&quot;&gt;&lt;\/script&gt;\r\n<\/code><\/pre>\r\n<p><code>chart.js<\/code> \u3092\u8aad\u307f\u8fbc\u3080\u3068 <code>window.Chart<\/code> \u3068\u3057\u3066\u30b0\u30ed\u30fc\u30d0\u30eb\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u30d5\u30c3\u30bf\u30fc\u3067\u8aad\u307f\u8fbc\u3080\u5834\u5408\u306f <code>foot.php<\/code> \u306a\u3069\u306b\u8ffd\u8a18\u3059\u308b\u3060\u3051\u3067OK\u3067\u3059\u3002<\/p>\r\n<blockquote>\r\n<p><b class=\"bold\">\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u56fa\u5b9a\u3057\u305f\u3044\u5834\u5408<\/b>\u306f <code>https:\/\/cdn.jsdelivr.net\/npm\/chart.js@4.4.1\/dist\/chart.umd.js<\/code> \u306e\u3088\u3046\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u672c\u756a\u30b5\u30a4\u30c8\u3067\u306f\u4e88\u671f\u3057\u306a\u3044\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u907f\u3051\u308b\u305f\u3081\u30d0\u30fc\u30b8\u30e7\u30f3\u56fa\u5b9a\u304c\u5b89\u5fc3\u3067\u3059\u3002<\/p>\r\n<\/blockquote>\r\n<h2 class=\"fz-xl\">\u57fa\u672c\u306e\u69cb\u9020<\/h2>\r\n<p>\u30b0\u30e9\u30d5\u3092\u8868\u793a\u3059\u308b\u306b\u306f <code>&lt;canvas&gt;<\/code> \u8981\u7d20\u3068 <code>new Chart()<\/code> \u306e2\u3064\u3060\u3051\u5fc5\u8981\u3067\u3059\u3002<\/p>\r\n<pre><code class=\"language-html\">&lt;div style=&quot;position:relative; width:100%; height:340px;&quot;&gt;\r\n  &lt;canvas id=&quot;myChart&quot;&gt;&lt;\/canvas&gt;\r\n&lt;\/div&gt;\r\n\r\n&lt;script&gt;\r\nnew Chart(document.getElementById(&#39;myChart&#39;), {\r\n  type: &#39;bar&#39;,       \/\/ \u30b0\u30e9\u30d5\u306e\u7a2e\u985e\r\n  data: { ... },     \/\/ \u30c7\u30fc\u30bf\r\n  options: { ... }   \/\/ \u30aa\u30d7\u30b7\u30e7\u30f3\r\n});\r\n&lt;\/script&gt;\r\n<\/code><\/pre>\r\n<p><code>&lt;canvas&gt;<\/code> \u3092 <code>&lt;div&gt;<\/code> \u3067\u56f2\u3093\u3067\u9ad8\u3055\u3092\u6307\u5b9a\u3059\u308b\u306e\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002<code>&lt;canvas&gt;<\/code> \u81ea\u4f53\u306bCSS\u3067\u9ad8\u3055\u3092\u6307\u5b9a\u3059\u308b\u3068\u5d29\u308c\u308b\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001<b class=\"bold\">\u30e9\u30c3\u30d1\u30fc\u5074\u3067\u9ad8\u3055\u3092\u7ba1\u7406<\/b>\u3057\u307e\u3059\u3002<\/p>\r\n<h2 class=\"fz-xl\">\u7a4d\u307f\u4e0a\u3052\u68d2\u30b0\u30e9\u30d5\u306e\u30b3\u30fc\u30c9<\/h2>\r\n<p>\u4ee5\u4e0b\u306f\u300c\u81ea\u793e\u5546\u54c1\u58f2\u4e0a\u300d\u3068\u300c\u30de\u30fc\u30b1\u30c3\u30c8\u30d7\u30ec\u30a4\u30b9\u58f2\u4e0a\u300d\u3092\u7a4d\u307f\u4e0a\u3052\u3001\u300c\u55b6\u696d\u5229\u76ca\u300d\u3092\u6298\u308c\u7dda\uff08\u53f3\u8ef8\uff09\u3067\u91cd\u306d\u305f\u30b5\u30f3\u30d7\u30eb\u3067\u3059\u3002<\/p>\r\n\r\n<picture class=\"bd-bounds\"><img decoding=\"async\" src=\"https:\/\/code-plus.jp\/gp\/wp-content\/uploads\/SS-20260511-154144.png?ver=20260511155316\" alt=\"\" width=\"821\" height=\"388\" class=\"alignnone size-full wp-image-11931\" \/><\/picture>\r\n\r\n<pre><code class=\"language-html\">&lt;figure class=&quot;chart-wrapper&quot;&gt;\r\n  &lt;!-- \u51e1\u4f8b\uff08HTML\u3067\u81ea\u4f5c\uff09 --&gt;\r\n  &lt;figcaption class=&quot;chart-caption fz-xs c-text-500&quot;&gt;\r\n    &lt;span&gt;&lt;i style=&quot;color:#005B92;&quot;&gt;\u25a0&lt;\/i&gt;&amp;nbsp;\u81ea\u793e\u5546\u54c1\u58f2\u4e0a&lt;\/span&gt;\r\n    &lt;span&gt;&lt;i style=&quot;color:#80A5C2;&quot;&gt;\u25a0&lt;\/i&gt;&amp;nbsp;\u30de\u30fc\u30b1\u30c3\u30c8\u30d7\u30ec\u30a4\u30b9\u58f2\u4e0a&lt;\/span&gt;\r\n    &lt;span&gt;&lt;i style=&quot;color:#D4963A;&quot;&gt;\u25cf&lt;\/i&gt;&amp;nbsp;\u55b6\u696d\u5229\u76ca\uff08\u6298\u308c\u7dda\u30fb\u53f3\u8ef8\uff09&lt;\/span&gt;\r\n  &lt;\/figcaption&gt;\r\n\r\n  &lt;!-- \u30b0\u30e9\u30d5\u672c\u4f53 --&gt;\r\n  &lt;div class=&quot;chart-content mt-1r&quot; style=&quot;position:relative; width:100%; height:340px;&quot;&gt;\r\n    &lt;canvas id=&quot;ecChart&quot;&gt;&lt;\/canvas&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/figure&gt;&lt;!-- \/\/\/.chart --&gt;\r\n\r\n&lt;script&gt;\r\nnew Chart(document.getElementById(&#39;ecChart&#39;), {\r\n  data: {\r\n    labels: &lsqb;&#39;2020\u5e74&#39;, &#39;2021\u5e74&#39;, &#39;2022\u5e74&#39;, &#39;2023\u5e74&#39;, &#39;2024\u5e74&#39;&rsqb;,\r\n    datasets: &lsqb;\r\n      {\r\n        type: &#39;bar&#39;,\r\n        label: &#39;\u81ea\u793e\u5546\u54c1\u58f2\u4e0a&#39;,\r\n        data: &lsqb;1820, 1950, 2100, 2280, 2410&rsqb;,\r\n        backgroundColor: &#39;#005B92&#39;,\r\n        stack: &#39;sales&#39;,          \/\/ \u2190 \u540c\u3058\u540d\u524d\u3067\u7a4d\u307f\u4e0a\u304c\u308b\r\n        yAxisID: &#39;y&#39;,\r\n        order: 2,\r\n        barPercentage: 0.5,\r\n        categoryPercentage: 0.6\r\n      },\r\n      {\r\n        type: &#39;bar&#39;,\r\n        label: &#39;\u30de\u30fc\u30b1\u30c3\u30c8\u30d7\u30ec\u30a4\u30b9\u58f2\u4e0a&#39;,\r\n        data: &lsqb;2050, 2340, 2980, 3640, 4820&rsqb;,\r\n        backgroundColor: &#39;#80A5C2&#39;,\r\n        stack: &#39;sales&#39;,          \/\/ \u2190 \u540c\u3058\u540d\u524d\u3067\u7a4d\u307f\u4e0a\u304c\u308b\r\n        yAxisID: &#39;y&#39;,\r\n        order: 2,\r\n        barPercentage: 0.5,\r\n        categoryPercentage: 0.6\r\n      },\r\n      {\r\n        type: &#39;line&#39;,\r\n        label: &#39;\u55b6\u696d\u5229\u76ca&#39;,\r\n        data: &lsqb;350, 390, 510, 580, 650&rsqb;,\r\n        borderColor: &#39;#D4963A&#39;,\r\n        backgroundColor: &#39;#D4963A&#39;,\r\n        pointRadius: 5,\r\n        borderDash: &lsqb;5, 3&rsqb;,      \/\/ \u7834\u7dda\r\n        yAxisID: &#39;y2&#39;,           \/\/ \u53f3\u8ef8\u306b\u7d10\u4ed8\u3051\u308b\r\n        order: 1\r\n      }\r\n    &rsqb;\r\n  },\r\n  options: {\r\n    responsive: true,\r\n    maintainAspectRatio: false,\r\n    interaction: {\r\n      mode: &#39;index&#39;,             \/\/ \u2190 \u540c\u3058X\u4f4d\u7f6e\u306e\u5168\u7cfb\u5217\u3092\u307e\u3068\u3081\u3066\u8868\u793a\r\n      intersect: false\r\n    },\r\n    plugins: {\r\n      legend: { display: false } \/\/ \u2190 \u30c7\u30d5\u30a9\u30eb\u30c8\u51e1\u4f8b\u3092\u975e\u8868\u793a\r\n    },\r\n    scales: {\r\n      y: {\r\n        stacked: true,           \/\/ \u2190 \u3053\u308c\u304c\u306a\u3044\u3068\u7a4d\u307f\u4e0a\u304c\u3089\u306a\u3044\r\n        position: &#39;left&#39;,\r\n        min: 0,\r\n        max: 8000,\r\n        ticks: {\r\n          callback: v =&gt; v.toLocaleString() + &#39;\u4e07&#39;\r\n        }\r\n      },\r\n      y2: {\r\n        position: &#39;right&#39;,\r\n        min: 0,\r\n        max: 1000,\r\n        ticks: {\r\n          callback: v =&gt; v.toLocaleString() + &#39;\u4e07&#39;\r\n        },\r\n        grid: {\r\n          drawOnChartArea: false \/\/ \u2190 \u5de6\u8ef8\u30b0\u30ea\u30c3\u30c9\u3068\u91cd\u8907\u3055\u305b\u306a\u3044\r\n        }\r\n      }\r\n    }\r\n  }\r\n});\r\n&lt;\/script&gt;\r\n<\/code><\/pre>\r\n<h2 class=\"fz-xl\">\u3088\u304f\u4f7f\u3046\u30ab\u30b9\u30bf\u30de\u30a4\u30ba<\/h2>\r\n<h3 class=\"fz-ml\">\u7a4d\u307f\u4e0a\u3052\u306b\u5fc5\u8981\u306a2\u3064\u306e\u30bb\u30c3\u30c8<\/h3>\r\n<p>\u7a4d\u307f\u4e0a\u3052\u68d2\u30b0\u30e9\u30d5\u3067\u5fd8\u308c\u304c\u3061\u306a\u306e\u304c\u3001<code>stack<\/code> \u3068 <code>stacked<\/code> \u306e<b class=\"bold\">\u4e21\u65b9\u306e\u6307\u5b9a<\/b>\u3067\u3059\u3002\u7247\u65b9\u3060\u3051\u3067\u306f\u6b63\u3057\u304f\u7a4d\u307f\u4e0a\u304c\u308a\u307e\u305b\u3093\u3002<\/p>\r\n<pre><code class=\"language-javascript\">\/\/ datasets\u306e\u5404bar\u306b\u6307\u5b9a\r\nstack: &#39;sales&#39;\r\n\r\n\/\/ options\u306escales.y\u306b\u6307\u5b9a\r\ny: { stacked: true }\r\n<\/code><\/pre>\r\n<h3 class=\"fz-ml\">\u68d2\u306e\u5e45\u3092\u8abf\u6574\u3059\u308b<\/h3>\r\n<p><code>barPercentage<\/code> \u3068 <code>categoryPercentage<\/code> \u306e2\u3064\u3092<b class=\"bold\">\u5168bar\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u540c\u3058\u5024<\/b>\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\r\n<pre><code class=\"language-javascript\">barPercentage: 0.5,      \/\/ \u30ab\u30c6\u30b4\u30ea\u5185\u306e\u68d2\u306e\u5e45\uff080\u301c1\uff09\r\ncategoryPercentage: 0.6  \/\/ \u30ab\u30c6\u30b4\u30ea\u5168\u4f53\u306b\u5bfe\u3059\u308b\u5360\u6709\u7387\uff080\u301c1\uff09\r\n<\/code><\/pre>\r\n<table class=\"table my-0.5r\">\r\n  <thead>\r\n  <tr class=\"rung\">\r\n    <th>barPercentage<\/th>\r\n    <td>categoryPercentage<\/td>\r\n    <td>\u898b\u305f\u76ee<\/td>\r\n  <\/tr>\r\n<\/thead><tbody>\r\n<tr class=\"rung\">\r\n  <th>0.8<\/th>\r\n  <td>0.8<\/td>\r\n  <td>\u30c7\u30d5\u30a9\u30eb\u30c8\uff08\u592a\u3081\uff09<\/td>\r\n<\/tr><tr class=\"rung\">\r\n<th>0.5<\/th>\r\n<td>0.6<\/td>\r\n<td>\u4e2d\u7d30<\/td>\r\n<\/tr><tr class=\"rung\">\r\n<th>0.3<\/th>\r\n<td>0.5<\/td>\r\n<td>\u7d30\u3081<\/td>\r\n<\/tr>\r\n<\/tbody><\/table>\r\n<p>\u3069\u3061\u3089\u304b\u4e00\u65b9\u3060\u3051\u5909\u3048\u3066\u3082\u52b9\u679c\u304c\u8584\u3044\u306e\u3067\u30012\u3064\u30bb\u30c3\u30c8\u3067\u8abf\u6574\u3057\u307e\u3059\u3002<\/p>\r\n<h3 class=\"fz-ml\">\u8ef8\u306b\u5358\u4f4d\u3092\u4ed8\u3051\u308b<\/h3>\r\n<p><code>ticks.callback<\/code> \u3067\u8ef8\u30e9\u30d9\u30eb\u306b\u5358\u4f4d\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\r\n<pre><code class=\"language-javascript\">ticks: {\r\n  callback: value =&gt; value.toLocaleString() + &#39;\u4e07&#39;\r\n}\r\n<\/code><\/pre>\r\n<p><code>toLocaleString()<\/code> \u3092\u4f7f\u3046\u3068\u3001<code>2000<\/code> \u2192 <code>2,000\u4e07<\/code> \u306e\u3088\u3046\u306b\u30ab\u30f3\u30de\u533a\u5207\u308a\u306b\u3082\u306a\u3063\u3066\u898b\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\r\n<h3 class=\"fz-ml\">\u53f3\u8ef8\u306e\u30b0\u30ea\u30c3\u30c9\u7dda\u3092\u975e\u8868\u793a\u306b\u3059\u308b<\/h3>\r\n<p>\u53f3\u8ef8\u3092\u8ffd\u52a0\u3059\u308b\u3068\u5de6\u8ef8\u3068\u4e8c\u91cd\u306b\u30b0\u30ea\u30c3\u30c9\u7dda\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<code>drawOnChartArea: false<\/code> \u3067\u53f3\u8ef8\u5074\u306e\u30b0\u30ea\u30c3\u30c9\u3092\u975e\u8868\u793a\u306b\u3057\u307e\u3059\u3002<\/p>\r\n<pre><code class=\"language-javascript\">y2: {\r\n  position: &#39;right&#39;,\r\n  grid: {\r\n    drawOnChartArea: false\r\n  }\r\n}\r\n<\/code><\/pre>\r\n<h3 class=\"fz-ml\">\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b<\/h3>\r\n<p><code>interaction.mode: &#39;index&#39;<\/code> \u306b\u3059\u308b\u3068\u3001\u30db\u30d0\u30fc\u6642\u306b\u540c\u3058X\u4f4d\u7f6e\u306e\u5168\u7cfb\u5217\u3092\u307e\u3068\u3081\u3066\u8868\u793a\u3067\u304d\u307e\u3059\u3002<\/p>\r\n<pre><code class=\"language-javascript\">interaction: {\r\n  mode: &#39;index&#39;,\r\n  intersect: false\r\n},\r\nplugins: {\r\n  tooltip: {\r\n    callbacks: {\r\n      label: ctx =&gt; `${ctx.dataset.label}: ${ctx.parsed.y.toLocaleString()}\u4e07\u5186`\r\n    }\r\n  }\r\n}\r\n<\/code><\/pre>\r\n<h3 class=\"fz-ml\">\u30c7\u30d5\u30a9\u30eb\u30c8\u51e1\u4f8b\u3092\u975e\u8868\u793a\u306b\u3059\u308b<\/h3>\r\n<p>Chart.js\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u51e1\u4f8b\u306f\u4e38\u30a2\u30a4\u30b3\u30f3\u3067\u898b\u305f\u76ee\u304c\u3044\u307e\u3044\u3061\u3067\u3059\u3002<code>legend.display: false<\/code> \u3067\u975e\u8868\u793a\u306b\u3057\u3066\u3001HTML\u3067\u72ec\u81ea\u306e\u51e1\u4f8b\u3092\u4f5c\u308b\u65b9\u304c\u67d4\u8edf\u306b\u898b\u305f\u76ee\u3092\u6574\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\r\n<pre><code class=\"language-javascript\">plugins: {\r\n  legend: { display: false }\r\n}\r\n<\/code><\/pre>\r\n<h2 class=\"fz-xl\">\u307e\u3068\u3081<\/h2>\r\n<p>Chart.js\u3067\u7a4d\u307f\u4e0a\u3052\u68d2\u30b0\u30e9\u30d5\u3092\u4f5c\u308b\u3068\u304d\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u307e\u3068\u3081\u307e\u3059\u3002<\/p>\r\n<ul style=\"list-style-type:bullet;\" class=\"my-0.5r\">\r\n<li><code>stack<\/code> \u306e\u540d\u524d\u3092\u63c3\u3048\u308b \uff0b <code>scales.y.stacked: true<\/code> \u306e<b class=\"bold\">\u4e21\u65b9\u304c\u5fc5\u8981<\/b><\/li>\r\n<li>\u6298\u308c\u7dda\u3068\u306e\u6df7\u5408\u306f dataset\u5358\u4f4d\u3067 <code>type<\/code> \u3092\u6307\u5b9a\u3059\u308b\u3060\u3051<\/li>\r\n<li>\u53f3\u8ef8\u306f <code>yAxisID<\/code> \u3067\u7d10\u4ed8\u3051\u3066 <code>scales<\/code> \u306b\u8ffd\u52a0\u3059\u308b<\/li>\r\n<li>\u68d2\u306e\u592a\u3055\u306f <code>barPercentage<\/code> \u3068 <code>categoryPercentage<\/code> \u3067\u8abf\u6574\uff08\u5168bar\u7cfb\u5217\u306b\u540c\u3058\u5024\u3092\uff09<\/li>\r\n<li>\u51e1\u4f8b\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3092\u975e\u8868\u793a\u306b\u3057\u3066HTML\u3067\u4f5c\u308b\u65b9\u304c\u67d4\u8edf<\/li>\r\n<li>\u8ef8\u30e9\u30d9\u30eb\u306f <code>ticks.callback<\/code> \u3067\u5358\u4f4d\u4ed8\u304d\u306b\u3067\u304d\u308b<\/li>\r\n<\/ul>","protected":false},"excerpt":{"rendered":"Chart.js\u3092\u4f7f\u3063\u3066\u7a4d\u307f\u4e0a\u3052\u68d2\u30b0\u30e9\u30d5\u3092\u3059\u3050\u4f5c\u308c\u308b\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\u3002CDN\u306e\u8aad\u307f\u8fbc\u307f\u304b\u3089\u3001\u68d2\u306e\u8272\u30fb\u5e45\u30fb\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u306a\u3069\u3088\u304f\u4f7f\u3046\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u307e\u3067\u3001\u624b\u3063\u53d6\u308a\u65e9\u304f\u5b9f\u88c5\u3057\u305f\u3044\u4eba\u5411\u3051\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002","protected":false},"author":1,"featured_media":11931,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[883,889,882,884,885,886,887,888,182,113],"class_list":{"0":"post-11928","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-javascript","8":"tag-883","9":"tag-889","10":"tag-chart-js","11":"tag-884","12":"tag-885","13":"tag-chart-umd-js","14":"tag-barpercentage","15":"tag-categorypercentage","16":"tag-cdn","17":"tag-javascript"},"_links":{"self":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/11928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/comments?post=11928"}],"version-history":[{"count":0,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/11928\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media\/11931"}],"wp:attachment":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media?parent=11928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/categories?post=11928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/tags?post=11928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}