$(document).ready(function(){ $.jqplot.sprintf.thousandsSeparator = '.'; /* Datuak HTML-aren hizkuntzaren arabera kargatzen dira */ var language = document.getElementById("language").value /* Grafikoa Y ardatzean ondo ikusteko gehitzen zaion kopurua */ var yAddedQuantity_GRI_IPRI_Tasas_NP_01 = 0.5 /* Serieen datak hartzen ditu */ var datesArray_GRI_IPRI_Tasas_NP_01 = datajson_GRI_IPRI_Tasas_NP_01[0] /* Grafikoaren titulu, azpititulu eta oina hartzen ditu jizkuntzaren arabera */ var graphNames_GRI_IPRI_Tasas_NP_01 = getGraphNames(datajson_GRI_IPRI_Tasas_NP_01, language) document.getElementById("graphTitle_GRI_IPRI_Tasas_NP_01").innerHTML=graphNames_GRI_IPRI_Tasas_NP_01[0][1]; document.getElementById("graphSubtitle_GRI_IPRI_Tasas_NP_01").innerHTML=graphNames_GRI_IPRI_Tasas_NP_01[1][1]; document.getElementById("graphFoot_GRI_IPRI_Tasas_NP_01").innerHTML=graphNames_GRI_IPRI_Tasas_NP_01[2][1]; /* Serieen tituluak hartzen ditu hizkuntzaren arabera*/ var serieNames_GRI_IPRI_Tasas_NP_01 = getSerieNames(datajson_GRI_IPRI_Tasas_NP_01, language) document.getElementById("serie1Name_GRI_IPRI_Tasas_NP_01").innerHTML=serieNames_GRI_IPRI_Tasas_NP_01[0]; document.getElementById("serie2Name_GRI_IPRI_Tasas_NP_01").innerHTML=serieNames_GRI_IPRI_Tasas_NP_01[1]; document.getElementById("serie3Name_GRI_IPRI_Tasas_NP_01").innerHTML=serieNames_GRI_IPRI_Tasas_NP_01[2]; document.getElementById("serie4Name_GRI_IPRI_Tasas_NP_01").innerHTML=serieNames_GRI_IPRI_Tasas_NP_01[3]; document.getElementById("serie5Name_GRI_IPRI_Tasas_NP_01").innerHTML=serieNames_GRI_IPRI_Tasas_NP_01[4]; /* Serie guztien Array-a */ var series_GRI_IPRI_Tasas_NP_01 = createSeriesNoDecimal(datajson_GRI_IPRI_Tasas_NP_01); /* Serie kopurua definitu */ var s1_GRI_IPRI_Tasas_NP_01 = series_GRI_IPRI_Tasas_NP_01[0] var s2_GRI_IPRI_Tasas_NP_01 = series_GRI_IPRI_Tasas_NP_01[1] var s3_GRI_IPRI_Tasas_NP_01 = series_GRI_IPRI_Tasas_NP_01[2] var s4_GRI_IPRI_Tasas_NP_01 = series_GRI_IPRI_Tasas_NP_01[3] var s5_GRI_IPRI_Tasas_NP_01 = series_GRI_IPRI_Tasas_NP_01[4] /* Slider-aren minimoa eta maximoa */ var minSlider_GRI_IPRI_Tasas_NP_01 = 0 var maxSlider_GRI_IPRI_Tasas_NP_01 = s1_GRI_IPRI_Tasas_NP_01.length - 1 /* Slider-aren hasierako eta amaierako balioak lortzen dira*/ var firstRangeDate_GRI_IPRI_Tasas_NP_01 = datajson_GRI_IPRI_Tasas_NP_01[datajson_GRI_IPRI_Tasas_NP_01.length-1][0] var lastRangeDate_GRI_IPRI_Tasas_NP_01 = datajson_GRI_IPRI_Tasas_NP_01[datajson_GRI_IPRI_Tasas_NP_01.length-1][1] var minSliderPos_GRI_IPRI_Tasas_NP_01 = getPositionInArrayOfDate(datesArray_GRI_IPRI_Tasas_NP_01, firstRangeDate_GRI_IPRI_Tasas_NP_01) var maxSliderPos_GRI_IPRI_Tasas_NP_01 = getPositionInArrayOfDate(datesArray_GRI_IPRI_Tasas_NP_01, lastRangeDate_GRI_IPRI_Tasas_NP_01) /* Slider-a tartekatuta dagoenean mainGraph-eko Y ardatzaren minimoa eta maximoak finkatzeko*/ var startGraphSerie_GRI_IPRI_Tasas_NP_01 = getAllValuesY([s1_GRI_IPRI_Tasas_NP_01,s2_GRI_IPRI_Tasas_NP_01,s3_GRI_IPRI_Tasas_NP_01,s4_GRI_IPRI_Tasas_NP_01,s5_GRI_IPRI_Tasas_NP_01], minSliderPos_GRI_IPRI_Tasas_NP_01, maxSliderPos_GRI_IPRI_Tasas_NP_01) var minYMainGraph_GRI_IPRI_Tasas_NP_01 = getSerieMin(startGraphSerie_GRI_IPRI_Tasas_NP_01) var maxYMainGraph_GRI_IPRI_Tasas_NP_01 = getSerieMax(startGraphSerie_GRI_IPRI_Tasas_NP_01) /* Serie guztiak array bakar batean batzen dira maximoa eta minimoa kalkulatzeko */ var sliderGraphSerie_GRI_IPRI_Tasas_NP_01 = getAllValuesY([s1_GRI_IPRI_Tasas_NP_01,s2_GRI_IPRI_Tasas_NP_01,s3_GRI_IPRI_Tasas_NP_01,s4_GRI_IPRI_Tasas_NP_01,s5_GRI_IPRI_Tasas_NP_01],minSlider_GRI_IPRI_Tasas_NP_01,maxSlider_GRI_IPRI_Tasas_NP_01)//getAllValues(s1,s2,s3,s4,s5) var minYSliderGraph_GRI_IPRI_Tasas_NP_01 = getSerieMin(sliderGraphSerie_GRI_IPRI_Tasas_NP_01) var maxYSliderGraph_GRI_IPRI_Tasas_NP_01 = getSerieMax(sliderGraphSerie_GRI_IPRI_Tasas_NP_01) /* Hasierako grafikoa zentratuta dagoenean, jatorrizko serieen azpi-serieak hartzen ditu, zentratze-tartearen araberakoak*/ var s1_zentr_GRI_IPRI_Tasas_NP_01 = new Array() var s2_zentr_GRI_IPRI_Tasas_NP_01 = new Array() var s3_zentr_GRI_IPRI_Tasas_NP_01 = new Array() var s4_zentr_GRI_IPRI_Tasas_NP_01 = new Array() var s5_zentr_GRI_IPRI_Tasas_NP_01 = new Array() var datesArray_zentr_GRI_IPRI_Tasas_NP_01 = new Array() for(i=minSliderPos_GRI_IPRI_Tasas_NP_01;i<=maxSliderPos_GRI_IPRI_Tasas_NP_01;i++){ s1_zentr_GRI_IPRI_Tasas_NP_01.push(s1_GRI_IPRI_Tasas_NP_01[i]); s2_zentr_GRI_IPRI_Tasas_NP_01.push(s2_GRI_IPRI_Tasas_NP_01[i]); s3_zentr_GRI_IPRI_Tasas_NP_01.push(s3_GRI_IPRI_Tasas_NP_01[i]); s4_zentr_GRI_IPRI_Tasas_NP_01.push(s4_GRI_IPRI_Tasas_NP_01[i]); s5_zentr_GRI_IPRI_Tasas_NP_01.push(s5_GRI_IPRI_Tasas_NP_01[i]); datesArray_zentr_GRI_IPRI_Tasas_NP_01.push(s1_GRI_IPRI_Tasas_NP_01[i][0]) } /* Serieen kopiak x ardatzeko datu numerikoekin (zenbakiak daten ordez) */ s1_kopia_GRI_IPRI_Tasas_NP_01 = changeSeries(s1_GRI_IPRI_Tasas_NP_01) s2_kopia_GRI_IPRI_Tasas_NP_01 = changeSeries(s2_GRI_IPRI_Tasas_NP_01) s3_kopia_GRI_IPRI_Tasas_NP_01 = changeSeries(s3_GRI_IPRI_Tasas_NP_01) s4_kopia_GRI_IPRI_Tasas_NP_01 = changeSeries(s4_GRI_IPRI_Tasas_NP_01) s5_kopia_GRI_IPRI_Tasas_NP_01 = changeSeries(s5_GRI_IPRI_Tasas_NP_01) s1_zentr_kopia_GRI_IPRI_Tasas_NP_01 = changeSeries(s1_zentr_GRI_IPRI_Tasas_NP_01) s2_zentr_kopia_GRI_IPRI_Tasas_NP_01 = changeSeries(s2_zentr_GRI_IPRI_Tasas_NP_01) s3_zentr_kopia_GRI_IPRI_Tasas_NP_01 = changeSeries(s3_zentr_GRI_IPRI_Tasas_NP_01) s4_zentr_kopia_GRI_IPRI_Tasas_NP_01 = changeSeries(s4_zentr_GRI_IPRI_Tasas_NP_01) s5_zentr_kopia_GRI_IPRI_Tasas_NP_01 = changeSeries(s5_zentr_GRI_IPRI_Tasas_NP_01) s1_hidden_GRI_IPRI_Tasas_NP_01 = new Array() for(i=0;i"; html_GRI_IPRI_Tasas_NP_01 += "
"; html_GRI_IPRI_Tasas_NP_01 += s_name_GRI_IPRI_Tasas_NP_01 + ": "; html_GRI_IPRI_Tasas_NP_01 += "" + number_format(value_GRI_IPRI_Tasas_NP_01,2) + ""; html_GRI_IPRI_Tasas_NP_01 += ""; return html_GRI_IPRI_Tasas_NP_01; }, 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_IPRI_Tasas_NP_01 = true var clickSerie2_GRI_IPRI_Tasas_NP_01 = true var clickSerie3_GRI_IPRI_Tasas_NP_01 = true var clickSerie4_GRI_IPRI_Tasas_NP_01 = true var clickSerie5_GRI_IPRI_Tasas_NP_01 = true if (!document.getElementById("s1_checkbox_GRI_IPRI_Tasas_NP_01").checked) clickSerie1_GRI_IPRI_Tasas_NP_01 = false; if (!document.getElementById("s2_checkbox_GRI_IPRI_Tasas_NP_01").checked) clickSerie2_GRI_IPRI_Tasas_NP_01 = false; if (!document.getElementById("s3_checkbox_GRI_IPRI_Tasas_NP_01").checked) clickSerie3_GRI_IPRI_Tasas_NP_01 = false; if (!document.getElementById("s4_checkbox_GRI_IPRI_Tasas_NP_01").checked) clickSerie4_GRI_IPRI_Tasas_NP_01 = false; if (!document.getElementById("s5_checkbox_GRI_IPRI_Tasas_NP_01").checked) clickSerie5_GRI_IPRI_Tasas_NP_01 = false; mainChart_GRI_IPRI_Tasas_NP_01.series[0].show = clickSerie1_GRI_IPRI_Tasas_NP_01; mainChart_GRI_IPRI_Tasas_NP_01.series[1].show = clickSerie2_GRI_IPRI_Tasas_NP_01; mainChart_GRI_IPRI_Tasas_NP_01.series[2].show = clickSerie3_GRI_IPRI_Tasas_NP_01; mainChart_GRI_IPRI_Tasas_NP_01.series[3].show = clickSerie4_GRI_IPRI_Tasas_NP_01; mainChart_GRI_IPRI_Tasas_NP_01.series[4].show = clickSerie5_GRI_IPRI_Tasas_NP_01; // Ezkutatuta dagoen seriea tooltipa ez agertzeko //mainChart_GRI_IPRI_Tasas_NP_01.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_IPRI_Tasas_NP_01.moveSeriesToFront(0) mainChart_GRI_IPRI_Tasas_NP_01.replot() /* Legendako serieak erakusteko/ez erakusteko */ var leftSliderPos_GRI_IPRI_Tasas_NP_01 = minSliderPos_GRI_IPRI_Tasas_NP_01 var rightSliderPos_GRI_IPRI_Tasas_NP_01 = maxSliderPos_GRI_IPRI_Tasas_NP_01 var minLegend_GRI_IPRI_Tasas_NP_01 var maxLegend_GRI_IPRI_Tasas_NP_01 var seriesStringAll_GRI_IPRI_Tasas_NP_01 = ["s1","s2","s3","s4","s5"] var seriesStringActual_GRI_IPRI_Tasas_NP_01 = ["s1","s2","s3","s4","s5"] var seriesAll_GRI_IPRI_Tasas_NP_01 = [s1_GRI_IPRI_Tasas_NP_01,s2_GRI_IPRI_Tasas_NP_01,s3_GRI_IPRI_Tasas_NP_01,s4_GRI_IPRI_Tasas_NP_01,s5_GRI_IPRI_Tasas_NP_01] var seriesActual_GRI_IPRI_Tasas_NP_01; seriesStringActual_GRI_IPRI_Tasas_NP_01 = getSeriesClickedOnLegend(this, seriesStringActual_GRI_IPRI_Tasas_NP_01, seriesStringAll_GRI_IPRI_Tasas_NP_01, mainChart_GRI_IPRI_Tasas_NP_01) seriesActual_GRI_IPRI_Tasas_NP_01 = getSeriesFromString(seriesStringActual_GRI_IPRI_Tasas_NP_01, seriesAll_GRI_IPRI_Tasas_NP_01) if(seriesActual_GRI_IPRI_Tasas_NP_01.length>0){ allSeries_GRI_IPRI_Tasas_NP_01 = getAllValuesY(seriesActual_GRI_IPRI_Tasas_NP_01,leftSliderPos_GRI_IPRI_Tasas_NP_01,rightSliderPos_GRI_IPRI_Tasas_NP_01) minLegend_GRI_IPRI_Tasas_NP_01 = getSerieMin(allSeries_GRI_IPRI_Tasas_NP_01) maxLegend_GRI_IPRI_Tasas_NP_01 = getSerieMax(allSeries_GRI_IPRI_Tasas_NP_01) } else{ minLegend_GRI_IPRI_Tasas_NP_01=-20 maxLegend_GRI_IPRI_Tasas_NP_01=20 } var seriesWidth_GRI_IPRI_Tasas_NP_01 = [1, 2, 1, 2, 1] $("input[type=checkbox]").click(function(){ if(this.id == "s1_checkbox_GRI_IPRI_Tasas_NP_01") clickSerie1_GRI_IPRI_Tasas_NP_01 = this.checked else if(this.id == "s2_checkbox_GRI_IPRI_Tasas_NP_01") clickSerie2_GRI_IPRI_Tasas_NP_01 = this.checked else if(this.id == "s3_checkbox_GRI_IPRI_Tasas_NP_01") clickSerie3_GRI_IPRI_Tasas_NP_01 = this.checked else if(this.id == "s4_checkbox_GRI_IPRI_Tasas_NP_01") clickSerie4_GRI_IPRI_Tasas_NP_01= this.checked else if(this.id == "s5_checkbox_GRI_IPRI_Tasas_NP_01") clickSerie5_GRI_IPRI_Tasas_NP_01 = this.checked // Ezkutatuta dagoen seriea tooltipa ez agertzeko mainChart_GRI_IPRI_Tasas_NP_01.series[5].show = false; mainChart_GRI_IPRI_Tasas_NP_01.series[0].show = clickSerie1_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[1].show = clickSerie2_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[2].show = clickSerie3_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[3].show = clickSerie4_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[4].show = clickSerie5_GRI_IPRI_Tasas_NP_01 seriesStringActual_GRI_IPRI_Tasas_NP_01 = getSeriesClickedOnLegend(this, seriesStringActual_GRI_IPRI_Tasas_NP_01, seriesStringAll_GRI_IPRI_Tasas_NP_01, mainChart_GRI_IPRI_Tasas_NP_01) seriesActual_GRI_IPRI_Tasas_NP_01 = getSeriesFromString(seriesStringActual_GRI_IPRI_Tasas_NP_01, seriesAll_GRI_IPRI_Tasas_NP_01) if(seriesActual_GRI_IPRI_Tasas_NP_01.length>0){ allSeries_GRI_IPRI_Tasas_NP_01 = getAllValuesY(seriesActual_GRI_IPRI_Tasas_NP_01,leftSliderPos_GRI_IPRI_Tasas_NP_01,rightSliderPos_GRI_IPRI_Tasas_NP_01) minLegend_GRI_IPRI_Tasas_NP_01 = getSerieMin(allSeries_GRI_IPRI_Tasas_NP_01) maxLegend_GRI_IPRI_Tasas_NP_01 = getSerieMax(allSeries_GRI_IPRI_Tasas_NP_01) } else{ minLegend_GRI_IPRI_Tasas_NP_01=-20 maxLegend_GRI_IPRI_Tasas_NP_01=20 } mainChart_GRI_IPRI_Tasas_NP_01.axes.yaxis.ticks = getYRange(minLegend_GRI_IPRI_Tasas_NP_01, maxLegend_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.axes.y2axis.ticks = getYRange(minLegend_GRI_IPRI_Tasas_NP_01, maxLegend_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot() }); $("p").mouseenter(function() { // Ezkutatuta dagoen seriea tooltipa ez agertzeko mainChart_GRI_IPRI_Tasas_NP_01.series[5].show = false; elementId_GRI_IPRI_Tasas_NP_01 = this.id clicks_GRI_IPRI_Tasas_NP_01 = [clickSerie1_GRI_IPRI_Tasas_NP_01,clickSerie2_GRI_IPRI_Tasas_NP_01,clickSerie3_GRI_IPRI_Tasas_NP_01,clickSerie4_GRI_IPRI_Tasas_NP_01,clickSerie5_GRI_IPRI_Tasas_NP_01] if(elementId_GRI_IPRI_Tasas_NP_01 == "serie1Name_GRI_IPRI_Tasas_NP_01" && clickSerie1_GRI_IPRI_Tasas_NP_01 == true){ series_GRI_IPRI_Tasas_NP_01 = repaintLineWidth(elementId_GRI_IPRI_Tasas_NP_01, "enter", mainChart_GRI_IPRI_Tasas_NP_01, clicks_GRI_IPRI_Tasas_NP_01, seriesWidth_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot({series:series_GRI_IPRI_Tasas_NP_01}) mainChart_GRI_IPRI_Tasas_NP_01.moveSeriesToFront(0) } else if(elementId_GRI_IPRI_Tasas_NP_01 == "serie2Name_GRI_IPRI_Tasas_NP_01" && clickSerie2_GRI_IPRI_Tasas_NP_01 == true){ series_GRI_IPRI_Tasas_NP_01 = repaintLineWidth(elementId_GRI_IPRI_Tasas_NP_01, "enter", mainChart_GRI_IPRI_Tasas_NP_01, clicks_GRI_IPRI_Tasas_NP_01, seriesWidth_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot({series:series_GRI_IPRI_Tasas_NP_01}) mainChart_GRI_IPRI_Tasas_NP_01.moveSeriesToFront(1) } else if(elementId_GRI_IPRI_Tasas_NP_01 == "serie3Name_GRI_IPRI_Tasas_NP_01" && clickSerie3_GRI_IPRI_Tasas_NP_01 == true){ series_GRI_IPRI_Tasas_NP_01 = repaintLineWidth(elementId_GRI_IPRI_Tasas_NP_01, "enter", mainChart_GRI_IPRI_Tasas_NP_01, clicks_GRI_IPRI_Tasas_NP_01, seriesWidth_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot({series:series_GRI_IPRI_Tasas_NP_01}) mainChart_GRI_IPRI_Tasas_NP_01.moveSeriesToFront(2) } else if(elementId_GRI_IPRI_Tasas_NP_01 == "serie4Name_GRI_IPRI_Tasas_NP_01" && clickSerie4_GRI_IPRI_Tasas_NP_01 == true){ series_GRI_IPRI_Tasas_NP_01 = repaintLineWidth(elementId_GRI_IPRI_Tasas_NP_01, "enter", mainChart_GRI_IPRI_Tasas_NP_01, clicks_GRI_IPRI_Tasas_NP_01, seriesWidth_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot({series:series_GRI_IPRI_Tasas_NP_01}) mainChart_GRI_IPRI_Tasas_NP_01.moveSeriesToFront(3) } else if(elementId_GRI_IPRI_Tasas_NP_01 == "serie5Name_GRI_IPRI_Tasas_NP_01" && clickSerie5_GRI_IPRI_Tasas_NP_01 == true){ series_GRI_IPRI_Tasas_NP_01 = repaintLineWidth(elementId_GRI_IPRI_Tasas_NP_01, "enter", mainChart_GRI_IPRI_Tasas_NP_01, clicks_GRI_IPRI_Tasas_NP_01, seriesWidth_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot({series:series_GRI_IPRI_Tasas_NP_01}) mainChart_GRI_IPRI_Tasas_NP_01.moveSeriesToFront(4) } seriesStringActual_GRI_IPRI_Tasas_NP_01 = getSeriesClickedOnLegend(this, seriesStringActual_GRI_IPRI_Tasas_NP_01, seriesStringAll_GRI_IPRI_Tasas_NP_01, mainChart_GRI_IPRI_Tasas_NP_01) seriesActual_GRI_IPRI_Tasas_NP_01 = getSeriesFromString(seriesStringActual_GRI_IPRI_Tasas_NP_01, seriesAll_GRI_IPRI_Tasas_NP_01) if(seriesActual_GRI_IPRI_Tasas_NP_01.length>0){ allSeries_GRI_IPRI_Tasas_NP_01 = getAllValuesY(seriesActual_GRI_IPRI_Tasas_NP_01,leftSliderPos_GRI_IPRI_Tasas_NP_01,rightSliderPos_GRI_IPRI_Tasas_NP_01) minLegend_GRI_IPRI_Tasas_NP_01 = getSerieMin(allSeries_GRI_IPRI_Tasas_NP_01) maxLegend_GRI_IPRI_Tasas_NP_01 = getSerieMax(allSeries_GRI_IPRI_Tasas_NP_01) } else{ minLegend_GRI_IPRI_Tasas_NP_01=-20 maxLegend_GRI_IPRI_Tasas_NP_01=20 } mainChart_GRI_IPRI_Tasas_NP_01.axes.yaxis.ticks = getYRange(minLegend_GRI_IPRI_Tasas_NP_01, maxLegend_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.axes.y2axis.ticks = getYRange(minLegend_GRI_IPRI_Tasas_NP_01, maxLegend_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.series[0].show = clickSerie1_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[1].show = clickSerie2_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[2].show = clickSerie3_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[3].show = clickSerie4_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[4].show = clickSerie5_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.replot() }) $("p").mouseleave(function() { // Ezkutatuta dagoen seriea tooltipa ez agertzeko mainChart_GRI_IPRI_Tasas_NP_01.series[5].show = false; elementId_GRI_IPRI_Tasas_NP_01 = this.id clicks_GRI_IPRI_Tasas_NP_01 = [clickSerie1_GRI_IPRI_Tasas_NP_01,clickSerie2_GRI_IPRI_Tasas_NP_01,clickSerie3_GRI_IPRI_Tasas_NP_01,clickSerie4_GRI_IPRI_Tasas_NP_01,clickSerie5_GRI_IPRI_Tasas_NP_01] if(elementId_GRI_IPRI_Tasas_NP_01 == "serie1Name_GRI_IPRI_Tasas_NP_01" && clickSerie1_GRI_IPRI_Tasas_NP_01 == true){ series_GRI_IPRI_Tasas_NP_01 = repaintLineWidth(elementId_GRI_IPRI_Tasas_NP_01, "exit", mainChart_GRI_IPRI_Tasas_NP_01, clicks_GRI_IPRI_Tasas_NP_01, seriesWidth_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot({series:series_GRI_IPRI_Tasas_NP_01}) } else if(elementId_GRI_IPRI_Tasas_NP_01 == "serie2Name_GRI_IPRI_Tasas_NP_01" && clickSerie2_GRI_IPRI_Tasas_NP_01 == true){ series_GRI_IPRI_Tasas_NP_01 = repaintLineWidth(elementId_GRI_IPRI_Tasas_NP_01, "exit", mainChart_GRI_IPRI_Tasas_NP_01, clicks_GRI_IPRI_Tasas_NP_01, seriesWidth_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot({series:series_GRI_IPRI_Tasas_NP_01}) } else if(elementId_GRI_IPRI_Tasas_NP_01 == "serie3Name_GRI_IPRI_Tasas_NP_01" && clickSerie3_GRI_IPRI_Tasas_NP_01 == true){ series_GRI_IPRI_Tasas_NP_01 = repaintLineWidth(elementId_GRI_IPRI_Tasas_NP_01, "exit", mainChart_GRI_IPRI_Tasas_NP_01, clicks_GRI_IPRI_Tasas_NP_01, seriesWidth_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot({series:series_GRI_IPRI_Tasas_NP_01}) } else if(elementId_GRI_IPRI_Tasas_NP_01 == "serie4Name_GRI_IPRI_Tasas_NP_01" && clickSerie4_GRI_IPRI_Tasas_NP_01 == true){ series_GRI_IPRI_Tasas_NP_01 = repaintLineWidth(elementId_GRI_IPRI_Tasas_NP_01, "exit", mainChart_GRI_IPRI_Tasas_NP_01, clicks_GRI_IPRI_Tasas_NP_01, seriesWidth_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot({series:series_GRI_IPRI_Tasas_NP_01}) } else if(elementId_GRI_IPRI_Tasas_NP_01 == "serie5Name_GRI_IPRI_Tasas_NP_01" && clickSerie5_GRI_IPRI_Tasas_NP_01 == true){ series_GRI_IPRI_Tasas_NP_01 = repaintLineWidth(elementId_GRI_IPRI_Tasas_NP_01, "exit", mainChart_GRI_IPRI_Tasas_NP_01, clicks_GRI_IPRI_Tasas_NP_01, seriesWidth_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot({series:series_GRI_IPRI_Tasas_NP_01}) } mainChart_GRI_IPRI_Tasas_NP_01.axes.yaxis.ticks = getYRange(minLegend_GRI_IPRI_Tasas_NP_01, maxLegend_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.axes.y2axis.ticks = getYRange(minLegend_GRI_IPRI_Tasas_NP_01, maxLegend_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.series[0].show = clickSerie1_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[1].show = clickSerie2_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[2].show = clickSerie3_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[3].show = clickSerie4_GRI_IPRI_Tasas_NP_01 mainChart_GRI_IPRI_Tasas_NP_01.series[4].show = clickSerie5_GRI_IPRI_Tasas_NP_01 /* Lehenengo serieari garrantzia emateko */ mainChart_GRI_IPRI_Tasas_NP_01.moveSeriesToFront(0) mainChart_GRI_IPRI_Tasas_NP_01.replot() }) /* Slider-aren grafikoa marraztu */ var sliderChart_GRI_IPRI_Tasas_NP_01 = $.jqplot ('chart2_GRI_IPRI_Tasas_NP_01', [s1_kopia_GRI_IPRI_Tasas_NP_01,s2_kopia_GRI_IPRI_Tasas_NP_01,s3_kopia_GRI_IPRI_Tasas_NP_01,s4_kopia_GRI_IPRI_Tasas_NP_01,s5_kopia_GRI_IPRI_Tasas_NP_01], { grid: { background: 'white', drawBorder: false, shadow: false, }, seriesColors: ["#0000FF", "#FFA500", "#008000", "#FF0000", "#FFC0CB"], series:[ {label:serieNames_GRI_IPRI_Tasas_NP_01[0],renderer:$.jqplot.LineRenderer,color: "#0000FF",lineWidth: 1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}}, {label:serieNames_GRI_IPRI_Tasas_NP_01[1],renderer:$.jqplot.LineRenderer,color: "#FFA500",lineWidth: 1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}}, {label:serieNames_GRI_IPRI_Tasas_NP_01[2],renderer:$.jqplot.LineRenderer,color: "#008000",lineWidth: 1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}}, {label:serieNames_GRI_IPRI_Tasas_NP_01[3],renderer:$.jqplot.LineRenderer,color: "#FF0000",lineWidth: 1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}}, {label:serieNames_GRI_IPRI_Tasas_NP_01[4],renderer:$.jqplot.LineRenderer,color: "#FFC0CB",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_IPRI_Tasas_NP_01 = formatTickLabelSlider(val, s1_kopia_GRI_IPRI_Tasas_NP_01[0][0], s1_kopia_GRI_IPRI_Tasas_NP_01[s1_kopia_GRI_IPRI_Tasas_NP_01.length-1][0], s1_GRI_IPRI_Tasas_NP_01, language, "monthly_data") return tickName_GRI_IPRI_Tasas_NP_01 }, textColor: 'black' }, ticks : getXRangeSlider(s1_kopia_GRI_IPRI_Tasas_NP_01[0][0], s1_kopia_GRI_IPRI_Tasas_NP_01[s1_kopia_GRI_IPRI_Tasas_NP_01.length-1][0]), drawMajorGridlines: true, drawMinorGridlines: true }, yaxis: { rendererOptions: {forceTickAt0: true}, tickOptions: {formatString: "%'i" }, showTicks: false, min: minYSliderGraph_GRI_IPRI_Tasas_NP_01 - yAddedQuantity_GRI_IPRI_Tasas_NP_01, max:maxYSliderGraph_GRI_IPRI_Tasas_NP_01 + yAddedQuantity_GRI_IPRI_Tasas_NP_01 } } }); /* SliderChart-eko hasierako laukizuzenak marrazteko*/ sliderChart_GRI_IPRI_Tasas_NP_01.replot({ canvasOverlay: { show: true, objects: [ { rectangle: { xmin:0,xmax: minSliderPos_GRI_IPRI_Tasas_NP_01, xminOffset: "0px", xmaxOffset: "0px", yminOffset: "0px", ymaxOffset: "0px", color: "rgba(192,192,192,0.5)"} }, { rectangle: { xmin:maxSliderPos_GRI_IPRI_Tasas_NP_01,xmax: s1_kopia_GRI_IPRI_Tasas_NP_01[s1_kopia_GRI_IPRI_Tasas_NP_01.length - 1][0], xminOffset: "0px", xmaxOffset: "0px", yminOffset: "0px", ymaxOffset: "0px", color: "rgba(192,192,192,0.5)"} } ] } }) sliderChart_GRI_IPRI_Tasas_NP_01.moveSeriesToFront(0) /* Slider-a marraztu */ $("#slider_GRI_IPRI_Tasas_NP_01").slider({ max: maxSlider_GRI_IPRI_Tasas_NP_01, min: minSlider_GRI_IPRI_Tasas_NP_01, range: true, values: [ minSliderPos_GRI_IPRI_Tasas_NP_01, maxSliderPos_GRI_IPRI_Tasas_NP_01 ], slide: function(event,ui){ var serie1New_GRI_IPRI_Tasas_NP_01 = new Array() var serie2New_GRI_IPRI_Tasas_NP_01 = new Array() var serie3New_GRI_IPRI_Tasas_NP_01 = new Array() var serie4New_GRI_IPRI_Tasas_NP_01 = new Array() var serie5New_GRI_IPRI_Tasas_NP_01 = new Array() var datesArrayBerria_GRI_IPRI_Tasas_NP_01 = new Array() for(i=ui.values[0];i<=ui.values[1];i++) { serie1New_GRI_IPRI_Tasas_NP_01.push(s1_GRI_IPRI_Tasas_NP_01[i]); serie2New_GRI_IPRI_Tasas_NP_01.push(s2_GRI_IPRI_Tasas_NP_01[i]); serie3New_GRI_IPRI_Tasas_NP_01.push(s3_GRI_IPRI_Tasas_NP_01[i]); serie4New_GRI_IPRI_Tasas_NP_01.push(s4_GRI_IPRI_Tasas_NP_01[i]); serie5New_GRI_IPRI_Tasas_NP_01.push(s5_GRI_IPRI_Tasas_NP_01[i]); datesArrayBerria_GRI_IPRI_Tasas_NP_01.push(s1_GRI_IPRI_Tasas_NP_01[i][0]) } var valuesNew_GRI_IPRI_Tasas_NP_01 = getAllValuesY([serie1New_GRI_IPRI_Tasas_NP_01, serie2New_GRI_IPRI_Tasas_NP_01, serie3New_GRI_IPRI_Tasas_NP_01,serie4New_GRI_IPRI_Tasas_NP_01,serie5New_GRI_IPRI_Tasas_NP_01],0,serie1New_GRI_IPRI_Tasas_NP_01.length-1) min_GRI_IPRI_Tasas_NP_01 = getSerieMin(valuesNew_GRI_IPRI_Tasas_NP_01) max_GRI_IPRI_Tasas_NP_01 = getSerieMax(valuesNew_GRI_IPRI_Tasas_NP_01) serieBerria1_GRI_IPRI_Tasas_NP_01 = changeSeries(serie1New_GRI_IPRI_Tasas_NP_01) serieBerria2_GRI_IPRI_Tasas_NP_01 = changeSeries(serie2New_GRI_IPRI_Tasas_NP_01) serieBerria3_GRI_IPRI_Tasas_NP_01 = changeSeries(serie3New_GRI_IPRI_Tasas_NP_01) serieBerria4_GRI_IPRI_Tasas_NP_01 = changeSeries(serie4New_GRI_IPRI_Tasas_NP_01) serieBerria5_GRI_IPRI_Tasas_NP_01 = changeSeries(serie5New_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.destroy() mainChart_GRI_IPRI_Tasas_NP_01 = $.jqplot ('chart1_GRI_IPRI_Tasas_NP_01', [serieBerria1_GRI_IPRI_Tasas_NP_01,serieBerria2_GRI_IPRI_Tasas_NP_01,serieBerria3_GRI_IPRI_Tasas_NP_01, serieBerria4_GRI_IPRI_Tasas_NP_01,serieBerria5_GRI_IPRI_Tasas_NP_01,s1_hidden_GRI_IPRI_Tasas_NP_01], { 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", "#FF0000", "#FFC0CB", "black"], series:[ {label:serieNames_GRI_IPRI_Tasas_NP_01[0],show:document.getElementById("s1_checkbox_GRI_IPRI_Tasas_NP_01").checked,renderer:$.jqplot.LineRenderer,color:"#0000FF",lineWidth:1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}}, {label:serieNames_GRI_IPRI_Tasas_NP_01[1],show:document.getElementById("s2_checkbox_GRI_IPRI_Tasas_NP_01").checked,renderer:$.jqplot.LineRenderer,color:"#FFA500",lineWidth:1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}}, {label:serieNames_GRI_IPRI_Tasas_NP_01[2],show:document.getElementById("s3_checkbox_GRI_IPRI_Tasas_NP_01").checked,renderer:$.jqplot.LineRenderer,color:"#008000",lineWidth:1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}}, {label:serieNames_GRI_IPRI_Tasas_NP_01[3],show:document.getElementById("s4_checkbox_GRI_IPRI_Tasas_NP_01").checked,renderer:$.jqplot.LineRenderer,color:"#FF0000",lineWidth:1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}}, {label:serieNames_GRI_IPRI_Tasas_NP_01[4],show:document.getElementById("s5_checkbox_GRI_IPRI_Tasas_NP_01").checked,renderer:$.jqplot.LineRenderer,color:"#FFC0CB",lineWidth:1,rendererOptions:{smooth:true},pointLabels:{show:false},markerOptions:{size:0}}, {yaxis:"y2axis",renderer:$.jqplot.LineRenderer,color:"#FFC0CB"} ], axesDefaults: { labelRenderer: $.jqplot.CanvasAxisLabelRenderer }, axes: { xaxis: { //tickRenderer: $.jqplot.CanvasAxisTickRenderer, tickOptions: { formatter: function (format, val) { tickName_GRI_IPRI_Tasas_NP_01 = formatTickLabel(val, serieBerria1_GRI_IPRI_Tasas_NP_01[0][0], serieBerria1_GRI_IPRI_Tasas_NP_01[serieBerria1_GRI_IPRI_Tasas_NP_01.length-1][0], serie1New_GRI_IPRI_Tasas_NP_01, language, "monthly_data") return tickName_GRI_IPRI_Tasas_NP_01 }, textColor: 'black' }, ticks : getXRange(serieBerria1_GRI_IPRI_Tasas_NP_01[0][0], serieBerria1_GRI_IPRI_Tasas_NP_01[serieBerria1_GRI_IPRI_Tasas_NP_01.length-1][0]), drawMajorGridlines: true }, yaxis: { tickOptions: {formatString: "%'i" }, ticks:getYRange(min_GRI_IPRI_Tasas_NP_01, max_GRI_IPRI_Tasas_NP_01) }, y2axis: { rendererOptions: {alignTicks: true}, tickOptions: {formatString: "%'i" }, ticks:getYRange(min_GRI_IPRI_Tasas_NP_01, max_GRI_IPRI_Tasas_NP_01) } }, highlighter: { show: true, tooltipContentEditor: function (str, seriesIndex, pointIndex, plot) { var date_GRI_IPRI_Tasas_NP_01 = datesArrayBerria_GRI_IPRI_Tasas_NP_01[plot.data[seriesIndex][pointIndex][0]]; var s_name_GRI_IPRI_Tasas_NP_01 = plot.series[seriesIndex]["label"]; num_GRI_IPRI_Tasas_NP_01 = plot.data[seriesIndex][pointIndex][1] var value_GRI_IPRI_Tasas_NP_01 = num_GRI_IPRI_Tasas_NP_01//plot.data[seriesIndex][pointIndex][1]; var yearString_GRI_IPRI_Tasas_NP_01 = date_GRI_IPRI_Tasas_NP_01.substring(6,10); var monthString_GRI_IPRI_Tasas_NP_01 = date_GRI_IPRI_Tasas_NP_01.substring(3,5); if ("yearly_data"==="monthly_data") { monthName_GRI_IPRI_Tasas_NP_01 = ""; } else if ("quarterly_data"==="monthly_data") { monthName_GRI_IPRI_Tasas_NP_01 = getQuarter(monthString_GRI_IPRI_Tasas_NP_01, language) + ", "; } else { monthName_GRI_IPRI_Tasas_NP_01 = getMonthHighlight(monthString_GRI_IPRI_Tasas_NP_01, language) + ", "; } var html_GRI_IPRI_Tasas_NP_01 = "
"; html_GRI_IPRI_Tasas_NP_01 += "" + monthName_GRI_IPRI_Tasas_NP_01 + yearString_GRI_IPRI_Tasas_NP_01 + ""; html_GRI_IPRI_Tasas_NP_01 += "
"; html_GRI_IPRI_Tasas_NP_01 += s_name_GRI_IPRI_Tasas_NP_01 + ": "; html_GRI_IPRI_Tasas_NP_01 += "" + number_format(value_GRI_IPRI_Tasas_NP_01, 2) + ""; html_GRI_IPRI_Tasas_NP_01 += "
"; return html_GRI_IPRI_Tasas_NP_01; }, sizeAdjust: 8.5, //tooltipLocation : 'n' } }); // Ezkutatuta dagoen seriea tooltipa ez agertzeko mainChart_GRI_IPRI_Tasas_NP_01.series[5].show = false; /* Line-chart-ari dagokion lehenengo serieari garrantzia emateko */ mainChart_GRI_IPRI_Tasas_NP_01.moveSeriesToFront(0) /* SliderChart-eko momentuko laukizuzenak marrazteko*/ sliderChart_GRI_IPRI_Tasas_NP_01.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_IPRI_Tasas_NP_01[s1_kopia_GRI_IPRI_Tasas_NP_01.length - 1][0], xminOffset: "0px", xmaxOffset: "0px", yminOffset: "0px", ymaxOffset: "0px", color: "rgba(192,192,192,0.5)"} } ] } }) sliderChart_GRI_IPRI_Tasas_NP_01.moveSeriesToFront(0) /* Legendan klikatuta dauden serieen maximo eta minimoa eguneratzeko*/ leftSliderPos_GRI_IPRI_Tasas_NP_01 = ui.values[0] rightSliderPos_GRI_IPRI_Tasas_NP_01 = ui.values[1] seriesStringActual_GRI_IPRI_Tasas_NP_01 = getSeriesClickedOnLegend(this, seriesStringActual_GRI_IPRI_Tasas_NP_01, seriesStringAll_GRI_IPRI_Tasas_NP_01, mainChart_GRI_IPRI_Tasas_NP_01) seriesActual_GRI_IPRI_Tasas_NP_01 = getSeriesFromString(seriesStringActual_GRI_IPRI_Tasas_NP_01, seriesAll_GRI_IPRI_Tasas_NP_01) allSeries_GRI_IPRI_Tasas_NP_01 = getAllValuesY(seriesActual_GRI_IPRI_Tasas_NP_01,leftSliderPos_GRI_IPRI_Tasas_NP_01,rightSliderPos_GRI_IPRI_Tasas_NP_01) minLegend_GRI_IPRI_Tasas_NP_01 = getSerieMin(allSeries_GRI_IPRI_Tasas_NP_01) maxLegend_GRI_IPRI_Tasas_NP_01 = getSerieMax(allSeries_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.axes.yaxis.ticks = getYRange(minLegend_GRI_IPRI_Tasas_NP_01, maxLegend_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.axes.y2axis.ticks = getYRange(minLegend_GRI_IPRI_Tasas_NP_01, maxLegend_GRI_IPRI_Tasas_NP_01) mainChart_GRI_IPRI_Tasas_NP_01.replot(); } }); /* */ function repaintLineWidth(serieId, eventType, mainChart, clicks, seriesWidth){ var series_GRI_IPRI_Tasas_NP_01; if (serieId == "serie1Name_GRI_IPRI_Tasas_NP_01" && 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: TAMANOpx; font-style: italic; font-weight: normal;"); } else if (serieId == "serie1Name_GRI_IPRI_Tasas_NP_01" && eventType == "exit"){ if(clicks[0] == true) seriesWidth[0] = seriesWidth[0] -1 document.getElementById(serieId).setAttribute("style", "font-family: Verdana !important; font-size: TAMANOpx; font-style: italic; font-weight: normal;"); } if (serieId == "serie2Name_GRI_IPRI_Tasas_NP_01" && 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: TAMANOpx; font-style: italic; font-weight: normal;"); } else if (serieId == "serie2Name_GRI_IPRI_Tasas_NP_01" && eventType == "exit"){ if(clicks[1] == true)seriesWidth[1] = seriesWidth[1] - 1 document.getElementById(serieId).setAttribute("style", "font-family: Verdana !important; font-size: TAMANOpx; font-style: italic; font-weight: normal;"); } if (serieId == "serie3Name_GRI_IPRI_Tasas_NP_01" && 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: TAMANOpx; font-style: italic; font-weight: normal;"); } else if (serieId == "serie3Name_GRI_IPRI_Tasas_NP_01" && eventType == "exit"){ if(clicks[2] == true)seriesWidth[2] = seriesWidth[2] - 1 document.getElementById(serieId).setAttribute("style", "font-family: Verdana !important; font-size: TAMANOpx; font-style: italic; font-weight: normal;"); } if (serieId == "serie4Name_GRI_IPRI_Tasas_NP_01" && eventType == "enter"){ if(clicks[3] == true)seriesWidth[3] = seriesWidth[3] + 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: TAMANOpx; font-style: italic; font-weight: normal;"); } else if (serieId == "serie4Name_GRI_IPRI_Tasas_NP_01" && eventType == "exit"){ if(clicks[3] == true)seriesWidth[3] = seriesWidth[3] - 1 document.getElementById(serieId).setAttribute("style", "font-family: Verdana !important; font-size: TAMANOpx; font-style: italic; font-weight: normal;"); } if (serieId == "serie5Name_GRI_IPRI_Tasas_NP_01" && eventType == "enter"){ if(clicks[4] == true)seriesWidth[4] = seriesWidth[4] + 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: TAMANOpx; font-style: italic; font-weight: normal;"); } else if (serieId == "serie5Name_GRI_IPRI_Tasas_NP_01" && eventType == "exit"){ if(clicks[4] == true)seriesWidth[4] = seriesWidth[4] - 1 document.getElementById(serieId).setAttribute("style", "font-family: Verdana !important; font-size: TAMANOpx; font-style: italic; font-weight: normal;"); } series_GRI_IPRI_Tasas_NP_01 = [{lineWidth: seriesWidth[0]},{lineWidth: seriesWidth[1]},{lineWidth: seriesWidth[2]},{lineWidth: seriesWidth[3]},{lineWidth: seriesWidth[4]},{lineWidth: 0.01}] return series_GRI_IPRI_Tasas_NP_01; } /* Funtzio honek Legend-an klikaturik dauden serieen array-a itzultzen du eta seriea pintatu/ez pintatu */ function getSeriesClickedOnLegend(thisClicked, seriesActual, seriesAll, mainChart){ result_GRI_IPRI_Tasas_NP_01 = seriesActual if(thisClicked.value=="s1_legend_GRI_IPRI_Tasas_NP_01"){ index = indexOfSerieClicked(thisClicked.value, seriesActual) if(thisClicked.checked == true){ result_GRI_IPRI_Tasas_NP_01.splice(index, 0, seriesAll[0]); } else{ result_GRI_IPRI_Tasas_NP_01.splice(index, 1); } mainChart.series[0].show = thisClicked.checked; } if(thisClicked.value=="s2_legend_GRI_IPRI_Tasas_NP_01"){ index = indexOfSerieClicked(thisClicked.value, seriesActual) if(thisClicked.checked == true){ result_GRI_IPRI_Tasas_NP_01.splice(index, 0, seriesAll[1]); } else{ result_GRI_IPRI_Tasas_NP_01.splice(index, 1); } mainChart.series[1].show = thisClicked.checked; } if(thisClicked.value=="s3_legend_GRI_IPRI_Tasas_NP_01"){ index = indexOfSerieClicked(thisClicked.value, seriesActual) if(thisClicked.checked == true){ result_GRI_IPRI_Tasas_NP_01.splice(index, 0, seriesAll[2]); } else{ result_GRI_IPRI_Tasas_NP_01.splice(index, 1); } mainChart.series[2].show = thisClicked.checked; } if(thisClicked.value=="s4_legend_GRI_IPRI_Tasas_NP_01"){ index = indexOfSerieClicked(thisClicked.value, seriesActual) if(thisClicked.checked == true){ result_GRI_IPRI_Tasas_NP_01.splice(index, 0, seriesAll[3]); } else{ result_GRI_IPRI_Tasas_NP_01.splice(index, 1); } mainChart.series[3].show = thisClicked.checked; } if(thisClicked.value=="s5_legend_GRI_IPRI_Tasas_NP_01"){ index = indexOfSerieClicked(thisClicked.value, seriesActual) if(thisClicked.checked == true){ result_GRI_IPRI_Tasas_NP_01.splice(index, 0, seriesAll[4]); } else{ result_GRI_IPRI_Tasas_NP_01.splice(index, 1); } mainChart.series[4].show = thisClicked.checked; } return result_GRI_IPRI_Tasas_NP_01 } });