"
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|Annee","d2|FAP1_Lib","m1|Effectifs",],
locale: "fr",
mes_fmt: {"Effectifs":{"title":"Nb de postes","precision":"1","unit":" milliers","unitsuf":true}},
thousand: " ",
decimal: ".",
data: [{d1:"2019",d2:"Administration publique, professions juridiques, armée et police",m1:210.544889734982},{d1:"2030",d2:"Administration publique, professions juridiques, armée et police",m1:268.734725409653},{d1:"2019",d2:"Agriculture, marine, pêche",m1:92.8403843287476},{d1:"2030",d2:"Agriculture, marine, pêche",m1:124.998160481721},{d1:"2019",d2:"Banque et assurances",m1:71.1057001765272},{d1:"2030",d2:"Banque et assurances",m1:82.3502504327528},{d1:"2019",d2:"Bâtiment, travaux publics",m1:242.666737402595},{d1:"2030",d2:"Bâtiment, travaux publics",m1:328.027681909247},{d1:"2019",d2:"Commerce",m1:365.550054571722},{d1:"2030",d2:"Commerce",m1:487.350691936253},{d1:"2019",d2:"Communication, information, art et spectacle",m1:63.2717054641571},{d1:"2030",d2:"Communication, information, art et spectacle",m1:82.6119034336161},{d1:"2019",d2:"Électricité, électronique",m1:32.6060108790099},{d1:"2030",d2:"Électricité, électronique",m1:41.0115580734769},{d1:"2019",d2:"Enseignement, formation",m1:150.222955971987},{d1:"2030",d2:"Enseignement, formation",m1:197.605687558974},{d1:"2019",d2:"Études et recherche",m1:59.8436776683579},{d1:"2030",d2:"Études et recherche",m1:83.1746447516771},{d1:"2019",d2:"Gestion, administration des entreprises",m1:298.029912675813},{d1:"2030",d2:"Gestion, administration des entreprises",m1:384.921601950228},{d1:"2019",d2:"Hôtellerie, restauration, alimentation",m1:149.742546567071},{d1:"2030",d2:"Hôtellerie, restauration, alimentation",m1:191.800998032059},{d1:"2019",d2:"Industries de process",m1:106.591401977253},{d1:"2030",d2:"Industries de process",m1:139.544206956409},{d1:"2019",d2:"Informatique et télécommunications",m1:78.4297976203404},{d1:"2030",d2:"Informatique et télécommunications",m1:108.937853427625},{d1:"2019",d2:"Ingénieurs et cadres de l'industrie",m1:43.5355413480265},{d1:"2030",d2:"Ingénieurs et cadres de l'industrie",m1:65.3854787370775},{d1:"2019",d2:"Maintenance",m1:113.994348396913},{d1:"2030",d2:"Maintenance",m1:146.782096607545},{d1:"2019",d2:"Matériaux souples, bois, industries graphiques",m1:42.2418360429146},{d1:"2030",d2:"Matériaux souples, bois, industries graphiques",m1:58.2682014726463},{d1:"2019",d2:"Mécanique, travail des métaux",m1:126.077629912603},{d1:"2030",d2:"Mécanique, travail des métaux",m1:166.680203531876},{d1:"2019",d2:"Politique, religion",m1:20.3965440016107},{d1:"2030",d2:"Politique, religion",m1:26.007193512958},{d1:"2019",d2:"Santé, action sociale, culturelle et sportive",m1:391.40139278143},{d1:"2030",d2:"Santé, action sociale, culturelle et sportive",m1:536.65356643714},{d1:"2019",d2:"Services aux particuliers et aux collectivités",m1:351.467234054523},{d1:"2030",d2:"Services aux particuliers et aux collectivités",m1:500.133942916948},{d1:"2019",d2:"Transports, logistique et tourisme",m1:248.555681456274},{d1:"2030",d2:"Transports, logistique et tourisme",m1:349.512295898889},]
};
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=['2019','2030',];
mydata["2019"] = [["Santé, action sociale, culturelle et sportive",391.40139278143],["Commerce",365.550054571722],["Services aux particuliers et aux collectivités",351.467234054523],["Gestion, administration des entreprises",298.029912675813],["Transports, logistique et tourisme",248.555681456274],["Bâtiment, travaux publics",242.666737402595],["Administration publique, professions juridiques, armée et police",210.544889734982],["Enseignement, formation",150.222955971987],["Hôtellerie, restauration, alimentation",149.742546567071],["Mécanique, travail des métaux",126.077629912603],["Maintenance",113.994348396913],["Industries de process",106.591401977253],["Agriculture, marine, pêche",92.8403843287476],["Informatique et télécommunications",78.4297976203404],["Banque et assurances",71.1057001765272],["Communication, information, art et spectacle",63.2717054641571],["Études et recherche",59.8436776683579],["Ingénieurs et cadres de l'industrie",43.5355413480265],["Matériaux souples, bois, industries graphiques",42.2418360429146],["Électricité, électronique",32.6060108790099],["Politique, religion",20.3965440016107],];
mydata["2030"] = [["Santé, action sociale, culturelle et sportive",536.65356643714],["Services aux particuliers et aux collectivités",500.133942916948],["Commerce",487.350691936253],["Gestion, administration des entreprises",384.921601950228],["Transports, logistique et tourisme",349.512295898889],["Bâtiment, travaux publics",328.027681909247],["Administration publique, professions juridiques, armée et police",268.734725409653],["Enseignement, formation",197.605687558974],["Hôtellerie, restauration, alimentation",191.800998032059],["Mécanique, travail des métaux",166.680203531876],["Maintenance",146.782096607545],["Industries de process",139.544206956409],["Agriculture, marine, pêche",124.998160481721],["Informatique et télécommunications",108.937853427625],["Études et recherche",83.1746447516771],["Communication, information, art et spectacle",82.6119034336161],["Banque et assurances",82.3502504327528],["Ingénieurs et cadres de l'industrie",65.3854787370775],["Matériaux souples, bois, industries graphiques",58.2682014726463],["Électricité, électronique",41.0115580734769],["Politique, religion",26.007193512958],];
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: 1900},
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,
rotation: 0,
formatter: ctx => {
return ctx.value; },
style: {
textAlign: "center"
},
style: {color: "#848284",
fontFamily: "Arial",
fontSize: "12px",
fontWeight: "normal",
textDecoration: "none",
fontStyle: "normal" }
}
},
yAxis: {
labels: {
rotation: 0,
style: {color: "#848284",
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: "#848284",
fontFamily: "Arial",
fontSize: "12px",
fontWeight: "normal",
textDecoration: "none",
fontStyle: "normal" }
},
},
legend: {
align: "right",
verticalAlign: "bottom",
itemStyle: {color: "#848284",
fontFamily: "Arial",
fontWeight: "bold",
fontSize: "20px",
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 Nb de postes : {point.y}
',
borderWidth: 1,
valueDecimals: 1,
valuePrefix: '',
valueSuffix: ' milliers'
},
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,1,"."," ")+" milliers"; },
style:{ color: "#848284",
fontFamily: "Arial",
fontSize: "11px",
fontWeight: "normal",
textDecoration: "none",
textOutline: "1px contrast",
fontStyle: "normal" }
}],
name: periodes[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: periodes[per_init],
data: getData(periodes[per_init])
});
}
}
function play(button) {
button.title = "pause";
button.className = "pause_button";
chart.sequenceTimer = setInterval(function() {
update(1);
}, 2000);
}
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(periodes[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);
}