{"id":141,"date":"2026-07-13T07:08:49","date_gmt":"2026-07-12T22:08:49","guid":{"rendered":"https:\/\/www.tech-undefined.com\/?p=141"},"modified":"2026-07-13T07:08:51","modified_gmt":"2026-07-12T22:08:51","slug":"%e3%80%90chart-js%e3%80%91%e5%9f%ba%e6%9c%ac%e7%9a%84%e3%81%aa%e4%bd%bf%e3%81%84%e6%96%b9%ef%bd%9ccdn%e3%81%a7%e6%a3%92%e3%82%b0%e3%83%a9%e3%83%95%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.tech-undefined.com\/?p=141","title":{"rendered":"\u3010Chart.js\u3011\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\uff5cCDN\u3067\u68d2\u30b0\u30e9\u30d5\u3092\u8868\u793a\u3059\u308b"},"content":{"rendered":"<p>1\u670818\u4ef6\u30012\u670825\u4ef6\u30013\u670822\u4ef6\u3002\u6708\u3054\u3068\u306e\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570\u306f\u4e00\u89a7\u3067\u3082\u5206\u304b\u308a\u307e\u3059\u304c\u3001\u68d2\u30b0\u30e9\u30d5\u306b\u3059\u308b\u3068\u5897\u6e1b\u3092\u8ffd\u3044\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u30011\u6708\u304b\u30896\u6708\u307e\u3067\u306e\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570\u3092Chart.js\u3067\u68d2\u30b0\u30e9\u30d5\u306b\u3057\u307e\u3059\u3002<\/p>\n<h2>Chart.js\u3068\u306f<\/h2>\n<p>Chart.js\u306f\u3001\u68d2\u30b0\u30e9\u30d5\u3084\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u306a\u3069\u3092Web\u30da\u30fc\u30b8\u306b\u63cf\u753b\u3059\u308bJavaScript\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002HTML\u306b<code>&lt;canvas&gt;<\/code>\u8981\u7d20\u3092\u7f6e\u304d\u3001JavaScript\u3067\u30c7\u30fc\u30bf\u3068\u8868\u793a\u65b9\u6cd5\u3092\u6e21\u3059\u3068\u30b0\u30e9\u30d5\u304c\u63cf\u304b\u308c\u307e\u3059\u3002<\/p>\n<p>Chart.js\u3092\u4f7f\u3048\u3070\u3001\u68d2\u306e\u4f4d\u7f6e\u3084\u76ee\u76db\u308a\u3092\u81ea\u5206\u3067\u8a08\u7b97\u3057\u3066\u63cf\u304f\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4eca\u56de\u306f\u7e26\u68d2\u30b0\u30e9\u30d5\u30921\u3064\u8868\u793a\u3057\u3001\u305d\u306e\u3042\u3068\u3067\u6570\u5024\u3001\u8272\u3001\u30b0\u30e9\u30d5\u306e\u7a2e\u985e\u3092\u5909\u3048\u3066\u307f\u307e\u3059\u3002<\/p>\n<h2>\u78ba\u8a8d\u74b0\u5883<\/h2>\n<ul>\n<li>Chart.js 4.5.1<\/li>\n<li>Windows 11<\/li>\n<li>Google Chrome 150.0.7871.102<\/li>\n<li>\u78ba\u8a8d\u65e5: 2026-07-13<\/li>\n<\/ul>\n<p>CDN\u306eURL\u306b\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u3092\u5165\u308c\u3001\u5f8c\u65e5\u8a66\u3057\u305f\u3068\u304d\u3082\u540c\u30584.5.1\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30b0\u30e9\u30d5\u306e\u63cf\u753b\u5148\u3092\u7528\u610f\u3059\u308b<\/h2>\n<p>Chart.js\u306f<code>&lt;canvas&gt;<\/code>\u8981\u7d20\u306e\u4e2d\u306b\u30b0\u30e9\u30d5\u3092\u63cf\u304d\u307e\u3059\u3002HTML\u306e<code>body<\/code>\u5185\u306b\u3001\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u7f6e\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-html\">&lt;div class=\"chart-container\"&gt;\n    &lt;canvas\n        id=\"inquiryChart\"\n        role=\"img\"\n        aria-label=\"2026\u5e741\u6708\u304b\u30896\u6708\u307e\u3067\u306e\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570\u30021\u670818\u4ef6\u30012\u670825\u4ef6\u30013\u670822\u4ef6\u30014\u670830\u4ef6\u30015\u670828\u4ef6\u30016\u670835\u4ef6\u3002\"\n    &gt;\n        2026\u5e741\u6708\u304b\u30896\u6708\u307e\u3067\u306e\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570\u3092\u793a\u3059\u68d2\u30b0\u30e9\u30d5\u3067\u3059\u3002\n    &lt;\/canvas&gt;\n&lt;\/div&gt;\n<\/code><\/pre>\n<p><code>id=\"inquiryChart\"<\/code>\u306f\u3001\u3053\u306e\u3042\u3068JavaScript\u304b\u3089\u63cf\u753b\u5148\u3092\u898b\u3064\u3051\u308b\u305f\u3081\u306e\u76ee\u5370\u3067\u3059\u3002<code>role=\"img\"<\/code>\u306f<code>&lt;canvas&gt;<\/code>\u8981\u7d20\u3092\u753b\u50cf\u3068\u3057\u3066\u6271\u3046\u6307\u5b9a\u3067\u3001<code>aria-label<\/code>\u306b\u306f\u30b0\u30e9\u30d5\u306e\u5185\u5bb9\u3068\u5404\u6708\u306e\u5024\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\u3002<code>&lt;canvas&gt;<\/code>\u3078\u63cf\u304b\u308c\u305f\u56f3\u5f62\u3060\u3051\u3067\u306f\u3001\u30b9\u30af\u30ea\u30fc\u30f3\u30ea\u30fc\u30c0\u30fc\u306b\u30c7\u30fc\u30bf\u306e\u610f\u5473\u304c\u4f1d\u308f\u3089\u306a\u3044\u305f\u3081\u3067\u3059\u3002<\/p>\n<p>\u30b0\u30e9\u30d5\u306e\u5e45\u3068\u9ad8\u3055\u306f\u3001<code>&lt;canvas&gt;<\/code>\u8981\u7d20\u3092\u56f2\u3080\u89aa\u8981\u7d20\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002\u6b21\u306eCSS\u3092<code>head<\/code>\u5185\u306e<code>style<\/code>\u8981\u7d20\u3078\u66f8\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-css\">.chart-container {\n    position: relative;\n    width: min(100%, 720px);\n    height: 360px;\n}\n<\/code><\/pre>\n<p>\u5e45\u306f\u6700\u5927720px\u3001\u753b\u9762\u304c\u72ed\u3044\u3068\u304d\u306f\u753b\u9762\u5e45\u306b\u5408\u308f\u305b\u307e\u3059\u3002\u9ad8\u3055\u306f360px\u3067\u56fa\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<h2>CDN\u304b\u3089Chart.js\u3092\u8aad\u307f\u8fbc\u3080<\/h2>\n<p>CDN\u306f\u3001Chart.js\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u5206\u306ePC\u3078\u7f6e\u304b\u305a\u3001\u914d\u4fe1\u7528URL\u304b\u3089\u8aad\u307f\u8fbc\u3080\u65b9\u6cd5\u3067\u3059\u3002<code>&lt;canvas&gt;<\/code>\u8981\u7d20\u3088\u308a\u5f8c\u308d\u306b\u3001\u6b21\u306e<code>script<\/code>\u8981\u7d20\u3092\u7f6e\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-html\">&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chart.js@4.5.1\/dist\/chart.umd.min.js\"&gt;&lt;\/script&gt;\n<\/code><\/pre>\n<p>\u3053\u306e1\u884c\u3092\u8aad\u307f\u8fbc\u3080\u3068\u3001JavaScript\u304b\u3089<code>Chart<\/code>\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u521d\u671f\u5316\u30b3\u30fc\u30c9\u306f\u5fc5\u305a\u3053\u306e<code>script<\/code>\u8981\u7d20\u3088\u308a\u5f8c\u308d\u306b\u66f8\u3044\u3066\u304f\u3060\u3055\u3044\u3002\u9806\u756a\u304c\u9006\u3060\u3068\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306b<code>Chart is not defined<\/code>\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>Chart.js\u516c\u5f0f\u306eGetting Started\u3067\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u306e\u306a\u3044CDN URL\u3082\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u78ba\u8a8d\u3057\u305f\u30b3\u30fc\u30c9\u3068\u914d\u4fe1\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5f8c\u304b\u3089\u305a\u308c\u306a\u3044\u3088\u3046\u306b<code>@4.5.1<\/code>\u3092\u4ed8\u3051\u307e\u3057\u305f\u3002<\/p>\n<h2>\u68d2\u30b0\u30e9\u30d5\u3092\u63cf\u304f<\/h2>\n<p>Chart.js\u3092\u8aad\u307f\u8fbc\u3093\u3060<code>script<\/code>\u8981\u7d20\u306e\u4e0b\u306b\u3001\u30b0\u30e9\u30d5\u3092\u4f5c\u308b\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-javascript\">const canvas = document.getElementById('inquiryChart');\n\nconst inquiryChart = new Chart(canvas, {\n    type: 'bar',\n    data: {\n        labels: ['1\u6708', '2\u6708', '3\u6708', '4\u6708', '5\u6708', '6\u6708'],\n        datasets: [\n            {\n                label: '\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570',\n                data: [18, 25, 22, 30, 28, 35],\n                backgroundColor: 'rgba(54, 162, 235, 0.55)',\n                borderColor: 'rgb(54, 162, 235)',\n                borderWidth: 1\n            }\n        ]\n    },\n    options: {\n        responsive: true,\n        maintainAspectRatio: false,\n        scales: {\n            y: {\n                beginAtZero: true,\n                ticks: {\n                    precision: 0\n                },\n                title: {\n                    display: true,\n                    text: '\u4ef6\u6570'\n                }\n            }\n        }\n    }\n});\n<\/code><\/pre>\n<p><code>document.getElementById()<\/code>\u3067<code>id=\"inquiryChart\"<\/code>\u306e<code>&lt;canvas&gt;<\/code>\u8981\u7d20\u3092\u53d6\u5f97\u3057\u3001\u305d\u306e\u8981\u7d20\u3092<code>new Chart()<\/code>\u306e\u7b2c1\u5f15\u6570\u3078\u6e21\u3057\u307e\u3059\u3002\u7b2c2\u5f15\u6570\u304c\u30b0\u30e9\u30d5\u306e\u8a2d\u5b9a\u3067\u3059\u3002\u3053\u306e\u8a2d\u5b9a\u306e\u3046\u3061\u3001\u6700\u521d\u306b\u62bc\u3055\u3048\u308b\u5834\u6240\u306f<code>type<\/code>\u3001<code>data<\/code>\u3001<code>options<\/code>\u306e3\u3064\u3067\u3059\u3002<\/p>\n<h3><code>type<\/code>\u306f\u30b0\u30e9\u30d5\u306e\u7a2e\u985e<\/h3>\n<pre><code class=\"language-javascript\">type: 'bar'\n<\/code><\/pre>\n<p><code>bar<\/code>\u306f\u68d2\u30b0\u30e9\u30d5\u3067\u3059\u3002\u3053\u3053\u3092<code>line<\/code>\u306b\u5909\u3048\u308b\u3068\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3><code>data<\/code>\u306f\u6a2a\u8ef8\u306e\u30e9\u30d9\u30eb\u3068\u6570\u5024<\/h3>\n<pre><code class=\"language-javascript\">data: {\n    labels: ['1\u6708', '2\u6708', '3\u6708', '4\u6708', '5\u6708', '6\u6708'],\n    datasets: [\n        {\n            label: '\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570',\n            data: [18, 25, 22, 30, 28, 35]\n        }\n    ]\n}\n<\/code><\/pre>\n<p><code>data.labels[0]<\/code>\u306e<code>'1\u6708'<\/code>\u3068\u3001<code>data.datasets[0].data[0]<\/code>\u306e<code>18<\/code>\u304c\u7d44\u307f\u5408\u308f\u3055\u308c\u30011\u6708\u306e\u5024\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u3001\u6708\u3068\u6570\u5024\u30926\u4ef6\u305a\u3064\u540c\u3058\u9806\u756a\u3067\u4e26\u3079\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><code>datasets<\/code>\u306b\u306f\u3001\u30b0\u30e9\u30d5\u306b\u8f09\u305b\u308b\u30c7\u30fc\u30bf\u306e\u307e\u3068\u307e\u308a\u3092\u914d\u5217\u3067\u5165\u308c\u307e\u3059\u3002\u4eca\u56de\u306f\u300c\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570\u300d\u3060\u3051\u306a\u306e\u3067\u3001\u914d\u5217\u306e\u4e2d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30821\u3064\u3067\u3059\u3002<code>label<\/code>\u306b\u66f8\u3044\u305f\u300c\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570\u300d\u306f\u3001\u30b0\u30e9\u30d5\u4e0a\u90e8\u306e\u51e1\u4f8b\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3><code>options<\/code>\u306f\u8ef8\u3068\u30b5\u30a4\u30ba\u306e\u8a2d\u5b9a<\/h3>\n<pre><code class=\"language-javascript\">options: {\n    responsive: true,\n    maintainAspectRatio: false,\n    scales: {\n        y: {\n            beginAtZero: true,\n            ticks: {\n                precision: 0\n            },\n            title: {\n                display: true,\n                text: '\u4ef6\u6570'\n            }\n        }\n    }\n}\n<\/code><\/pre>\n<p><code>responsive: true<\/code>\u306b\u3059\u308b\u3068\u3001\u89aa\u8981\u7d20\u306e\u5e45\u306b\u5408\u308f\u305b\u3066\u30b0\u30e9\u30d5\u306e\u5e45\u304c\u5909\u308f\u308a\u307e\u3059\u3002<code>maintainAspectRatio: false<\/code>\u306f\u3001\u5148\u307b\u3069CSS\u3067\u6307\u5b9a\u3057\u305f\u9ad8\u3055360px\u3092\u4f7f\u3046\u305f\u3081\u306e\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<p><code>beginAtZero: true<\/code>\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001Y\u8ef8\u306b0\u304c\u542b\u307e\u308c\u307e\u3059\u3002\u4ef6\u6570\u3092\u6bd4\u3079\u308b\u68d2\u30b0\u30e9\u30d5\u3067\u306f\u3001\u68d2\u306e\u9577\u3055\u30920\u304b\u3089\u898b\u6bd4\u3079\u3089\u308c\u308b\u3088\u3046\u306b\u3001\u3053\u306e\u8a2d\u5b9a\u3092\u5165\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><code>ticks.precision: 0<\/code>\u306f\u3001Y\u8ef8\u306e\u76ee\u76db\u308a\u3092\u5c0f\u6570\u306a\u3057\u3067\u8868\u793a\u3059\u308b\u305f\u3081\u306e\u6307\u5b9a\u3067\u3059\u3002<code>title<\/code>\u3067\u306f\u3001Y\u8ef8\u306e\u6a2a\u306b\u300c\u4ef6\u6570\u300d\u3068\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>HTML\u3092\u4fdd\u5b58\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u304f<\/h2>\n<p>3\u3064\u306e\u624b\u9806\u30921\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u3059\u308b\u3068\u3001\u6b21\u306eHTML\u306b\u306a\u308a\u307e\u3059\u3002<code>chartjs-sample.html<\/code>\u3068\u3044\u3046\u540d\u524d\u3067\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-html\">&lt;!DOCTYPE html&gt;\n&lt;html lang=\"ja\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n    &lt;title&gt;Chart.js \u68d2\u30b0\u30e9\u30d5\u306e\u30b5\u30f3\u30d7\u30eb&lt;\/title&gt;\n    &lt;style&gt;\n        body {\n            margin: 0;\n            padding: 24px;\n            color: #1f2937;\n            font-family: sans-serif;\n        }\n\n        .chart-container {\n            position: relative;\n            width: min(100%, 720px);\n            height: 360px;\n        }\n    &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;h1&gt;\u6708\u5225\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570&lt;\/h1&gt;\n\n    &lt;div class=\"chart-container\"&gt;\n        &lt;canvas\n            id=\"inquiryChart\"\n            role=\"img\"\n            aria-label=\"2026\u5e741\u6708\u304b\u30896\u6708\u307e\u3067\u306e\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570\u30021\u670818\u4ef6\u30012\u670825\u4ef6\u30013\u670822\u4ef6\u30014\u670830\u4ef6\u30015\u670828\u4ef6\u30016\u670835\u4ef6\u3002\"\n        &gt;\n            2026\u5e741\u6708\u304b\u30896\u6708\u307e\u3067\u306e\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570\u3092\u793a\u3059\u68d2\u30b0\u30e9\u30d5\u3067\u3059\u3002\n        &lt;\/canvas&gt;\n    &lt;\/div&gt;\n\n    &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chart.js@4.5.1\/dist\/chart.umd.min.js\"&gt;&lt;\/script&gt;\n    &lt;script&gt;\n        const canvas = document.getElementById('inquiryChart');\n\n        const inquiryChart = new Chart(canvas, {\n            type: 'bar',\n            data: {\n                labels: ['1\u6708', '2\u6708', '3\u6708', '4\u6708', '5\u6708', '6\u6708'],\n                datasets: [\n                    {\n                        label: '\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570',\n                        data: [18, 25, 22, 30, 28, 35],\n                        backgroundColor: 'rgba(54, 162, 235, 0.55)',\n                        borderColor: 'rgb(54, 162, 235)',\n                        borderWidth: 1\n                    }\n                ]\n            },\n            options: {\n                responsive: true,\n                maintainAspectRatio: false,\n                scales: {\n                    y: {\n                        beginAtZero: true,\n                        ticks: {\n                            precision: 0\n                        },\n                        title: {\n                            display: true,\n                            text: '\u4ef6\u6570'\n                        }\n                    }\n                }\n            }\n        });\n    &lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n<p>\u4fdd\u5b58\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092Chrome\u3067\u958b\u304f\u3068\u30011\u6708\u304b\u30896\u6708\u307e\u3067\u306e\u68d2\u304c6\u672c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u306eHTML\u306f\u3001\u4e0a\u306b\u66f8\u3044\u305f\u78ba\u8a8d\u74b0\u5883\u3067\u63cf\u753b\u3092\u78ba\u8a8d\u6e08\u307f\u3067\u3059\u3002<\/p>\n<h2>\u6570\u5024\u3068\u8272\u3092\u5909\u3048\u308b<\/h2>\n<p>\u5225\u306e\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3059\u308b\u3068\u304d\u306f\u3001<code>labels<\/code>\u3068<code>data<\/code>\u3092\u66f8\u304d\u63db\u3048\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u30017\u6708\u304b\u30899\u6708\u307e\u3067\u306e\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570\u306b\u5909\u3048\u308b\u306a\u3089\u6b21\u306e\u5f62\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-javascript\">data: {\n    labels: ['7\u6708', '8\u6708', '9\u6708'],\n    datasets: [\n        {\n            label: '\u554f\u3044\u5408\u308f\u305b\u4ef6\u6570',\n            data: [32, 27, 40]\n        }\n    ]\n}\n<\/code><\/pre>\n<p>\u6708\u3068\u6570\u5024\u306e\u4f4d\u7f6e\u304c\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u3001<code>labels<\/code>\u3068<code>data<\/code>\u306f\u540c\u3058\u500b\u6570\u3001\u540c\u3058\u9806\u756a\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u6708\u3084\u6570\u5024\u3092\u5909\u3048\u305f\u3068\u304d\u306f\u3001<code>&lt;canvas&gt;<\/code>\u8981\u7d20\u306e<code>aria-label<\/code>\u3068\u4ee3\u66ff\u30c6\u30ad\u30b9\u30c8\u3082\u540c\u3058\u6708\u30fb\u4ef6\u6570\u3078\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<p>\u68d2\u306e\u8272\u306f<code>backgroundColor<\/code>\u3001\u68d2\u306e\u67a0\u7dda\u306f<code>borderColor<\/code>\u3067\u5909\u3048\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-javascript\">backgroundColor: 'rgba(255, 99, 132, 0.55)',\nborderColor: 'rgb(255, 99, 132)',\nborderWidth: 1\n<\/code><\/pre>\n<p><code>rgba()<\/code>\u306e\u6700\u5f8c\u306b\u3042\u308b<code>0.55<\/code>\u306f\u4e0d\u900f\u660e\u5ea6\u3092\u8868\u3059\u30a2\u30eb\u30d5\u30a1\u5024\u3067\u3059\u3002<code>0<\/code>\u306f\u5b8c\u5168\u306b\u900f\u660e\u3001<code>1<\/code>\u306f\u5b8c\u5168\u306b\u4e0d\u900f\u660e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u306b\u5909\u3048\u308b<\/h2>\n<p>\u540c\u3058\u6708\u5225\u30c7\u30fc\u30bf\u3092\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u3067\u898b\u305f\u3044\u3068\u304d\u306f\u3001<code>type<\/code>\u30921\u304b\u6240\u3060\u3051\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-javascript\">type: 'line'\n<\/code><\/pre>\n<p>\u68d2\u30b0\u30e9\u30d5\u306f\u6708\u3054\u3068\u306e\u4ef6\u6570\u3092\u6bd4\u3079\u308b\u3068\u304d\u3001\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u306f\u6642\u9593\u306e\u6d41\u308c\u306b\u6cbf\u3063\u305f\u5897\u6e1b\u3092\u898b\u308b\u3068\u304d\u306b\u5411\u3044\u3066\u3044\u307e\u3059\u3002<code>bar<\/code>\u3068<code>line<\/code>\u3092\u5207\u308a\u66ff\u3048\u308b\u3068\u3001\u540c\u3058\u30c7\u30fc\u30bf\u3067\u3082\u898b\u3048\u65b9\u306e\u9055\u3044\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><code>type<\/code>\u3092<code>line<\/code>\u3078\u5909\u3048\u305f\u3089\u3001<code>aria-label<\/code>\u3068<code>&lt;canvas&gt;<\/code>\u8981\u7d20\u5185\u306e\u300c\u68d2\u30b0\u30e9\u30d5\u300d\u3082\u300c\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u300d\u3078\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<h2>\u8868\u793a\u3055\u308c\u306a\u3044\u3068\u304d\u306b\u78ba\u8a8d\u3059\u308b\u5834\u6240<\/h2>\n<h3><code>Chart is not defined<\/code>\u3068\u8868\u793a\u3055\u308c\u308b<\/h3>\n<p>Chart.js\u3092\u8aad\u307f\u8fbc\u3080<code>script<\/code>\u8981\u7d20\u3088\u308a\u524d\u306b\u3001<code>new Chart()<\/code>\u3092\u5b9f\u884c\u3057\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002CDN\u306eURL\u304c\u9014\u4e2d\u3067\u5207\u308c\u3066\u3044\u306a\u3044\u304b\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3078\u63a5\u7d9a\u3067\u304d\u3066\u3044\u308b\u304b\u3082\u898b\u3066\u304f\u3060\u3055\u3044\u3002URL\u304c\u6b63\u3057\u3044\u306e\u306b\u76f4\u3089\u306a\u3044\u5834\u5408\u306f\u3001Chrome\u306e\u958b\u767a\u8005\u30c4\u30fc\u30eb\u306b\u3042\u308bNetwork\u30bf\u30d6\u3067\u3001<code>chart.umd.min.js<\/code>\u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30b0\u30e9\u30d5\u306e\u9ad8\u3055\u304c\u5408\u308f\u306a\u3044<\/h3>\n<p><code>&lt;canvas&gt;<\/code>\u8981\u7d20\u3067\u306f\u306a\u304f\u3001<code>.chart-container<\/code>\u306b\u9ad8\u3055\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<code>options<\/code>\u306b<code>maintainAspectRatio: false<\/code>\u304c\u5165\u3063\u3066\u3044\u308b\u304b\u3082\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<h3>\u6708\u3068\u68d2\u306e\u4f4d\u7f6e\u304c\u305a\u308c\u308b<\/h3>\n<p><code>labels<\/code>\u3068<code>data<\/code>\u306e\u500b\u6570\u3001\u4e26\u3073\u9806\u3092\u6bd4\u3079\u307e\u3059\u3002\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u306a\u3089\u30011\u6708\u306f<code>data.labels[0]<\/code>\u300118\u4ef6\u306f<code>data.datasets[0].data[0]<\/code>\u3067\u3059\u3002<\/p>\n<h3>\u53e4\u3044\u8a18\u4e8b\u306e<code>yAxes<\/code>\u304c\u52d5\u304b\u306a\u3044<\/h3>\n<p>Chart.js 2\u7cfb\u3067\u306f<code>yAxes<\/code>\u3092\u4f7f\u3046\u30b3\u30fc\u30c9\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u3053\u306e\u8a18\u4e8b\u3067\u4f7f\u30464.5.1\u3067\u306f\u3001Y\u8ef8\u306e\u8a2d\u5b9a\u3092<code>options.scales.y<\/code>\u3078\u66f8\u304d\u307e\u3059\u3002<\/p>\n<h2>\u53c2\u8003<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.chartjs.org\/docs\/latest\/getting-started\/\">Chart.js Getting Started<\/a>\uff08\u78ba\u8a8d\u65e5: 2026-07-13\uff09<\/li>\n<li><a href=\"https:\/\/www.chartjs.org\/docs\/latest\/getting-started\/integration.html\">Chart.js Integration<\/a>\uff08\u78ba\u8a8d\u65e5: 2026-07-13\uff09<\/li>\n<li><a href=\"https:\/\/www.chartjs.org\/docs\/latest\/general\/data-structures.html\">Chart.js Data structures<\/a>\uff08\u78ba\u8a8d\u65e5: 2026-07-13\uff09<\/li>\n<li><a href=\"https:\/\/www.chartjs.org\/docs\/latest\/configuration\/responsive.html\">Chart.js Responsive Charts<\/a>\uff08\u78ba\u8a8d\u65e5: 2026-07-13\uff09<\/li>\n<li><a href=\"https:\/\/www.chartjs.org\/docs\/latest\/general\/accessibility.html\">Chart.js Accessibility<\/a>\uff08\u78ba\u8a8d\u65e5: 2026-07-13\uff09<\/li>\n<li><a href=\"https:\/\/github.com\/chartjs\/Chart.js\/releases\">Chart.js Releases<\/a>\uff08\u78ba\u8a8d\u65e5: 2026-07-13\uff09<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Chart.js 4.5.1\u3092CDN\u3067\u8aad\u307f\u8fbc\u307f\u3001\u6708\u5225\u30c7\u30fc\u30bf\u3092\u68d2\u30b0\u30e9\u30d5\u306b\u3057\u307e\u3059\u3002\u521d\u3081\u3066\u89e6\u308b\u4eba\u5411\u3051\u306b\u3001canvas\u306e\u7528\u610f\u3001type\u30fbdata\u30fboptions\u306e\u8aad\u307f\u65b9\u3001\u6570\u5024\u3084\u8272\u306e\u5909\u3048\u65b9\u3001\u8868\u793a\u3055\u308c\u306a\u3044\u3068\u304d\u306e\u78ba\u8a8d\u7b87\u6240\u307e\u3067\u30011\u3064\u306eHTML\u3092\u4f5c\u308a\u306a\u304c\u3089\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[10],"tags":[26,14],"class_list":["post-141","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-chart-js","tag-javascript"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tech-undefined.com\/index.php?rest_route=\/wp\/v2\/posts\/141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tech-undefined.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tech-undefined.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tech-undefined.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tech-undefined.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=141"}],"version-history":[{"count":4,"href":"https:\/\/www.tech-undefined.com\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions"}],"predecessor-version":[{"id":145,"href":"https:\/\/www.tech-undefined.com\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions\/145"}],"wp:attachment":[{"href":"https:\/\/www.tech-undefined.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tech-undefined.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tech-undefined.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}