";
html_GRI_ID_PInvestigador_EDP_Sexo += "
";
html_GRI_ID_PInvestigador_EDP_Sexo += s_name_GRI_ID_PInvestigador_EDP_Sexo + ": ";
html_GRI_ID_PInvestigador_EDP_Sexo += "" + number_format(value_GRI_ID_PInvestigador_EDP_Sexo,0) + "";
html_GRI_ID_PInvestigador_EDP_Sexo += "";
return html_GRI_ID_PInvestigador_EDP_Sexo;
},
sizeAdjust: 8.5,
//tooltipLocation : 'n'
}
});
function number_format(amount, decimals) {
amount += ''; // por si pasan un numero en vez de un string
amount = parseFloat(amount.replace(/[^0-9\.\-]/g, '')); // elimino cualquier cosa que no sea numero o punto
decimals = decimals || 0; // por si la variable no fue fue pasada
//if (amount % 1 != 0) decimals = 2;
// si no es un numero o es igual a cero retorno el mismo cero
if (isNaN(amount) || amount === 0)
return parseFloat(0).toFixed(decimals);
// si es mayor o menor que cero retorno el valor formateado como numero
amount = '' + amount.toFixed(decimals);
var amount_parts = amount.split('.'),
regexp = /(\d+)(\d{3})/;
while (regexp.test(amount_parts[0]))
amount_parts[0] = amount_parts[0].replace(regexp, '$1' + '.' + '$2');
return amount_parts.join(',');
}
var clickSerie1_GRI_ID_PInvestigador_EDP_Sexo = true
var clickSerie2_GRI_ID_PInvestigador_EDP_Sexo = true
var clickSerie3_GRI_ID_PInvestigador_EDP_Sexo = true
if (!document.getElementById("s1_checkbox_GRI_ID_PInvestigador_EDP_Sexo").checked) clickSerie1_GRI_ID_PInvestigador_EDP_Sexo = false;
if (!document.getElementById("s2_checkbox_GRI_ID_PInvestigador_EDP_Sexo").checked) clickSerie2_GRI_ID_PInvestigador_EDP_Sexo = false;
if (!document.getElementById("s3_checkbox_GRI_ID_PInvestigador_EDP_Sexo").checked) clickSerie3_GRI_ID_PInvestigador_EDP_Sexo = false;
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[0].show = clickSerie1_GRI_ID_PInvestigador_EDP_Sexo;
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[1].show = clickSerie2_GRI_ID_PInvestigador_EDP_Sexo;
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[2].show = clickSerie3_GRI_ID_PInvestigador_EDP_Sexo;
// Ezkutatuta dagoen seriea tooltipa ez agertzeko
//mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[4].show = false;
/* Legend-a y ardatzeko canvas overlay-aren gainean ikusteko */
$.jqplot.postDrawHooks.push(function() {
$(".jqplot-overlayCanvas-canvas").css('z-index', '0'); //send overlay canvas to back
$(".jqplot-highlighter-tooltip").css('z-index', '1'); //make sure the tooltip is over the series
});
/* Lehenengo serieari garrantzia emateko */
mainChart_GRI_ID_PInvestigador_EDP_Sexo.moveSeriesToFront(0)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot()
/* Legendako serieak erakusteko/ez erakusteko */
var leftSliderPos_GRI_ID_PInvestigador_EDP_Sexo = minSliderPos_GRI_ID_PInvestigador_EDP_Sexo
var rightSliderPos_GRI_ID_PInvestigador_EDP_Sexo = maxSliderPos_GRI_ID_PInvestigador_EDP_Sexo
var minLegend_GRI_ID_PInvestigador_EDP_Sexo
var maxLegend_GRI_ID_PInvestigador_EDP_Sexo
var seriesStringAll_GRI_ID_PInvestigador_EDP_Sexo = ["s1","s2","s3"]
var seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo = ["s1","s2","s3"]
var seriesAll_GRI_ID_PInvestigador_EDP_Sexo = [s1_GRI_ID_PInvestigador_EDP_Sexo,s2_GRI_ID_PInvestigador_EDP_Sexo,s3_GRI_ID_PInvestigador_EDP_Sexo]
var seriesActual_GRI_ID_PInvestigador_EDP_Sexo;
seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo = getSeriesClickedOnLegend(this, seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo, seriesStringAll_GRI_ID_PInvestigador_EDP_Sexo, mainChart_GRI_ID_PInvestigador_EDP_Sexo)
seriesActual_GRI_ID_PInvestigador_EDP_Sexo = getSeriesFromString(seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo, seriesAll_GRI_ID_PInvestigador_EDP_Sexo)
if(seriesActual_GRI_ID_PInvestigador_EDP_Sexo.length>0){
allSeries_GRI_ID_PInvestigador_EDP_Sexo = getAllValuesY(seriesActual_GRI_ID_PInvestigador_EDP_Sexo,leftSliderPos_GRI_ID_PInvestigador_EDP_Sexo,rightSliderPos_GRI_ID_PInvestigador_EDP_Sexo)
minLegend_GRI_ID_PInvestigador_EDP_Sexo = getSerieMin(allSeries_GRI_ID_PInvestigador_EDP_Sexo)
maxLegend_GRI_ID_PInvestigador_EDP_Sexo = getSerieMax(allSeries_GRI_ID_PInvestigador_EDP_Sexo)
}
else{
minLegend_GRI_ID_PInvestigador_EDP_Sexo=-20
maxLegend_GRI_ID_PInvestigador_EDP_Sexo=20
}
var seriesWidth_GRI_ID_PInvestigador_EDP_Sexo = [1, 1, 1]
$("input[type=checkbox]").click(function(){
if(this.id == "s1_checkbox_GRI_ID_PInvestigador_EDP_Sexo") clickSerie1_GRI_ID_PInvestigador_EDP_Sexo = this.checked
else if(this.id == "s2_checkbox_GRI_ID_PInvestigador_EDP_Sexo") clickSerie2_GRI_ID_PInvestigador_EDP_Sexo = this.checked
else if(this.id == "s3_checkbox_GRI_ID_PInvestigador_EDP_Sexo") clickSerie3_GRI_ID_PInvestigador_EDP_Sexo = this.checked
// Ezkutatuta dagoen seriea tooltipa ez agertzeko
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[3].show = false;
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[0].show = clickSerie1_GRI_ID_PInvestigador_EDP_Sexo
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[1].show = clickSerie2_GRI_ID_PInvestigador_EDP_Sexo
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[2].show = clickSerie3_GRI_ID_PInvestigador_EDP_Sexo
seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo = getSeriesClickedOnLegend(this, seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo, seriesStringAll_GRI_ID_PInvestigador_EDP_Sexo, mainChart_GRI_ID_PInvestigador_EDP_Sexo)
seriesActual_GRI_ID_PInvestigador_EDP_Sexo = getSeriesFromString(seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo, seriesAll_GRI_ID_PInvestigador_EDP_Sexo)
if(seriesActual_GRI_ID_PInvestigador_EDP_Sexo.length>0){
allSeries_GRI_ID_PInvestigador_EDP_Sexo = getAllValuesY(seriesActual_GRI_ID_PInvestigador_EDP_Sexo,leftSliderPos_GRI_ID_PInvestigador_EDP_Sexo,rightSliderPos_GRI_ID_PInvestigador_EDP_Sexo)
minLegend_GRI_ID_PInvestigador_EDP_Sexo = getSerieMin(allSeries_GRI_ID_PInvestigador_EDP_Sexo)
maxLegend_GRI_ID_PInvestigador_EDP_Sexo = getSerieMax(allSeries_GRI_ID_PInvestigador_EDP_Sexo)
}
else{
minLegend_GRI_ID_PInvestigador_EDP_Sexo=-20
maxLegend_GRI_ID_PInvestigador_EDP_Sexo=20
}
mainChart_GRI_ID_PInvestigador_EDP_Sexo.axes.yaxis.ticks = getYRange(1, maxLegend_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.axes.y2axis.ticks = getYRange(1, maxLegend_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot()
});
$("p").mouseenter(function() {
// Ezkutatuta dagoen seriea tooltipa ez agertzeko
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[3].show = false;
elementId_GRI_ID_PInvestigador_EDP_Sexo = this.id
clicks_GRI_ID_PInvestigador_EDP_Sexo = [clickSerie1_GRI_ID_PInvestigador_EDP_Sexo,clickSerie2_GRI_ID_PInvestigador_EDP_Sexo,clickSerie3_GRI_ID_PInvestigador_EDP_Sexo]
if(elementId_GRI_ID_PInvestigador_EDP_Sexo == "serie1Name_GRI_ID_PInvestigador_EDP_Sexo" && clickSerie1_GRI_ID_PInvestigador_EDP_Sexo == true){
series_GRI_ID_PInvestigador_EDP_Sexo = repaintLineWidth(elementId_GRI_ID_PInvestigador_EDP_Sexo, "enter", mainChart_GRI_ID_PInvestigador_EDP_Sexo, clicks_GRI_ID_PInvestigador_EDP_Sexo, seriesWidth_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot({series:series_GRI_ID_PInvestigador_EDP_Sexo})
mainChart_GRI_ID_PInvestigador_EDP_Sexo.moveSeriesToFront(0)
}
else if(elementId_GRI_ID_PInvestigador_EDP_Sexo == "serie2Name_GRI_ID_PInvestigador_EDP_Sexo" && clickSerie2_GRI_ID_PInvestigador_EDP_Sexo == true){
series_GRI_ID_PInvestigador_EDP_Sexo = repaintLineWidth(elementId_GRI_ID_PInvestigador_EDP_Sexo, "enter", mainChart_GRI_ID_PInvestigador_EDP_Sexo, clicks_GRI_ID_PInvestigador_EDP_Sexo, seriesWidth_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot({series:series_GRI_ID_PInvestigador_EDP_Sexo})
mainChart_GRI_ID_PInvestigador_EDP_Sexo.moveSeriesToFront(1)
}
else if(elementId_GRI_ID_PInvestigador_EDP_Sexo == "serie3Name_GRI_ID_PInvestigador_EDP_Sexo" && clickSerie3_GRI_ID_PInvestigador_EDP_Sexo == true){
series_GRI_ID_PInvestigador_EDP_Sexo = repaintLineWidth(elementId_GRI_ID_PInvestigador_EDP_Sexo, "enter", mainChart_GRI_ID_PInvestigador_EDP_Sexo, clicks_GRI_ID_PInvestigador_EDP_Sexo, seriesWidth_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot({series:series_GRI_ID_PInvestigador_EDP_Sexo})
mainChart_GRI_ID_PInvestigador_EDP_Sexo.moveSeriesToFront(2)
}
seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo = getSeriesClickedOnLegend(this, seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo, seriesStringAll_GRI_ID_PInvestigador_EDP_Sexo, mainChart_GRI_ID_PInvestigador_EDP_Sexo)
seriesActual_GRI_ID_PInvestigador_EDP_Sexo = getSeriesFromString(seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo, seriesAll_GRI_ID_PInvestigador_EDP_Sexo)
if(seriesActual_GRI_ID_PInvestigador_EDP_Sexo.length>0){
allSeries_GRI_ID_PInvestigador_EDP_Sexo = getAllValuesY(seriesActual_GRI_ID_PInvestigador_EDP_Sexo,leftSliderPos_GRI_ID_PInvestigador_EDP_Sexo,rightSliderPos_GRI_ID_PInvestigador_EDP_Sexo)
minLegend_GRI_ID_PInvestigador_EDP_Sexo = getSerieMin(allSeries_GRI_ID_PInvestigador_EDP_Sexo)
maxLegend_GRI_ID_PInvestigador_EDP_Sexo = getSerieMax(allSeries_GRI_ID_PInvestigador_EDP_Sexo)
}
else{
minLegend_GRI_ID_PInvestigador_EDP_Sexo=-20
maxLegend_GRI_ID_PInvestigador_EDP_Sexo=20
}
mainChart_GRI_ID_PInvestigador_EDP_Sexo.axes.yaxis.ticks = getYRange(1, maxLegend_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.axes.y2axis.ticks = getYRange(1, maxLegend_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[0].show = clickSerie1_GRI_ID_PInvestigador_EDP_Sexo
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[1].show = clickSerie2_GRI_ID_PInvestigador_EDP_Sexo
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[2].show = clickSerie3_GRI_ID_PInvestigador_EDP_Sexo
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot()
})
$("p").mouseleave(function() {
// Ezkutatuta dagoen seriea tooltipa ez agertzeko
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[3].show = false;
elementId_GRI_ID_PInvestigador_EDP_Sexo = this.id
clicks_GRI_ID_PInvestigador_EDP_Sexo = [clickSerie1_GRI_ID_PInvestigador_EDP_Sexo,clickSerie2_GRI_ID_PInvestigador_EDP_Sexo,clickSerie3_GRI_ID_PInvestigador_EDP_Sexo]
if(elementId_GRI_ID_PInvestigador_EDP_Sexo == "serie1Name_GRI_ID_PInvestigador_EDP_Sexo" && clickSerie1_GRI_ID_PInvestigador_EDP_Sexo == true){
series_GRI_ID_PInvestigador_EDP_Sexo = repaintLineWidth(elementId_GRI_ID_PInvestigador_EDP_Sexo, "exit", mainChart_GRI_ID_PInvestigador_EDP_Sexo, clicks_GRI_ID_PInvestigador_EDP_Sexo, seriesWidth_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot({series:series_GRI_ID_PInvestigador_EDP_Sexo})
}
else if(elementId_GRI_ID_PInvestigador_EDP_Sexo == "serie2Name_GRI_ID_PInvestigador_EDP_Sexo" && clickSerie2_GRI_ID_PInvestigador_EDP_Sexo == true){
series_GRI_ID_PInvestigador_EDP_Sexo = repaintLineWidth(elementId_GRI_ID_PInvestigador_EDP_Sexo, "exit", mainChart_GRI_ID_PInvestigador_EDP_Sexo, clicks_GRI_ID_PInvestigador_EDP_Sexo, seriesWidth_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot({series:series_GRI_ID_PInvestigador_EDP_Sexo})
}
else if(elementId_GRI_ID_PInvestigador_EDP_Sexo == "serie3Name_GRI_ID_PInvestigador_EDP_Sexo" && clickSerie3_GRI_ID_PInvestigador_EDP_Sexo == true){
series_GRI_ID_PInvestigador_EDP_Sexo = repaintLineWidth(elementId_GRI_ID_PInvestigador_EDP_Sexo, "exit", mainChart_GRI_ID_PInvestigador_EDP_Sexo, clicks_GRI_ID_PInvestigador_EDP_Sexo, seriesWidth_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot({series:series_GRI_ID_PInvestigador_EDP_Sexo})
}
mainChart_GRI_ID_PInvestigador_EDP_Sexo.axes.yaxis.ticks = getYRange(1, maxLegend_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.axes.y2axis.ticks = getYRange(1, maxLegend_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[0].show = clickSerie1_GRI_ID_PInvestigador_EDP_Sexo
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[1].show = clickSerie2_GRI_ID_PInvestigador_EDP_Sexo
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[2].show = clickSerie3_GRI_ID_PInvestigador_EDP_Sexo
/* Lehenengo serieari garrantzia emateko */
mainChart_GRI_ID_PInvestigador_EDP_Sexo.moveSeriesToFront(0)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot()
})
/* Slider-aren grafikoa marraztu */
var sliderChart_GRI_ID_PInvestigador_EDP_Sexo = $.jqplot ('chart2_GRI_ID_PInvestigador_EDP_Sexo', [s1_kopia_GRI_ID_PInvestigador_EDP_Sexo,s2_kopia_GRI_ID_PInvestigador_EDP_Sexo,s3_kopia_GRI_ID_PInvestigador_EDP_Sexo], {
grid: {
background: 'white',
drawBorder: false,
shadow: false,
},
seriesColors: ["#0000FF", "#FFA500", "#008000"],
series:[
{label:serieNames_GRI_ID_PInvestigador_EDP_Sexo[0],renderer:$.jqplot.LineRenderer,color: "#0000FF",lineWidth: 1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}},
{label:serieNames_GRI_ID_PInvestigador_EDP_Sexo[1],renderer:$.jqplot.LineRenderer,color: "#FFA500",lineWidth: 1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}},
{label:serieNames_GRI_ID_PInvestigador_EDP_Sexo[2],renderer:$.jqplot.LineRenderer,color: "#008000",lineWidth: 1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}},
],
axesDefaults: {
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
},
axes: {
xaxis: {
//tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
formatter: function (format, val) {
tickName_GRI_ID_PInvestigador_EDP_Sexo = formatTickLabelSlider(val, s1_kopia_GRI_ID_PInvestigador_EDP_Sexo[0][0], s1_kopia_GRI_ID_PInvestigador_EDP_Sexo[s1_kopia_GRI_ID_PInvestigador_EDP_Sexo.length-1][0], s1_GRI_ID_PInvestigador_EDP_Sexo, language, "yearly_data")
return tickName_GRI_ID_PInvestigador_EDP_Sexo
},
textColor: 'black'
},
ticks : getXRangeSlider(s1_kopia_GRI_ID_PInvestigador_EDP_Sexo[0][0], s1_kopia_GRI_ID_PInvestigador_EDP_Sexo[s1_kopia_GRI_ID_PInvestigador_EDP_Sexo.length-1][0]),
drawMajorGridlines: true,
drawMinorGridlines: true
},
yaxis: {
rendererOptions: {forceTickAt0: true},
tickOptions: {formatString: "%'i" },
showTicks: false,
min: 1,
max:maxYSliderGraph_GRI_ID_PInvestigador_EDP_Sexo + yAddedQuantity_GRI_ID_PInvestigador_EDP_Sexo
}
}
});
/* SliderChart-eko hasierako laukizuzenak marrazteko*/
sliderChart_GRI_ID_PInvestigador_EDP_Sexo.replot({
canvasOverlay: {
show: true,
objects: [
{ rectangle: { xmin:0,xmax: minSliderPos_GRI_ID_PInvestigador_EDP_Sexo, xminOffset: "0px", xmaxOffset: "0px", yminOffset: "0px", ymaxOffset: "0px",
color: "rgba(192,192,192,0.5)"} },
{ rectangle: { xmin:maxSliderPos_GRI_ID_PInvestigador_EDP_Sexo,xmax: s1_kopia_GRI_ID_PInvestigador_EDP_Sexo[s1_kopia_GRI_ID_PInvestigador_EDP_Sexo.length - 1][0], xminOffset: "0px", xmaxOffset: "0px", yminOffset: "0px", ymaxOffset: "0px",
color: "rgba(192,192,192,0.5)"} }
]
}
})
sliderChart_GRI_ID_PInvestigador_EDP_Sexo.moveSeriesToFront(0)
/* Slider-a marraztu */
$("#slider_GRI_ID_PInvestigador_EDP_Sexo").slider({
max: maxSlider_GRI_ID_PInvestigador_EDP_Sexo,
min: minSlider_GRI_ID_PInvestigador_EDP_Sexo,
range: true,
values: [ minSliderPos_GRI_ID_PInvestigador_EDP_Sexo, maxSliderPos_GRI_ID_PInvestigador_EDP_Sexo ],
slide: function(event,ui){
var serie1New_GRI_ID_PInvestigador_EDP_Sexo = new Array()
var serie2New_GRI_ID_PInvestigador_EDP_Sexo = new Array()
var serie3New_GRI_ID_PInvestigador_EDP_Sexo= new Array()
var datesArrayBerria_GRI_ID_PInvestigador_EDP_Sexo = new Array()
for(i=ui.values[0];i<=ui.values[1];i++)
{
serie1New_GRI_ID_PInvestigador_EDP_Sexo.push(s1_GRI_ID_PInvestigador_EDP_Sexo[i]);
serie2New_GRI_ID_PInvestigador_EDP_Sexo.push(s2_GRI_ID_PInvestigador_EDP_Sexo[i]);
serie3New_GRI_ID_PInvestigador_EDP_Sexo.push(s3_GRI_ID_PInvestigador_EDP_Sexo[i]);
datesArrayBerria_GRI_ID_PInvestigador_EDP_Sexo.push(s1_GRI_ID_PInvestigador_EDP_Sexo[i][0])
}
var valuesNew_GRI_ID_PInvestigador_EDP_Sexo = getAllValuesY([serie1New_GRI_ID_PInvestigador_EDP_Sexo, serie2New_GRI_ID_PInvestigador_EDP_Sexo, serie3New_GRI_ID_PInvestigador_EDP_Sexo],0,serie1New_GRI_ID_PInvestigador_EDP_Sexo.length-1)
min_GRI_ID_PInvestigador_EDP_Sexo = getSerieMin(valuesNew_GRI_ID_PInvestigador_EDP_Sexo)
max_GRI_ID_PInvestigador_EDP_Sexo = getSerieMax(valuesNew_GRI_ID_PInvestigador_EDP_Sexo)
serieBerria1_GRI_ID_PInvestigador_EDP_Sexo = changeSeries(serie1New_GRI_ID_PInvestigador_EDP_Sexo)
serieBerria2_GRI_ID_PInvestigador_EDP_Sexo = changeSeries(serie2New_GRI_ID_PInvestigador_EDP_Sexo)
serieBerria3_GRI_ID_PInvestigador_EDP_Sexo = changeSeries(serie3New_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.destroy()
mainChart_GRI_ID_PInvestigador_EDP_Sexo = $.jqplot ('chart1_GRI_ID_PInvestigador_EDP_Sexo', [serieBerria1_GRI_ID_PInvestigador_EDP_Sexo,serieBerria2_GRI_ID_PInvestigador_EDP_Sexo,serieBerria3_GRI_ID_PInvestigador_EDP_Sexo,s1_hidden_GRI_ID_PInvestigador_EDP_Sexo], {
grid: {
background: 'white',
drawBorder: false,
shadow: false,
},
canvasOverlay: {
show: true,
objects: [
{
horizontalLine:{
y: 0,
xminOffset: "0px",
xmaxOffset: "0px",
lineWidth: 1,
color: "black",
shadow: false,
name: "0"
}
}
]
},
seriesColors: ["#0000FF", "#FFA500", "#008000", "black"],
series:[
{label:serieNames_GRI_ID_PInvestigador_EDP_Sexo[0],show:document.getElementById("s1_checkbox_GRI_ID_PInvestigador_EDP_Sexo").checked,renderer:$.jqplot.LineRenderer,color:"#0000FF",lineWidth:1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}},
{label:serieNames_GRI_ID_PInvestigador_EDP_Sexo[1],show:document.getElementById("s2_checkbox_GRI_ID_PInvestigador_EDP_Sexo").checked,renderer:$.jqplot.LineRenderer,color:"#FFA500",lineWidth:1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}},
{label:serieNames_GRI_ID_PInvestigador_EDP_Sexo[2],show:document.getElementById("s3_checkbox_GRI_ID_PInvestigador_EDP_Sexo").checked,renderer:$.jqplot.LineRenderer,color:"#008000",lineWidth:1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}},
{yaxis:"y2axis",renderer:$.jqplot.LineRenderer,color:"#008000"}
],
axesDefaults: {
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
},
axes: {
xaxis: {
//tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
formatter: function (format, val) {
tickName_GRI_ID_PInvestigador_EDP_Sexo = formatTickLabel(val, serieBerria1_GRI_ID_PInvestigador_EDP_Sexo[0][0], serieBerria1_GRI_ID_PInvestigador_EDP_Sexo[serieBerria1_GRI_ID_PInvestigador_EDP_Sexo.length-1][0], serie1New_GRI_ID_PInvestigador_EDP_Sexo, language, "yearly_data")
return tickName_GRI_ID_PInvestigador_EDP_Sexo
},
textColor: 'black'
},
ticks : getXRange(serieBerria1_GRI_ID_PInvestigador_EDP_Sexo[0][0], serieBerria1_GRI_ID_PInvestigador_EDP_Sexo[serieBerria1_GRI_ID_PInvestigador_EDP_Sexo.length-1][0]),
drawMajorGridlines: true
},
yaxis: {
tickOptions: {formatString: "%'i" },
ticks:getYRange(0, max_GRI_ID_PInvestigador_EDP_Sexo)
},
y2axis: {
rendererOptions: {alignTicks: true},
tickOptions: {formatString: "%'i" },
ticks:getYRange(0, max_GRI_ID_PInvestigador_EDP_Sexo)
}
},
highlighter: {
show: true,
tooltipContentEditor: function (str, seriesIndex, pointIndex, plot) {
var date_GRI_ID_PInvestigador_EDP_Sexo = datesArrayBerria_GRI_ID_PInvestigador_EDP_Sexo[plot.data[seriesIndex][pointIndex][0]];
var s_name_GRI_ID_PInvestigador_EDP_Sexo = plot.series[seriesIndex]["label"];
num_GRI_ID_PInvestigador_EDP_Sexo = plot.data[seriesIndex][pointIndex][1]
var value_GRI_ID_PInvestigador_EDP_Sexo = num_GRI_ID_PInvestigador_EDP_Sexo//plot.data[seriesIndex][pointIndex][1];
var yearString_GRI_ID_PInvestigador_EDP_Sexo = date_GRI_ID_PInvestigador_EDP_Sexo.substring(6,10);
var monthString_GRI_ID_PInvestigador_EDP_Sexo = date_GRI_ID_PInvestigador_EDP_Sexo.substring(3,5);
if ("yearly_data"==="yearly_data") {
monthName_GRI_ID_PInvestigador_EDP_Sexo = "";
} else if ("quarterly_data"==="yearly_data") {
monthName_GRI_ID_PInvestigador_EDP_Sexo = getQuarter(monthString_GRI_ID_PInvestigador_EDP_Sexo, language) + ", ";
} else {
monthName_GRI_ID_PInvestigador_EDP_Sexo = getMonthHighlight(monthString_GRI_ID_PInvestigador_EDP_Sexo, language) + ", ";
}
var html_GRI_ID_PInvestigador_EDP_Sexo = " ";
html_GRI_ID_PInvestigador_EDP_Sexo += "" + monthName_GRI_ID_PInvestigador_EDP_Sexo + yearString_GRI_ID_PInvestigador_EDP_Sexo + "";
html_GRI_ID_PInvestigador_EDP_Sexo += "
";
html_GRI_ID_PInvestigador_EDP_Sexo += s_name_GRI_ID_PInvestigador_EDP_Sexo + ": ";
html_GRI_ID_PInvestigador_EDP_Sexo += "" + number_format(value_GRI_ID_PInvestigador_EDP_Sexo, 0) + "";
html_GRI_ID_PInvestigador_EDP_Sexo += "
";
return html_GRI_ID_PInvestigador_EDP_Sexo;
},
sizeAdjust: 8.5,
//tooltipLocation : 'n'
}
});
// Ezkutatuta dagoen seriea tooltipa ez agertzeko
mainChart_GRI_ID_PInvestigador_EDP_Sexo.series[3].show = false;
/* Line-chart-ari dagokion lehenengo serieari garrantzia emateko */
mainChart_GRI_ID_PInvestigador_EDP_Sexo.moveSeriesToFront(0)
/* SliderChart-eko momentuko laukizuzenak marrazteko*/
sliderChart_GRI_ID_PInvestigador_EDP_Sexo.replot({
canvasOverlay: {
show: true,
objects: [
{ rectangle: { xmin:0,xmax: ui.values[0], xminOffset: "0px", xmaxOffset: "0px", yminOffset: "0px", ymaxOffset: "0px",
color: "rgba(192,192,192,0.5)"} },
{ rectangle: { xmin:ui.values[1],xmax: s1_kopia_GRI_ID_PInvestigador_EDP_Sexo[s1_kopia_GRI_ID_PInvestigador_EDP_Sexo.length - 1][0], xminOffset: "0px", xmaxOffset: "0px", yminOffset: "0px", ymaxOffset: "0px",
color: "rgba(192,192,192,0.5)"} }
]
}
})
sliderChart_GRI_ID_PInvestigador_EDP_Sexo.moveSeriesToFront(0)
/* Legendan klikatuta dauden serieen maximo eta minimoa eguneratzeko*/
leftSliderPos_GRI_ID_PInvestigador_EDP_Sexo = ui.values[0]
rightSliderPos_GRI_ID_PInvestigador_EDP_Sexo = ui.values[1]
seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo = getSeriesClickedOnLegend(this, seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo, seriesStringAll_GRI_ID_PInvestigador_EDP_Sexo, mainChart_GRI_ID_PInvestigador_EDP_Sexo)
seriesActual_GRI_ID_PInvestigador_EDP_Sexo = getSeriesFromString(seriesStringActual_GRI_ID_PInvestigador_EDP_Sexo, seriesAll_GRI_ID_PInvestigador_EDP_Sexo)
allSeries_GRI_ID_PInvestigador_EDP_Sexo = getAllValuesY(seriesActual_GRI_ID_PInvestigador_EDP_Sexo,leftSliderPos_GRI_ID_PInvestigador_EDP_Sexo,rightSliderPos_GRI_ID_PInvestigador_EDP_Sexo)
minLegend_GRI_ID_PInvestigador_EDP_Sexo = getSerieMin(allSeries_GRI_ID_PInvestigador_EDP_Sexo)
maxLegend_GRI_ID_PInvestigador_EDP_Sexo = getSerieMax(allSeries_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.axes.yaxis.ticks = getYRange(1, maxLegend_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.axes.y2axis.ticks = getYRange(1, maxLegend_GRI_ID_PInvestigador_EDP_Sexo)
mainChart_GRI_ID_PInvestigador_EDP_Sexo.replot();
}
});
/* */
function repaintLineWidth(serieId, eventType, mainChart, clicks, seriesWidth){
var series_GRI_ID_PInvestigador_EDP_Sexo;
if (serieId == "serie1Name_GRI_ID_PInvestigador_EDP_Sexo" && eventType == "enter"){
if(clicks[0] == true) seriesWidth[0] = seriesWidth[0] + 1
document.getElementById(serieId).setAttribute("style", "background: rgba(192,192,192,0.5); border-style:solid; border-width:1px; border-color:black; font-family: Verdana !important; font-size: 18px; font-style: italic; font-weight: normal;");
}
else if (serieId == "serie1Name_GRI_ID_PInvestigador_EDP_Sexo" && eventType == "exit"){
if(clicks[0] == true) seriesWidth[0] = seriesWidth[0] -1
document.getElementById(serieId).setAttribute("style", "font-family: Verdana !important; font-size: 18px; font-style: italic; font-weight: normal;");
}
if (serieId == "serie2Name_GRI_ID_PInvestigador_EDP_Sexo" && eventType == "enter"){
if(clicks[1] == true)seriesWidth[1] = seriesWidth[1] + 1
document.getElementById(serieId).setAttribute("style", "background: rgba(192,192,192,0.5); border-style:solid; border-width:1px; border-color:black; font-family: Verdana !important; font-size: 18px; font-style: italic; font-weight: normal;");
}
else if (serieId == "serie2Name_GRI_ID_PInvestigador_EDP_Sexo" && eventType == "exit"){
if(clicks[1] == true)seriesWidth[1] = seriesWidth[1] - 1
document.getElementById(serieId).setAttribute("style", "font-family: Verdana !important; font-size: 18px; font-style: italic; font-weight: normal;");
}
if (serieId == "serie3Name_GRI_ID_PInvestigador_EDP_Sexo" && eventType == "enter"){
if(clicks[2] == true)seriesWidth[2] = seriesWidth[2] + 1
document.getElementById(serieId).setAttribute("style", "background: rgba(192,192,192,0.5); border-style:solid; border-width:1px; border-color:black; font-family: Verdana !important; font-size: 18px; font-style: italic; font-weight: normal;");
}
else if (serieId == "serie3Name_GRI_ID_PInvestigador_EDP_Sexo" && eventType == "exit"){
if(clicks[2] == true)seriesWidth[2] = seriesWidth[2] - 1
document.getElementById(serieId).setAttribute("style", "font-family: Verdana !important; font-size: 18px; font-style: italic; font-weight: normal;");
}
series_GRI_ID_PInvestigador_EDP_Sexo = [{lineWidth: seriesWidth[0]},{lineWidth: seriesWidth[1]},{lineWidth: seriesWidth[2]},{lineWidth: 0.01}]
return series_GRI_ID_PInvestigador_EDP_Sexo;
}
/* Funtzio honek Legend-an klikaturik dauden serieen array-a itzultzen du eta seriea pintatu/ez pintatu */
function getSeriesClickedOnLegend(thisClicked, seriesActual, seriesAll, mainChart){
result_GRI_ID_PInvestigador_EDP_Sexo = seriesActual
if(thisClicked.value=="s1_legend_GRI_ID_PInvestigador_EDP_Sexo"){
index = indexOfSerieClicked(thisClicked.value, seriesActual)
if(thisClicked.checked == true){
result_GRI_ID_PInvestigador_EDP_Sexo.splice(index, 0, seriesAll[0]);
}
else{
result_GRI_ID_PInvestigador_EDP_Sexo.splice(index, 1);
}
mainChart.series[0].show = thisClicked.checked;
}
if(thisClicked.value=="s2_legend_GRI_ID_PInvestigador_EDP_Sexo"){
index = indexOfSerieClicked(thisClicked.value, seriesActual)
if(thisClicked.checked == true){
result_GRI_ID_PInvestigador_EDP_Sexo.splice(index, 0, seriesAll[1]);
}
else{
result_GRI_ID_PInvestigador_EDP_Sexo.splice(index, 1);
}
mainChart.series[1].show = thisClicked.checked;
}
if(thisClicked.value=="s3_legend_GRI_ID_PInvestigador_EDP_Sexo"){
index = indexOfSerieClicked(thisClicked.value, seriesActual)
if(thisClicked.checked == true){
result_GRI_ID_PInvestigador_EDP_Sexo.splice(index, 0, seriesAll[2]);
}
else{
result_GRI_ID_PInvestigador_EDP_Sexo.splice(index, 1);
}
mainChart.series[2].show = thisClicked.checked;
}
return result_GRI_ID_PInvestigador_EDP_Sexo
}
});