1.SW 생산_1)SW산업 생산 현황 (연도별)_그래프(누적세로막대).csv
(단위 : 조 원)
var chart_24;
var chart_type_24 = "stack_column";
jQuery(document).ready(function () {
{"data":{"data":[{"구분":"2019년","패키지SW":"12.2","IT서비스":"37.7","게임SW":"12.0"},{"구분":"2020년","패키지SW":"15.6","IT서비스":"37.0","게임SW":"14.4"},{"구분":"2021년","패키지SW":"17.2","IT서비스":"49.1","게임SW":"18.0"},{"구분":"2022년","패키지SW":"19.2","IT서비스":"52.2","게임SW":"19.2"},{"구분":"2023년(P)_test","패키지SW":"19.5","IT서비스":"52.4","게임SW":"19.2"}]},"use":{"animate":true,"aCrossLine":true,"multiYAxis":false},"animate":{"speed":100},"format":{ "yAxis": "priceDataFormat" },"func": {
"tip": function(tipElement, data, rect) {
var date = data.xaxis;
var tip = '
' + String(data.yaxisname) + ' /' + String(data.yaxis) + '
';
tipElement.html(tip).show();
tipElement.html(tipElement.html()).css({
left: rect.x - (tipElement.width() / 2),
top: rect.y - 38
});
}
}}
var style = {
"main": {
"layout": {
"paddingTop": 57,
"paddingRight": 30,
"color": "#ffffff",
"line": {
"color": "#eaeaea",
"width": 1
}
},
"graph": {
"color": "#fff",
"line": {
"top": {
"color": "#cccccc"
},
"left": {
"width": 0
},
"right": {
"width": 0
},
"bottom": {
"color": "#cccccc"
}
}
},
"crossLine": {
"color": "#465866"
},
"xAxis": {
"paddingTop": 13,
"height": 30,
"text": {
"family": "Nanum Gothic",
"size": 12,
"color": "#333"
},
"line": {
"color": "#e3e3e3",
"width": 1
}
},
"yAxis": {
"line": {
"color": "#cccccc",
"width": 1,
"opacity": 1
},
"text": {
"family": "Nanum Gothic",
"size": 12,
"color": "#333",
"align": "right"
},
"baseAtZero": true
},
"tip": {
"className": "tip"
},
"series": {
"s1": {
"area": {
"normal": {
"color": "#1d64ac",
"over": {
"color": {
"src": "/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/chart/img/over.png"
}
}
}
}
},
"s2": {
"area": {
"normal": {
"color": "#4abfca",
"over": {
"color": {
"src": "/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/chart/img/over.png"
}
}
}
}
},
"s3": {
"area": {
"normal": {
"color": "#f9d33a",
"over": {
"color": {
"src": "/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/chart/img/over.png"
}
}
}
}
},
"s4": {
"area": {
"normal": {
"color": {src:'/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/chart/img/pattern01.png'},
"over": {
"color": {
"src": "/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/chart/img/over.png"
}
}
}
}
},
"s5": {
"area": {
"normal": {
"color": {src:'/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/chart/img/pattern05.png'},
"over": {
"color": {
"src": "/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/chart/img/over.png"
}
}
}
}
},
"s6": {
"area": {
"normal": {
"color":{src:'/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/visual/img/pie_pattern1.png'},
"over": {
"color": {
"src": "/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/chart/img/over.png"
}
}
}
}
},
"s7": {
"area": {
"normal": {
"color":{src:'/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/visual/img/pie_pattern1.png'},
"over": {
"color": {
"src": "/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/chart/img/over.png"
}
}
}
}
},
"s8": {
"area": {
"normal": {
"color": [
[
0,
"#5e93f4"
],
[
100,
"#80abfa"
]
],
"over": {
"color": {
"src": "/lib/webponent/chart/webPonent-Chart-2.0.6/chart/sample/chart/img/over.png"
}
}
}
}
}
}
}
};
var data_24 = data;
var style_24 = style;
var series_24 = series;
if(color_style_24 == undefined){
var color_style_24 = [];
}
if(slider_24 == undefined ){
var slider_24 =true;
}
if (chart_type_24 == "pie") {
chart_24 = webponent.visual.pie.init(jQuery('#webponent_chart_24'), style_24, data_24);
jQuery("#chart_controller").remove();
} else if (chart_type_24 == "tree") {
chart_24 = webponent.visual.treemap.init(jQuery('#webponent_chart_24'), style_24, data_24);
jQuery("#chart_controller").remove();
} else if (chart_type_24 == "horizon") {
chart_24 = webponent.visual.horizon.init(jQuery('#webponent_chart_24'), style_24, data_24);
jQuery("#chart_controller").remove();
} else if (chart_type_24 == "scatter") {
chart_24 = webponent.visual.scatterPlot.init(jQuery('#webponent_chart_24'), style_24, data_24);
jQuery("#chart_controller").remove();
} else {
if(chart_type_24 != "hloc"){
var count =0;
jQuery.each(series_24.main, function (index, value) {
if (index != "type") {
if(chart_type_24 == "line"){
legend_count = count %5;
jQuery("#chart_legends_24").append(legend_style[legend_count][0]+legend_color[count] +legend_style[legend_count][1]+ value.yaxis +'');
}else if(chart_type_24 =="multi_series"){
if(value.series=="line"){
legend_count = count %5;
jQuery("#chart_legends_24").append(legend_style[legend_count][0]+legend_color[count] +legend_style[legend_count][1]+ value.yaxis +'');
}else{
jQuery("#chart_legends_24").append('
' + value.yaxis + '');
}
}else{
if(color_style_24.length){
jQuery("#chart_legends_24").append('
' + value.yaxis + '');
}else{
jQuery("#chart_legends_24").append('
' + value.yaxis + '');
}
}
}
count++;
});
}
chart_24= webponent.chart.init(jQuery('#webponent_chart_24'), data_24, style_24, series_24);
if(slider_24){
if(chart_type_24=="line"||chart_type_24=="column"){
var tmp_x=[];
jQuery("#slider_div_24").attr("style","");
jQuery.each(data_24.data.data,function (index,value){
tmp_x.push(value[Object.keys(value)[0]]);
});
jQuery("#slider-range_24").slider({
range: true,
min: 0,
max: tmp_x.length-1,
values: [ 0, tmp_x.length-1 ],
slide: function( event, ui ) {
jQuery( "#slider-text_24" ).text( "범위 : " + tmp_x[ui.values[ 0 ]] + " - " + tmp_x[ui.values[ 1 ]] );
var tmp_data = JSON.parse(JSON.stringify(data_24)); //object 참조 복사 회피
tmp_data.data.data = tmp_data.data.data.splice(ui.values[ 0 ],ui.values[ 1 ]+1-ui.values[0]);
chart_24.inquery( tmp_data,style_24, series_24);
}
});
jQuery("#slider-text_24").text( "범위 : "+tmp_x[0] + " - " + tmp_x[tmp_x.length-1]);
}
}
}
})