{"id":1650,"date":"2021-08-09T16:28:49","date_gmt":"2021-08-09T07:28:49","guid":{"rendered":"http:\/\/www.agile-software.site\/?p=1650"},"modified":"2021-08-09T19:14:21","modified_gmt":"2021-08-09T10:14:21","slug":"javascript%e3%82%b0%e3%83%a9%e3%83%95%e4%bd%9c%e6%88%90","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=1650","title":{"rendered":"JavaScript[\u30b0\u30e9\u30d5\u4f5c\u6210]"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Google Charts<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u68d2\u30b0\u30e9\u30d5<\/h3>\n\n\n\n<p>\u4e0b\u8a18\u30b3\u30fc\u30c9\u306f<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>&lt;script src=&quot;https:\/\/www.gstatic.com\/charts\/loader.js&quot;&gt;&lt;\/script&gt; \n\ngoogle.charts.load(&quot;current&quot;, {&quot;packages&quot;:[&quot;corechart&quot;]});\ngoogle.charts.setOnLoadCallback(myChart);<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;ja&quot;&gt;\n &lt;head&gt;\n  &lt;meta charset=&quot;utf-8&quot;&gt;\n  &lt;title&gt;\u30b0\u30e9\u30d5\u306e\u8868\u793a&lt;\/title&gt;\n &lt;\/head&gt;\n &lt;body&gt;\n  &lt;h3&gt;\u68d2\u30b0\u30e9\u30d5\u306e\u30b5\u30f3\u30d7\u30eb&lt;\/h3&gt;\n  &lt;div id=&quot;mychart&quot; style=&quot;width: 800px; height: 600px;&quot;&gt;&lt;\/div&gt;\n  &lt;script src=&quot;https:\/\/www.gstatic.com\/charts\/loader.js&quot;&gt;&lt;\/script&gt;\n  &lt;script&gt;\n  google.charts.load(&quot;current&quot;, {&quot;packages&quot;:[&quot;corechart&quot;]});\n  google.charts.setOnLoadCallback(myChart);\n\n  function myChart() {\n   var data = google.visualization.arrayToDataTable([\n    [&quot;\u52d5\u7269&quot;,      &quot;\u4eba\u6570&quot;, { role:&quot;style&quot; }],\n    [&quot;\u72ac&quot;,            11, &quot;red&quot;   ],\n    [&quot;\u732b&quot;,             8, &quot;orange&quot;],\n    [&quot;\u30cf\u30e0\u30b9\u30bf\u30fc&quot;,     3, &quot;yellow&quot;],\n    [&quot;\u9ce5&quot;,             2, &quot;green&quot; ],\n    [&quot;\u9b5a&quot;,             2, &quot;blue&quot;  ],\n    [&quot;\u305d\u306e\u4ed6&quot;,         1, &quot;pink&quot;  ],\n    [&quot;\u30da\u30c3\u30c8\u306f\u3044\u306a\u3044&quot;, 7, &quot;gray&quot;  ]\n   ]);\n\n   var options = {\n    title:&quot;\uff13\u5e74\uff11\u7d44\u306e\u307f\u3093\u306a\u306e\u30da\u30c3\u30c8&quot;,\n   };\n\n   var chart = new google.visualization.ColumnChart(document.getElementById(&quot;mychart&quot;));\n   chart.draw(data, options);\n  }\n  &lt;\/script&gt;\n &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u5186\u30b0\u30e9\u30d5<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;ja&quot;&gt;\n &lt;head&gt;\n  &lt;meta charset=&quot;utf-8&quot;&gt;\n  &lt;title&gt;\u30b0\u30e9\u30d5\u306e\u8868\u793a&lt;\/title&gt;\n &lt;\/head&gt;\n &lt;body&gt;\n  &lt;h3&gt;\u5186\u30b0\u30e9\u30d5\u306e\u30b5\u30f3\u30d7\u30eb&lt;\/h3&gt;\n  &lt;div id=&quot;mychart&quot; style=&quot;width:800px; height:600px;&quot;&gt;&lt;\/div&gt;\n  &lt;script src=&quot;https:\/\/www.gstatic.com\/charts\/loader.js&quot;&gt;&lt;\/script&gt;\n  &lt;script&gt;\n  google.charts.load(&quot;current&quot;, {&quot;packages&quot;:[&quot;corechart&quot;]});\n  google.charts.setOnLoadCallback(myChart);\n\n  function myChart() {\n   var data = google.visualization.arrayToDataTable([\n    [&quot;\u52d5\u7269&quot;,      &quot;\u4eba\u6570&quot;],\n    [&quot;\u72ac&quot;,            11],\n    [&quot;\u732b&quot;,             8],\n    [&quot;\u30cf\u30e0\u30b9\u30bf\u30fc&quot;,     3],\n    [&quot;\u9ce5&quot;,             2],\n    [&quot;\u9b5a&quot;,             2],\n    [&quot;\u305d\u306e\u4ed6&quot;,         1],\n    [&quot;\u30da\u30c3\u30c8\u306f\u3044\u306a\u3044&quot;, 7]\n   ]);\n\n   var options = {\n    title:&quot;\uff13\u5e74\uff11\u7d44\u306e\u307f\u3093\u306a\u306e\u30da\u30c3\u30c8&quot;,\n    slices: {\n     0: { color: &quot;darkRed&quot; },\n     1: { color: &quot;orange&quot; },\n     2: { color: &quot;pink&quot; },\n     3: { color: &quot;lime&quot; },\n     4: { color: &quot;blue&quot; },\n     5: { color: &quot;red&quot; },\n     6: { color: &quot;gray&quot; }\n    }\n   };\n\n   var chart = new google.visualization.PieChart(document.getElementById(&quot;mychart&quot;));\n   chart.draw(data, options);\n  }\n  &lt;\/script&gt;\n &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-jin-gb-block-icon-box jin-icon-caution jin-iconbox\"><div class=\"jin-iconbox-icons\"><i class=\"jic jin-ifont-caution jin-icons\"><\/i><\/div><div class=\"jin-iconbox-main\">\n<p>Google Charts\u30db\u30fc\u30e0\u30da\u30fc\u30b8<a href=\"https:\/\/developers.google.com\/chart\/interactive\/docs\/reference\">https:\/\/developers.google.com\/chart\/interactive\/docs\/reference<\/a><\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Google Charts \u68d2\u30b0\u30e9\u30d5 \u4e0b\u8a18\u30b3\u30fc\u30c9\u306f \u5186\u30b0\u30e9\u30d5<\/p>\n","protected":false},"author":1,"featured_media":1655,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1650","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1650"}],"version-history":[{"count":1,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1650\/revisions"}],"predecessor-version":[{"id":1651,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1650\/revisions\/1651"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/media\/1655"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}