[Google] Pie Chart 원형 챠트 > 기술자료

본문 바로가기

사이트 내 전체검색

[Google] Pie Chart 원형 챠트 > 기술자료

JavaScript [Google] Pie Chart 원형 챠트

페이지 정보


본문

<%
dim good_mny1, good_mny2
sql = "select sum(convert(int,good_mny)) from dg_kcp where card_gubun='ticket' and card_cd <> '' and mb_no = '"& session("ss_mb_no") &"' "
set rs = conn.execute(sql)
If Rs.BOF or Rs.EOF Then 
Else 
  good_mny1 = rs(0)
  if good_mny1 > 0 or good_mny1 < 0 then 
  else
    good_mny1 = 0 
  end if
  'response.write "good_mny1 = "& good_mny1 &"<br />"
end if
rs.close
 
sql = "select sum(convert(int,good_mny)) from dg_kcp where mb_no = '"& session("mb_no") &"' "
set rs = conn.execute(sql)
If Rs.BOF or Rs.EOF Then 
Else 
  good_mny2 = rs(0)
  if good_mny2 > 0 or good_mny2 < 0 then 
  else
    good_mny2 = 0 
  end if
  'response.write "good_mny2 = -"& good_mny2 &"-<br />"
end if
rs.close
%>
<script type="text/javascript">
  // Load the Visualization API and the piechart package.
  google.load('visualization', '1.0', {'packages':['corechart']});
 
  // Set a callback to run when the Google Visualization API is loaded.
  google.setOnLoadCallback(drawChart);
 
  // Callback that creates and populates a data table,
  // instantiates the pie chart, passes in the data and
  // draws it.
  function drawChart() {
    // Create the data table.
    var data = new google.visualization.DataTable();
    data.addColumn('string', 'Topping');
    data.addColumn('number', 'Slices');
    data.addRows([
      ['신용카드', <% response.write good_mny1 %>],
      ['계좌이체', <% response.write good_mny2 %>],
    ]);
    
    // Set chart options
    var options = {'title':'티켓 판매',
                    'width':330,
                    'height':330};
    // Instantiate and draw our chart, passing in some options.
    var chart = new google.visualization.PieChart(document.getElementById('chart_div_PieChart'));
    chart.draw(data, options);
  }
</script>
<table border="1"><tr><td><div id="chart_div_PieChart"></div></td></tr></table>


참고자료
https://google-developers.appspot.com/chart/interactive/docs/gallery/piechart

댓글목록

등록된 댓글이 없습니다.


Total 198건 3 페이지
  • RSS
기술자료 목록
158
ClassicASP   19153  2013-04-26 09:13  
157
ClassicASP   22725  2013-04-07 02:12  
156
ClassicASP   16518  2013-03-26 22:55 ~ 2020-05-05 13:10  
155
ClassicASP   23018  2013-03-07 22:16 ~ 2015-12-02 00:00  
154
ClassicASP   18266  2013-02-13 21:34  
153
ClassicASP   17488  2013-02-05 11:38 ~ 2014-04-28 00:00  
152
ClassicASP   24415  2013-02-04 17:56  
151
ClassicASP   23250  2013-02-02 14:28  
150
ClassicASP   20495  2013-02-01 20:56  
149
ClassicASP   18221  2013-01-31 02:14  
148
ClassicASP   15720  2012-11-16 21:44 ~ 2012-11-17 00:00  
147
ClassicASP   13990  2012-11-16 21:20  
146
ClassicASP   21333  2012-11-14 20:00  
145
ClassicASP   22774  2012-11-14 19:52 ~ 2016-01-26 00:00  
144
ClassicASP   18131  2012-10-23 00:30 ~ 2014-08-13 00:00  
143
ClassicASP   22022  2012-09-07 19:53  
142
ClassicASP   18954  2012-09-07 19:38  
141
ClassicASP   24491  2012-08-23 19:16 ~ 2013-12-20 00:00  
140
ClassicASP   14598  2012-06-23 23:01  
139
ClassicASP   19451  2012-06-13 13:37  

검색

해피정닷컴 정보

회사소개 회사연혁 협력사 오시는길 서비스 이용약관 개인정보 처리방침

회사명: 해피정닷컴   대표: 정창용   전화: 070-7600-3500   팩스: 042-670-8272
주소: (34368) 대전시 대덕구 대화로 160 대전산업용재유통단지 1동 222호
개인정보보호책임자: 정창용   사업자번호: 119-05-36414
통신판매업신고: 제2024-대전대덕-0405호 [사업자등록확인]  
Copyright 2001~2026 해피정닷컴. All Rights Reserved.