Chart.js ํํ์ด์ง ๋ณด๋ค Chart.js - W3Schools์ด ์ ๋ฆฌ๊ฐ ๋ ์ ๋ ๊ฒ ๊ฐ์ต๋๋ค.
<canvas>
์์๋ฅผ ํตํด ๊ทธ๋ํฝ์ ๊ทธ๋ฆด ์ ์๋ ์๋จ์ ์ ๊ณต<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>canvas tutorial</title>
</head>
<body>
<canvas id="canvas"></canvas>
<script>
const canvas = document.getElementById('canvas');
// ์บ๋ฒ์ค์์ ์ด๋ป๊ฒ ๊ทธ๋ฆด์ง(๋๋๋ง) ์ปจํ
์คํธ๋ฅผ ๋ฐ์์ต๋๋ค.
const ctx = canvas.getContext('2d');
// ๊ทธ๋ฆผ์ ๊ทธ๋ ค์ค
function drawRect(ctx){
// x, y ์ข์ธก ์๋จ ๊ธฐ์ค x, y ์ขํ
// w๋ ๋์ด, h๋ ๋์ด
let x = 10,
y = 50,
w = 200,
h = 100;
ctx.fillStyle = 'green';
ctx.fillRect(x, y, w, h);
}
drawRect(ctx);
</script>
</body>
</html>
์ฐธ๊ณ
[์ถ์ฒ: https://www.freecodecamp.org/news/d3js-tutorial-data-visualization-for-beginners/#getting-started]
์ฐธ๊ณ
README.md
๋ฅผ ๋ง์๋จน๊ณ ์์ฑํด๋ณด์๋๋ฐ ์ ํ๊ฑด์ง ๋ชจ๋ฅด๊ฒ ์ง๋ง ์ผ๋จ ๋งํฌ ๋ฃ๊ธฐ