산업별 평균 급여 추이_그래프
(단위 : 만원)
var chart_36;
var chart_type_36 = "line";
jQuery(document).ready(function () {
{"data":{"data":[{"구분":"2020년","패키지SW":"4131","IT서비스":"4738","게임SW":"5284","인터넷SW(정보서비스)":"4963"},{"구분":"2021년","패키지SW":"4091","IT서비스":"5298","게임SW":"5926","인터넷SW(정보서비스)":"4930"},{"구분":"2022년","패키지SW":"3685","IT서비스":"5258","게임SW":"6047","인터넷SW(정보서비스)":"6152"}]},"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: {
graph: {
color: graph_color,
line: {
top: {color: '#cccccc'},
left: {width: 0},
right: {width: 0},
bottom: {color: '#cccccc'}
}
},
layout: {
paddingTop: 57,
paddingRight: 30,
color: layout_color,
line: {color: '#eaeaea', width: 1}
},
crossLine: {
color: '#465866'
},
xAxis: {
paddingTop: 13, height: 30,
text: {family: 'Nanum Gothic', size: 12, color: '#666'},
line: {color: '#e3e3e3', width: 1}
},
yAxis: {
line: {color: '#cccccc', width: 1, opacity: 1},
text: {family: 'Nanum Gothic', size: 12, color: '#666', align: 'right'}
},
tip: {
className: 'tip'
},
series: {
s1: {
line: {
normal: {
color: legend_color[0], width: 3,
over: over_img
}
},
tick: {
style: 'circle', size: 5, overSize: 1.5,
area: {
normal: {color: '#fff', over: {color: '#fff'}}
},
line: {
normal: {color:legend_color[0], width: 3}
}
}
},
s2: {
line: {
normal: {
color: legend_color[1], width: 3,
over: over_img
}
},
tick: {
style: 'square', size: 5, overSize: 1.5,
area: {
normal: {color: '#fff', over: {color: '#fff'}}
},
line: {
normal: {color: legend_color[1], width: 3}
}
}
},
s3: {
line: {
normal: {
color: legend_color[2], width: 3,
over: over_img
}
},
tick: {
style: 'triangle', size: 5, overSize: 1.5,
area: {
normal: {color: '#fff', over: {color: '#fff'}}
},
line: {
normal: {color: legend_color[2], width: 3}
}
}
},
s4: {
line: {
normal: {
color: legend_color[3], width: 3,
over: over_img
}
},
tick: {
style: 'star', size: 5, overSize: 1.5,
area: {
normal: {color: '#fff', over: {color: '#fff'}}
},
line: {
normal: {color: legend_color[3], width: 3}
}
}
},
s5: {
line: {
normal: {
color: legend_color[4], width: 3,
over: over_img
}
},
tick: {
style: 'diamond', size: 5, overSize: 1.5,
area: {
normal: {color: '#fff', over: {color: '#fff'}}
},
line: {
normal: {color: legend_color[4], width: 3}
}
}
},
s6: {
line: {
normal: {
color: legend_color[5], width: 3,
over: over_img
}
},
tick: {
style: 'circle', size: 5, overSize: 1.5,
area: {
normal: {color: '#fff', over: {color: '#fff'}}
},
line: {
normal: {color: legend_color[5], width: 3}
}
}
},
s7: {
line: {
normal: {
color: legend_color[6], width: 3,
over: over_img
}
},
tick: {
style: 'square', size: 5, overSize: 1.5,
area: {
normal: {color: '#fff', over: {color: '#fff'}}
},
line: {
normal: {color: legend_color[6], width: 3}
}
}
}
}
}
};
var data_36 = data;
var style_36 = style;
var series_36 = series;
if(color_style_36 == undefined){
var color_style_36 = [];
}
if(slider_36 == undefined ){
var slider_36 =true;
}
if (chart_type_36 == "pie") {
chart_36 = webponent.visual.pie.init(jQuery('#webponent_chart_36'), style_36, data_36);
jQuery("#chart_controller").remove();
} else if (chart_type_36 == "tree") {
chart_36 = webponent.visual.treemap.init(jQuery('#webponent_chart_36'), style_36, data_36);
jQuery("#chart_controller").remove();
} else if (chart_type_36 == "horizon") {
chart_36 = webponent.visual.horizon.init(jQuery('#webponent_chart_36'), style_36, data_36);
jQuery("#chart_controller").remove();
} else if (chart_type_36 == "scatter") {
chart_36 = webponent.visual.scatterPlot.init(jQuery('#webponent_chart_36'), style_36, data_36);
jQuery("#chart_controller").remove();
} else {
if(chart_type_36 != "hloc"){
var count =0;
jQuery.each(series_36.main, function (index, value) {
if (index != "type") {
if(chart_type_36 == "line"){
legend_count = count %5;
jQuery("#chart_legends_36").append(legend_style[legend_count][0]+legend_color[count] +legend_style[legend_count][1]+ value.yaxis +'');
}else if(chart_type_36 =="multi_series"){
if(value.series=="line"){
legend_count = count %5;
jQuery("#chart_legends_36").append(legend_style[legend_count][0]+legend_color[count] +legend_style[legend_count][1]+ value.yaxis +'');
}else{
jQuery("#chart_legends_36").append('
' + value.yaxis + '');
}
}else{
if(color_style_36.length){
jQuery("#chart_legends_36").append('
' + value.yaxis + '');
}else{
jQuery("#chart_legends_36").append('
' + value.yaxis + '');
}
}
}
count++;
});
}
chart_36= webponent.chart.init(jQuery('#webponent_chart_36'), data_36, style_36, series_36);
if(slider_36){
if(chart_type_36=="line"||chart_type_36=="column"){
var tmp_x=[];
jQuery("#slider_div_36").attr("style","");
jQuery.each(data_36.data.data,function (index,value){
tmp_x.push(value[Object.keys(value)[0]]);
});
jQuery("#slider-range_36").slider({
range: true,
min: 0,
max: tmp_x.length-1,
values: [ 0, tmp_x.length-1 ],
slide: function( event, ui ) {
jQuery( "#slider-text_36" ).text( "범위 : " + tmp_x[ui.values[ 0 ]] + " - " + tmp_x[ui.values[ 1 ]] );
var tmp_data = JSON.parse(JSON.stringify(data_36)); //object 참조 복사 회피
tmp_data.data.data = tmp_data.data.data.splice(ui.values[ 0 ],ui.values[ 1 ]+1-ui.values[0]);
chart_36.inquery( tmp_data,style_36, series_36);
}
});
jQuery("#slider-text_36").text( "범위 : "+tmp_x[0] + " - " + tmp_x[tmp_x.length-1]);
}
}
}
})