<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://code.highcharts.com/highcharts.js" /></script>
<script type="text/javascript" src="https://code.highcharts.com/modules/exporting.js" /></script>
<script type="text/javascript">
function getChartData() {
$.ajax({
url: 'http://www.kosmes.or.kr/opendata/portal/openapi/TFINRT?YY=2016&Type=json',
type: 'GET',
dataType: 'json',
success: function (result) {
drawBarChart(result);
},
error: function (result) {}
});
}
function drawBarChart(jsonData) {
var data = jsonData.TFINRT[1].row;
$('#barChart').highcharts({
credits: {enabled: false},
chart: {type: 'column'},
title: {text: data[0].CO_SIZE},
legend: {enabled: false},
xAxis: {type: 'category'},
yAxis: {
title: {
text: ""
}
},
series: [{
name: "",
colorByPoint: true,
data: [{name: "총자본투자효율", y: data[0].INVS_EFFC_RT},
{name: "순이익증가율", y: data[0].NET_PROF_INC_RT},
]
}]
});
}
</script>
<div id="barChart" style="min-width:300px;height:400px;margin:0 auto;"></div>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://code.highcharts.com/highcharts.js" /></script>
<script type="text/javascript" src="https://code.highcharts.com/modules/exporting.js" /></script>
<script type="text/javascript">
function getChartData() {
$.ajax({
url: 'http://www.kosmes.or.kr/opendata/portal/openapi/TFINRT?YY=2016&Type=json',
type: 'GET',
dataType: 'json',
success: function (result) {
drawPieChart(result);
},
error: function (result) {}
});
}
function drawPieChart(jsonData) {
var data = jsonData.TFINRT[1].row;
$('#pieChart').highcharts({
credits: {
enabled: false
},
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: data[0].CO_SIZE
},
tooltip: {
pointFormat: '{series.name}: {point.percentage:.0f}% '
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
showInLegend: true
}
},
series: [{
name: '',
colorByPoint: true,
data: [{
name: '총자본투자효율',
y: data[0].INVS_EFFC_RT
}, {
name: '순이익증가율',
y: data[0].NET_PROF_INC_RT
}]
}]
});
}
</script>
<div id="pieChart" style="min-width:300px;height:400px;margin:0 auto;"></div>
기업규모,총자본투자효율,순이익증가율
기업규모
총자본투자효율
순이익증가율
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script type="text/javascript">
function getChartData() {
$.ajax({
url: 'http://www.kosmes.or.kr/opendata/portal/openapi/TFINRT?YY=2016&Type=json',
type: 'GET',
dataType: 'json',
success: function (result) {
drawGrid(result);
},
error: function (result) {}
});
}
function drawGrid(jsonData) {
var data = jsonData.TFINRT[1].row;
if (data) {
var html = '';
$.each(data, function (i, data) {
html += '';
html += ' ' + data.INVS_EFFC_RT + ' ';
html += ' ' + data.NET_PROF_INC_RT + ' ';
html += ' ';
});
$('#grid').append(html);
}
}
</script>
<table>
<colgroup>
<col width="">
</colgroup>
<thead>
<tr>
<th col="row">총자본투자효율</th>
<th col="row">순이익증가율</th>
</tr>
</thead>
<tbody id="grid">
</tbody>
</table>