반응형 chart.js1 Chart.js Chart.js를 사용하면 그래프를 손쉽게 구현할 수 있다. React에서 사용하려면 react-chartjs-2 를 사용하면 된다. 나는 구글링을 하며 간단히 html에서만 구현해보았다. //index.html 캔버스 밑에 글 는 chart.js를 import해오는 스크립트이다. 는 차트가 들어갈 태그이다. canvas 태그의 width와 height단위는 px이다. vh를 넣어도 px이다. //canvas.js //코드 출처는 https://nomalcy.tistory.com/23 new Chart(document.getElementById("bar-chart"), { type: "bar", data: { labels: ["Africa", "Asia", "Europe", "Latin America",.. 2022. 5. 12. 이전 1 다음 반응형