From 9ac9b6298fb3ce94fd666c4b37a4d62f9a1c7d0e Mon Sep 17 00:00:00 2001 From: kazu634 Date: Sun, 14 Jun 2020 11:39:58 +0700 Subject: [PATCH] =?UTF-8?q?=E5=86=86=E3=82=B0=E3=83=A9=E3=83=95=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2020-06-13-different-types-of-graphs.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/content/labs/visualization/2020-06-13-different-types-of-graphs.md b/content/labs/visualization/2020-06-13-different-types-of-graphs.md index 6614cce..6fdb1f8 100644 --- a/content/labs/visualization/2020-06-13-different-types-of-graphs.md +++ b/content/labs/visualization/2020-06-13-different-types-of-graphs.md @@ -132,3 +132,28 @@ chart=true 円の「角度」から内訳を感覚的につかめるのが、円グラフの特徴とのこと。 +{{}} + var ctx = document.getElementById("pie-chart"); + var myPieChart = new Chart(ctx, { + type: 'pie', + data: { + labels: ["A", "O", "B", "AB"], + datasets: [{ + backgroundColor: [ + "#BB5179", + "#FAFF67", + "#58A27C", + "#3C00FF" + ], + data: [38, 31, 21, 10] + }] + }, + options: { + title: { + display: true, + text: 'Blood Type Ratio' + } + } +}); +{{< /chart >}} +