"
var div_menu_n4v = "";
var content_data = {
title: "Vue des données",
width: 362.4000000000824,
height: 392.8000000000893,
pagination: "",
duration: 800,
container: "#container",
headers: ["d1|Année référence ou entrée","d2|FAP1_LIB","m1|Effectif tot",],
locale: "fr",
mes_fmt: {"Effectif tot":{"title":"Inscrits en dernière année","precision":"0","unit":""}},
thousand: " ",
decimal: ".",
data: [{d1:"2018",d2:"Administration publique, professions juridiques, armée et police",m1:8448.10552242699},{d1:"2019",d2:"Administration publique, professions juridiques, armée et police",m1:9287.94071146245},{d1:"2020",d2:"Administration publique, professions juridiques, armée et police",m1:9009.08296006412},{d1:"2021",d2:"Administration publique, professions juridiques, armée et police",m1:8096.36267827482},{d1:"2018",d2:"Agriculture, marine, pêche",m1:3210.15118133129},{d1:"2019",d2:"Agriculture, marine, pêche",m1:4100},{d1:"2020",d2:"Agriculture, marine, pêche",m1:4646},{d1:"2021",d2:"Agriculture, marine, pêche",m1:4419.6955450888},{d1:"2018",d2:"Artisanat",m1:210},{d1:"2019",d2:"Artisanat",m1:194},{d1:"2020",d2:"Artisanat",m1:171},{d1:"2021",d2:"Artisanat",m1:167},{d1:"2018",d2:"Banque et assurances",m1:884},{d1:"2019",d2:"Banque et assurances",m1:876},{d1:"2020",d2:"Banque et assurances",m1:805.872146118722},{d1:"2021",d2:"Banque et assurances",m1:424.417601154174},{d1:"2018",d2:"Bâtiment, travaux publics",m1:3950.08345533116},{d1:"2019",d2:"Bâtiment, travaux publics",m1:4143.92763915046},{d1:"2020",d2:"Bâtiment, travaux publics",m1:4045},{d1:"2021",d2:"Bâtiment, travaux publics",m1:3734.96832579186},{d1:"2018",d2:"Commerce",m1:15172.2543522286},{d1:"2019",d2:"Commerce",m1:15738.2410880511},{d1:"2020",d2:"Commerce",m1:16200.4180101336},{d1:"2021",d2:"Commerce",m1:16203.4020000047},{d1:"2018",d2:"Communication, information, art et spectacle",m1:9530.30436266257},{d1:"2019",d2:"Communication, information, art et spectacle",m1:9367.98692768801},{d1:"2020",d2:"Communication, information, art et spectacle",m1:9536.73076923077},{d1:"2021",d2:"Communication, information, art et spectacle",m1:6837.96988078073},{d1:"2018",d2:"Électricité, électronique",m1:2737.99552429668},{d1:"2019",d2:"Électricité, électronique",m1:2661.05710404766},{d1:"2020",d2:"Électricité, électronique",m1:2625.54717685283},{d1:"2021",d2:"Électricité, électronique",m1:2019.06616080048},{d1:"2018",d2:"Enseignement, formation",m1:5020.9214237703},{d1:"2019",d2:"Enseignement, formation",m1:4211.9776753981},{d1:"2020",d2:"Enseignement, formation",m1:4545.81334237249},{d1:"2021",d2:"Enseignement, formation",m1:5114.37774066867},{d1:"2018",d2:"Études et recherche",m1:3720.12276214834},{d1:"2019",d2:"Études et recherche",m1:3949.92763915046},{d1:"2020",d2:"Études et recherche",m1:3975.64305784036},{d1:"2021",d2:"Études et recherche",m1:3747.48391718183},{d1:"2018",d2:"Gestion, administration des entreprises",m1:27543.663294222},{d1:"2019",d2:"Gestion, administration des entreprises",m1:27268.9472908366},{d1:"2020",d2:"Gestion, administration des entreprises",m1:27201.1378222558},{d1:"2021",d2:"Gestion, administration des entreprises",m1:25135.4232890875},{d1:"2018",d2:"Hôtellerie, restauration, alimentation",m1:4430.02841918295},{d1:"2019",d2:"Hôtellerie, restauration, alimentation",m1:4275},{d1:"2020",d2:"Hôtellerie, restauration, alimentation",m1:4272},{d1:"2021",d2:"Hôtellerie, restauration, alimentation",m1:3948.96832579186},{d1:"2018",d2:"Industries de process",m1:2918.85920102847},{d1:"2019",d2:"Industries de process",m1:3334.00111884178},{d1:"2020",d2:"Industries de process",m1:3698.78903731},{d1:"2021",d2:"Industries de process",m1:2084.96408073049},{d1:"2018",d2:"Informatique et télécommunications",m1:2858.8337151331},{d1:"2019",d2:"Informatique et télécommunications",m1:3068.37782751741},{d1:"2020",d2:"Informatique et télécommunications",m1:2746.47430435131},{d1:"2021",d2:"Informatique et télécommunications",m1:1849.89758987946},{d1:"2018",d2:"Ingénieurs et cadres de l'industrie",m1:6277.21845615513},{d1:"2019",d2:"Ingénieurs et cadres de l'industrie",m1:6841.76396469159},{d1:"2020",d2:"Ingénieurs et cadres de l'industrie",m1:6726.75222412318},{d1:"2021",d2:"Ingénieurs et cadres de l'industrie",m1:6048.16882327015},{d1:"2018",d2:"Maintenance",m1:4687.17960051423},{d1:"2019",d2:"Maintenance",m1:4526.90599642415},{d1:"2020",d2:"Maintenance",m1:4501.10840916592},{d1:"2021",d2:"Maintenance",m1:4510.78837209302},{d1:"2018",d2:"Matériaux souples, bois, industries graphiques",m1:1254},{d1:"2019",d2:"Matériaux souples, bois, industries graphiques",m1:1248},{d1:"2020",d2:"Matériaux souples, bois, industries graphiques",m1:1207},{d1:"2021",d2:"Matériaux souples, bois, industries graphiques",m1:1205},{d1:"2018",d2:"Mécanique, travail des métaux",m1:1919.85999813032},{d1:"2019",d2:"Mécanique, travail des métaux",m1:1920.90599642415},{d1:"2020",d2:"Mécanique, travail des métaux",m1:2001.04590916592},{d1:"2021",d2:"Mécanique, travail des métaux",m1:1811},{d1:"2018",d2:"Santé, action sociale, culturelle et sportive",m1:27087.5905122917},{d1:"2019",d2:"Santé, action sociale, culturelle et sportive",m1:27894.2063894726},{d1:"2020",d2:"Santé, action sociale, culturelle et sportive",m1:27589.0246448395},{d1:"2021",d2:"Santé, action sociale, culturelle et sportive",m1:26775.9385825625},{d1:"2018",d2:"Services aux particuliers et aux collectivités",m1:6551},{d1:"2019",d2:"Services aux particuliers et aux collectivités",m1:6365},{d1:"2020",d2:"Services aux particuliers et aux collectivités",m1:6383},{d1:"2021",d2:"Services aux particuliers et aux collectivités",m1:5678.55555555556},{d1:"2018",d2:"Transports, logistique et tourisme",m1:4280.97196261682},{d1:"2019",d2:"Transports, logistique et tourisme",m1:4508.04236006051},{d1:"2020",d2:"Transports, logistique et tourisme",m1:4563.73753073411},{d1:"2021",d2:"Transports, logistique et tourisme",m1:4285.66387088066},]
};
function UpdateFSIcon(){
var titfs_href = document.getElementById("fshref_n4v");
document.addEventListener("fullscreenchange", function( event ) {
if ( !document.fullscreen ){
document.getElementById("n4v_fs_button").style.backgroundImage="url(https://graphebo.via-competences.fr/N4VCustomElements/res/css/images/n4v_fullscreen.svg)";
titfs_href.title= "Vue plein écran";
}
else {
document.getElementById("n4v_fs_button").style.backgroundImage="url(https://graphebo.via-competences.fr/N4VCustomElements/res/css/images/n4v_minscreen.svg)";
titfs_href.title= "Quitter plein écran";
}
});
}
//setWebiLinked(document);
$(function () {
Dessin_graph();
});
function Dessin_graph(){
var per_init = 0;
var mydata = [];
var flags=[];
var periodes=['2018','2019','2020','2021',];
var periodes_name=[Date.UTC(2018),Date.UTC(2019),Date.UTC(2020),Date.UTC(2021),];
const time = new Highcharts.Time();
mydata["2018"] = [["Gestion, administration des entreprises",27543.663294222],["Santé, action sociale, culturelle et sportive",27087.5905122917],["Commerce",15172.2543522286],["Communication, information, art et spectacle",9530.30436266257],["Administration publique, professions juridiques, armée et police",8448.10552242699],["Services aux particuliers et aux collectivités",6551],["Ingénieurs et cadres de l'industrie",6277.21845615513],["Enseignement, formation",5020.9214237703],["Maintenance",4687.17960051423],["Hôtellerie, restauration, alimentation",4430.02841918295],["Transports, logistique et tourisme",4280.97196261682],["Bâtiment, travaux publics",3950.08345533116],["Études et recherche",3720.12276214834],["Agriculture, marine, pêche",3210.15118133129],["Industries de process",2918.85920102847],["Informatique et télécommunications",2858.8337151331],["Électricité, électronique",2737.99552429668],["Mécanique, travail des métaux",1919.85999813032],["Matériaux souples, bois, industries graphiques",1254],["Banque et assurances",884],["Artisanat",210],];
mydata["2019"] = [["Santé, action sociale, culturelle et sportive",27894.2063894726],["Gestion, administration des entreprises",27268.9472908366],["Commerce",15738.2410880511],["Communication, information, art et spectacle",9367.98692768801],["Administration publique, professions juridiques, armée et police",9287.94071146245],["Ingénieurs et cadres de l'industrie",6841.76396469159],["Services aux particuliers et aux collectivités",6365],["Maintenance",4526.90599642415],["Transports, logistique et tourisme",4508.04236006051],["Hôtellerie, restauration, alimentation",4275],["Enseignement, formation",4211.9776753981],["Bâtiment, travaux publics",4143.92763915046],["Agriculture, marine, pêche",4100],["Études et recherche",3949.92763915046],["Industries de process",3334.00111884178],["Informatique et télécommunications",3068.37782751741],["Électricité, électronique",2661.05710404766],["Mécanique, travail des métaux",1920.90599642415],["Matériaux souples, bois, industries graphiques",1248],["Banque et assurances",876],["Artisanat",194],];
mydata["2020"] = [["Santé, action sociale, culturelle et sportive",27589.0246448395],["Gestion, administration des entreprises",27201.1378222558],["Commerce",16200.4180101336],["Communication, information, art et spectacle",9536.73076923077],["Administration publique, professions juridiques, armée et police",9009.08296006412],["Ingénieurs et cadres de l'industrie",6726.75222412318],["Services aux particuliers et aux collectivités",6383],["Agriculture, marine, pêche",4646],["Transports, logistique et tourisme",4563.73753073411],["Enseignement, formation",4545.81334237249],["Maintenance",4501.10840916592],["Hôtellerie, restauration, alimentation",4272],["Bâtiment, travaux publics",4045],["Études et recherche",3975.64305784036],["Industries de process",3698.78903731],["Informatique et télécommunications",2746.47430435131],["Électricité, électronique",2625.54717685283],["Mécanique, travail des métaux",2001.04590916592],["Matériaux souples, bois, industries graphiques",1207],["Banque et assurances",805.872146118722],["Artisanat",171],];
mydata["2021"] = [["Santé, action sociale, culturelle et sportive",26775.9385825625],["Gestion, administration des entreprises",25135.4232890875],["Commerce",16203.4020000047],["Administration publique, professions juridiques, armée et police",8096.36267827482],["Communication, information, art et spectacle",6837.96988078073],["Ingénieurs et cadres de l'industrie",6048.16882327015],["Services aux particuliers et aux collectivités",5678.55555555556],["Enseignement, formation",5114.37774066867],["Maintenance",4510.78837209302],["Agriculture, marine, pêche",4419.6955450888],["Transports, logistique et tourisme",4285.66387088066],["Hôtellerie, restauration, alimentation",3948.96832579186],["Études et recherche",3747.48391718183],["Bâtiment, travaux publics",3734.96832579186],["Industries de process",2084.96408073049],["Électricité, électronique",2019.06616080048],["Informatique et télécommunications",1849.89758987946],["Mécanique, travail des métaux",1811],["Matériaux souples, bois, industries graphiques",1205],["Banque et assurances",424.417601154174],["Artisanat",167],];
var icons=[];
function getData(period) {
var initialData = mydata[period];
let output = initialData.map( (x) => x);
return output;
}
Highcharts.AST.allowedReferences.push("javascript:");
Highcharts.setOptions({
lang: {
thousandsSep: " ",
decimalPoint: ".",
accessibility:{
chartContainerLabel: "{title}",
svgContainerLabel: "{title}",
},
},
colors : ["#491547","#985092","#D1BCDC","#005E5E","#00A6A5","#B2DDDF","#FCD12D","#F9B524",]
});
var chart = Highcharts.chart("container", {
chart: {
animation: {duration: 900},
marginRight: 50,
backgroundColor: "#ffffff",
style: {
"fontFamily": "Lucida Sans Unicode",
"fontSize": "15px"
},
},
title: {
text: "",
style:{ color: "#000000",
fontFamily: "arial",
fontSize: "12px",
fontWeight: "normal",
textDecoration: "none",
fontStyle: "normal" },
widthAdjust: -44,
align: "center"
},
subtitle: {
text: "",
style:{ color: "#848284",
fontFamily: "arial",
fontSize: "10px",
fontWeight: "normal",
textDecoration: "none",
fontStyle: "normal" },
widthAdjust: -44,
align: "center"
},
xAxis: {
type: "category",
gridLineWidth: 0,
gridLineColor : "#e6e6e6",
lineWidth: 1,
lineColor : "#e6e6e6",
max: 20,
title: {text:"",
useHTML: true,
style:{ color: "#848284",
fontFamily: "arial",
fontSize: "12px",
fontWeight: "normal",
textDecoration: "none",
fontStyle: "normal" }
},
labels: {
useHTML: true,
animate: true,
enabled : true,
formatter: ctx => {
return ctx.value; },
style: {
textAlign: "center"
},
style: {color: "#848284",
fontFamily: "arial",
fontSize: "12px",
fontWeight: "normal",
textDecoration: "none",
fontStyle: "normal" }
}
},
yAxis: {
labels: {
style: {color: "#848284ff",
fontFamily: "arial",
fontSize: "12px",
fontWeight: "normal",
fontStyle: "normal" },
enabled : true
},
opposite: false,
endOnTick: true,
gridLineWidth: 1,
gridLineColor : "#e6e6e6",
lineWidth: 1,
lineColor : "#e6e6e6",
title: {text:"",
useHTML: true,
style:{ color: "#848284ff",
fontFamily: "arial",
fontSize: "12px",
fontWeight: "normal",
textDecoration: "none",
fontStyle: "normal" }
},
},
legend: {
align: "right",
verticalAlign: "bottom",
itemStyle: {color: "#848284",
fontFamily: "arial",
fontWeight: "bold",
fontSize: "12px",
textDecoration: "none",
fontStyle: "normal"
},
symbolHeight: 0.001,
symbolWidth: 0.001,
symbolRadius: 0.001,
},
plotOptions: {
series: {
animation: false,
events: {
legendItemClick: function(e) {
e.preventDefault();
}
},
groupPadding: 0,
pointPadding: 0.1,
borderWidth: 0,
borderRadius: 0,
},
},
tooltip: {
headerFormat: '{series.name}
',
pointFormat: '
{point.name}
\u25CF Inscrits en dernière année : {point.y}
',
borderWidth: 1,
valueDecimals: 0,
valuePrefix: '',
valueSuffix: ''
},
series: [{
colorByPoint: true,
dataSorting: {
enabled: true,
matchByName: true
},
type: "bar",
dataLabels: [{
enabled: true,
inside: false,
useHTML: true,
formatter: function () {
return ""+Highcharts.numberFormat(this.point.y,0,"."," ")+""; },
style:{ color: "#848284",
fontFamily: "arial",
fontSize: "11px",
fontWeight: "normal",
textDecoration: "none",
textOutline: "1px contrast",
fontStyle: "normal" }
}],
name: time.dateFormat("%Y",periodes_name[0]),
data: getData(periodes[0])
}],
});
$("#container").append(div_menu_btn);
const btn = document.getElementById("play-pause-button"),
btn_stop = document.getElementById("stop-button"),
bubble = document.getElementById("bubble"),
input = document.getElementById("play-range");
function update(increment) {
bubble.style.display = "none";
if(increment == 0){
per_init=0;
pause(btn);
input.value=0;
}else if(increment == 1){
per_init++
if (per_init < periodes.length){
input.value = per_init;
}else{
update(0);
play(btn);
}
}
else{
per_init = input.value;
}
if (per_init < periodes.length){
chart.series[0].update({
name: time.dateFormat("%Y",periodes_name[per_init]),
data: getData(periodes[per_init])
});
}
}
function play(button) {
button.title = "pause";
button.className = "pause_button";
chart.sequenceTimer = setInterval(function() {
update(1);
}, 1000);
}
function pause(button) {
button.title = "play";
button.className = "play_button";
clearTimeout(chart.sequenceTimer);
chart.sequenceTimer = undefined;
}
var el, newPoint, newPlace, offset;
$("input[type=range]").on("input", function () {
$(this).trigger("change");
});
$("input[type=range]").change(function() {
bubble.style.display = "inline-block";
el = $(this);
width = el.width();
newPoint = (el.val() - el.attr("min")) / (el.attr("max") - el.attr("min"));
offset = -1;
if (newPoint < 0) { newPlace = 0; }
else if (newPoint > 1) { newPlace = width; }
else { newPlace = width * newPoint + offset; offset -= newPoint; }
el
.next("output")
.css({
left: newPlace,
marginLeft: offset + "%"
})
.text(time.dateFormat("%Y",periodes_name[el.val()]));
})
btn.addEventListener("click", function() {
if (chart.sequenceTimer) {
pause(this)
} else {
play(this)
}
})
btn_stop.addEventListener("click", function() {
update(0);
})
input.addEventListener("click", function() {
pause(btn);
update(2)
})
$("#container").append(div_menu_n4v);
UpdateFSIcon();
play(btn);
}