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 |
Tags
- prisma
- angular modal
- summary
- 앵귤러 모달
- mysql if
- 앵귤러 애니메이션
- ApexChart
- 호버
- TAILWIND
- Angular Router
- 옵저버블
- 모달
- flex-1
- 스크롤 이벤트 감지
- Router
- Ionic modal
- 셀렉트박스 커스텀
- route
- angular button
- 아이오닉 스크롤 이벤트
- scroll
- 스크롤 이벤트
- Oracle LISTAGG 사용 예시
- ajax 사용 예시
- angular animation
- egov spring ajax 사용 예시
- modal
- formgroup
- angular route
- 검색
Archives
- Today
- Total
깜놀하는 해므찌로
HighChart line 하이차트 라인 그래프 사용 예시 / 하이차트 포인트 클릭 함수 달기 본문
반응형
SMALL
<%-- 식대 차트 --%>
var arrData = [];
var arrCategory = [];
<c:forEach var="mgr0117VO" items="${arrMgr0117VO}" varStatus="status">
/* 리스트 -> 배열 */
arrData.push(Number("<c:out value="${mgr0117VO.price}"/>"));
/* 배열 초과 */
arrCategory.push("<c:out value="${month}"/>/<fmt:formatNumber value='${status.count}' minIntegerDigits='2' type='number'/>");
</c:forEach>
Highcharts.chart('chart01', {
chart: {
type: 'line'
},
title: false,
navigation: {
buttonOptions: {
y: -1000 //차트 다운버튼 화면에서 숨김
}
},
credits: {
enabled: false //하단 하이차트 주소 숨김
},
yAxis: {
title: false,
labels : {
format: '{value:,.0f}'
}
},
xAxis: {
categories: arrCategory
},
plotOptions: {
line: {
dataLabels: {
enabled: true
}
},
series: {
cursor: 'pointer',
/* 클릭 이벤트 */
point: {
events: {
click: function () {
fncOpenModal("eatPoint.do", this.category + "_" + this.y);
}
}
}
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span>',
pointFormat: '<table><tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:,.0f}원</b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true,
},
series: [{
name: '금액 합',
data: arrData,
color:'#6ba8ed',
}],
});
1. plotOptions 속성 내부 series - point - events - click - function(){} 설정으로 클릭 이벤트를 달 수 있다.
반응형
LIST
'IT' 카테고리의 다른 글
Egov Spring Controller login session 로그인 세션 리펙토링 (0) | 2022.07.06 |
---|---|
IDE Eclipse 이클립스 퀵서치 다운로드 방법 (안 되는 낚시글 아님!) (0) | 2022.07.06 |
공지사항 MySql Select / 다중 order by (0) | 2022.07.06 |
JavaScript HighChart 하이차트 사용 예시 (0) | 2022.07.06 |
Egov Spring ajax json 사용 예시 / 비동기통신 JavaScript / Controller 사용 예시 (0) | 2022.07.06 |