"
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:8690},{d1:"2019",d2:"Administration publique, professions juridiques, armée et police",m1:9530},{d1:"2020",d2:"Administration publique, professions juridiques, armée et police",m1:9050},{d1:"2021",d2:"Administration publique, professions juridiques, armée et police",m1:8210},{d1:"2018",d2:"Agriculture, marine, pêche",m1:3210},{d1:"2019",d2:"Agriculture, marine, pêche",m1:4100},{d1:"2020",d2:"Agriculture, marine, pêche",m1:4650},{d1:"2021",d2:"Agriculture, marine, pêche",m1:4420},{d1:"2018",d2:"Artisanat",m1:210},{d1:"2019",d2:"Artisanat",m1:190},{d1:"2020",d2:"Artisanat",m1:170},{d1:"2021",d2:"Artisanat",m1:170},{d1:"2018",d2:"Banque et assurances",m1:880},{d1:"2019",d2:"Banque et assurances",m1:880},{d1:"2020",d2:"Banque et assurances",m1:810},{d1:"2021",d2:"Banque et assurances",m1:420},{d1:"2018",d2:"Bâtiment, travaux publics",m1:4000},{d1:"2019",d2:"Bâtiment, travaux publics",m1:4180},{d1:"2020",d2:"Bâtiment, travaux publics",m1:4090},{d1:"2021",d2:"Bâtiment, travaux publics",m1:3770},{d1:"2018",d2:"Commerce",m1:15170},{d1:"2019",d2:"Commerce",m1:15740},{d1:"2020",d2:"Commerce",m1:16200},{d1:"2021",d2:"Commerce",m1:16200},{d1:"2018",d2:"Communication, information, art et spectacle",m1:9530},{d1:"2019",d2:"Communication, information, art et spectacle",m1:9370},{d1:"2020",d2:"Communication, information, art et spectacle",m1:9540},{d1:"2021",d2:"Communication, information, art et spectacle",m1:6840},{d1:"2018",d2:"Électricité, électronique",m1:2740},{d1:"2019",d2:"Électricité, électronique",m1:2660},{d1:"2020",d2:"Électricité, électronique",m1:2630},{d1:"2021",d2:"Électricité, électronique",m1:2020},{d1:"2018",d2:"Enseignement, formation",m1:5020},{d1:"2019",d2:"Enseignement, formation",m1:4210},{d1:"2020",d2:"Enseignement, formation",m1:4550},{d1:"2021",d2:"Enseignement, formation",m1:5110},{d1:"2018",d2:"Études et recherche",m1:3720},{d1:"2019",d2:"Études et recherche",m1:3950},{d1:"2020",d2:"Études et recherche",m1:3980},{d1:"2021",d2:"Études et recherche",m1:3750},{d1:"2018",d2:"Gestion, administration des entreprises",m1:27540},{d1:"2019",d2:"Gestion, administration des entreprises",m1:27270},{d1:"2020",d2:"Gestion, administration des entreprises",m1:27200},{d1:"2021",d2:"Gestion, administration des entreprises",m1:25140},{d1:"2018",d2:"Hôtellerie, restauration, alimentation",m1:4430},{d1:"2019",d2:"Hôtellerie, restauration, alimentation",m1:4280},{d1:"2020",d2:"Hôtellerie, restauration, alimentation",m1:4270},{d1:"2021",d2:"Hôtellerie, restauration, alimentation",m1:3950},{d1:"2018",d2:"Industries de process",m1:2920},{d1:"2019",d2:"Industries de process",m1:3330},{d1:"2020",d2:"Industries de process",m1:3700},{d1:"2021",d2:"Industries de process",m1:2080},{d1:"2018",d2:"Informatique et télécommunications",m1:2860},{d1:"2019",d2:"Informatique et télécommunications",m1:3070},{d1:"2020",d2:"Informatique et télécommunications",m1:2750},{d1:"2021",d2:"Informatique et télécommunications",m1:1850},{d1:"2018",d2:"Ingénieurs et cadres de l'industrie",m1:6280},{d1:"2019",d2:"Ingénieurs et cadres de l'industrie",m1:6840},{d1:"2020",d2:"Ingénieurs et cadres de l'industrie",m1:6730},{d1:"2021",d2:"Ingénieurs et cadres de l'industrie",m1:6050},{d1:"2018",d2:"Maintenance",m1:4690},{d1:"2019",d2:"Maintenance",m1:4530},{d1:"2020",d2:"Maintenance",m1:4500},{d1:"2021",d2:"Maintenance",m1:4510},{d1:"2018",d2:"Matériaux souples, bois, industries graphiques",m1:1250},{d1:"2019",d2:"Matériaux souples, bois, industries graphiques",m1:1250},{d1:"2020",d2:"Matériaux souples, bois, industries graphiques",m1:1210},{d1:"2021",d2:"Matériaux souples, bois, industries graphiques",m1:1210},{d1:"2018",d2:"Mécanique, travail des métaux",m1:1920},{d1:"2019",d2:"Mécanique, travail des métaux",m1:1920},{d1:"2020",d2:"Mécanique, travail des métaux",m1:2000},{d1:"2021",d2:"Mécanique, travail des métaux",m1:1810},{d1:"2018",d2:"Santé, action sociale, culturelle et sportive",m1:27390},{d1:"2019",d2:"Santé, action sociale, culturelle et sportive",m1:28190},{d1:"2020",d2:"Santé, action sociale, culturelle et sportive",m1:27890},{d1:"2021",d2:"Santé, action sociale, culturelle et sportive",m1:27140},{d1:"2018",d2:"Services aux particuliers et aux collectivités",m1:6550},{d1:"2019",d2:"Services aux particuliers et aux collectivités",m1:6370},{d1:"2020",d2:"Services aux particuliers et aux collectivités",m1:6380},{d1:"2021",d2:"Services aux particuliers et aux collectivités",m1:5680},{d1:"2018",d2:"Transports, logistique et tourisme",m1:4280},{d1:"2019",d2:"Transports, logistique et tourisme",m1:4510},{d1:"2020",d2:"Transports, logistique et tourisme",m1:4560},{d1:"2021",d2:"Transports, logistique et tourisme",m1:4290},]
};
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",27540],["Santé, action sociale, culturelle et sportive",27390],["Commerce",15170],["Communication, information, art et spectacle",9530],["Administration publique, professions juridiques, armée et police",8690],["Services aux particuliers et aux collectivités",6550],["Ingénieurs et cadres de l'industrie",6280],["Enseignement, formation",5020],["Maintenance",4690],["Hôtellerie, restauration, alimentation",4430],["Transports, logistique et tourisme",4280],["Bâtiment, travaux publics",4000],["Études et recherche",3720],["Agriculture, marine, pêche",3210],["Industries de process",2920],["Informatique et télécommunications",2860],["Électricité, électronique",2740],["Mécanique, travail des métaux",1920],["Matériaux souples, bois, industries graphiques",1250],["Banque et assurances",880],["Artisanat",210],];
mydata["2019"] = [["Santé, action sociale, culturelle et sportive",28190],["Gestion, administration des entreprises",27270],["Commerce",15740],["Administration publique, professions juridiques, armée et police",9530],["Communication, information, art et spectacle",9370],["Ingénieurs et cadres de l'industrie",6840],["Services aux particuliers et aux collectivités",6370],["Maintenance",4530],["Transports, logistique et tourisme",4510],["Hôtellerie, restauration, alimentation",4280],["Enseignement, formation",4210],["Bâtiment, travaux publics",4180],["Agriculture, marine, pêche",4100],["Études et recherche",3950],["Industries de process",3330],["Informatique et télécommunications",3070],["Électricité, électronique",2660],["Mécanique, travail des métaux",1920],["Matériaux souples, bois, industries graphiques",1250],["Banque et assurances",880],["Artisanat",190],];
mydata["2020"] = [["Santé, action sociale, culturelle et sportive",27890],["Gestion, administration des entreprises",27200],["Commerce",16200],["Communication, information, art et spectacle",9540],["Administration publique, professions juridiques, armée et police",9050],["Ingénieurs et cadres de l'industrie",6730],["Services aux particuliers et aux collectivités",6380],["Agriculture, marine, pêche",4650],["Transports, logistique et tourisme",4560],["Enseignement, formation",4550],["Maintenance",4500],["Hôtellerie, restauration, alimentation",4270],["Bâtiment, travaux publics",4090],["Études et recherche",3980],["Industries de process",3700],["Informatique et télécommunications",2750],["Électricité, électronique",2630],["Mécanique, travail des métaux",2000],["Matériaux souples, bois, industries graphiques",1210],["Banque et assurances",810],["Artisanat",170],];
mydata["2021"] = [["Santé, action sociale, culturelle et sportive",27140],["Gestion, administration des entreprises",25140],["Commerce",16200],["Administration publique, professions juridiques, armée et police",8210],["Communication, information, art et spectacle",6840],["Ingénieurs et cadres de l'industrie",6050],["Services aux particuliers et aux collectivités",5680],["Enseignement, formation",5110],["Maintenance",4510],["Agriculture, marine, pêche",4420],["Transports, logistique et tourisme",4290],["Hôtellerie, restauration, alimentation",3950],["Bâtiment, travaux publics",3770],["Études et recherche",3750],["Industries de process",2080],["Électricité, électronique",2020],["Informatique et télécommunications",1850],["Mécanique, travail des métaux",1810],["Matériaux souples, bois, industries graphiques",1210],["Banque et assurances",420],["Artisanat",170],];
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);
}