Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- input type=file
- icon
- API 토큰
- react
- ngrok실행
- dart 변수
- nextjs .env
- nextjs 설치
- CSS
- SCSS
- git lab
- nextjs
- rewrites
- react env
- There isn’t anything to compare
- getModifierState
- bootstrap
- npm styled-reset
- github
- next.js css
- API token
- createGlobalStyle
- github io
- fetch
- typescript react
- react typescript
- 컨디셔널 렌더링
- styled components
- ngrok설치
- Git
Archives
- Today
- Total
꾸준히 성장하는 개발자
[라이브러리] chart.js 본문
chart.js는 프로젝트안에 그래프들을 그려줄 때 쓰기 유용한 라이브러리이다.
Chart.js | Open source HTML5 Charts for your website
New in 2.0 New chart axis types Plot complex, sparse datasets on date time, logarithmic or even entirely custom scales with ease.
www.chartjs.org
html 파일 안에 CDN을 작성해준다
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
그리고 chart가 그려지기 원하는 부분에
<div>
<canvas id="myChart"></canvas>
</div>
canvas 태그를 이용하여 위치시켜준다.
그리고
https://www.chartjs.org/docs/latest/samples/scales/linear-step-size.html
Linear Scale - Step Size | Chart.js
Last Updated: 2/12/2022, 2:48:34 PM
www.chartjs.org
이 페이지에 들어가면 여러 가지의 그래프들을 볼 수 있다.
이 중에서 원하는 디자인을 선택하고 그 아래 어떤 방식으로 작성되어 있는지 확인 후
js파일이나 아니면 <script></script> 태그 사이에 작성해준다.
'JavaScript' 카테고리의 다른 글
[JavaScript] Promise/ fetch / then / catch / async await (1) | 2022.06.09 |
---|---|
[JavaScript] 배열에 숫자, 알파벳 등 담아내기 (0) | 2022.05.18 |
[라이브러리] moment cdn, npm (0) | 2022.05.17 |
[JavaScript] json 파일 받아오기 (0) | 2022.05.12 |
[JavaScript] Local Storage / Session Storage (0) | 2022.04.25 |