일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- C#
- 안드로이드 gcm
- 안드로이드 푸시
- soundpool
- PHP
- 설치
- C# IO
- 우분투
- php 취약점
- 안드로이드 푸쉬
- not working
- FCM
- android 효과음
- php 시큐어코딩
- roundcube
- dovecot
- 안드로이드
- curl
- xe
- javascript
- 폼메일
- Mail Server
- UML
- mysql
- 자바스크립트
- 자동 생성
- WebView
- chart.js
- html5
- Android
- Today
- Total
그러냐
chart.js - Y 축의 최대 값과 최소값 설정 포함 예제 본문
<script src="//cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>
<script type="text/javascript">
<!--
var ctx = document.getElementById('myChart').getContext('2d');
var chart = new Chart(ctx, {
// The type of chart we want to create
type: 'bar',
// The data for our dataset
data: {
labels: [<?
foreach($graph as $gp){
echo '"'.$gp[0].'",';
}
?>],
datasets: [{
label: "합계",
backgroundColor: 'rgba(150,200,250,0.5)',
borderColor: 'rgba(150,200,250,0.5)',
data: [<?
foreach($graph as $gp){
echo '"'.$gp[1].'",';
}
?>],
}]
},
// Configuration options go here
options: {
scales: {
yAxes: [{
display: true,
ticks: {
suggestedMax: 100, // minimum will be 0, unless there is a lower value.
// OR //
beginAtZero: true // minimum value will be 0.
}
}]
}
}
});
//-->
</script>
'jquery' 카테고리의 다른 글
제이쿼리 ajax 더보기 버튼 구현 (0) | 2019.10.22 |
---|---|
[jquery] inArray 숫자 비교시 작동되지 않을 시 (0) | 2019.08.14 |
jquery multi file upload 모음 (0) | 2018.06.28 |
[jQuery] Lazy Load Plugin - 이미지 동적호출 (2) | 2018.05.31 |
jquery 멀티 파일 업로드 [종합] (0) | 2018.05.28 |