CINXE.COM

NIC M茅xico

<!doctype html> <html lang="es" data-critters-container> <head> <meta charset="utf-8"> <title>NIC M茅xico</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style>html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}img{border:0}@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}img{page-break-inside:avoid}img{max-width:100%!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}img{vertical-align:middle}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-viewport{width:device-width}</style><link rel="stylesheet" href="./assets/bootstrap/css/bootstrap.min.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="./assets/bootstrap/css/bootstrap.min.css"></noscript> <script src="./assets/bootstrap/jquery/jquery.min.js"></script> <script src="./assets/bootstrap/js/bootstrap.min.js"></script> <script src="https://player.vimeo.com/api/player.js"></script> <!-- Meta Pixel Code --> <script> !function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', '277403158546454'); fbq('track', 'PageView'); </script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=277403158546454&ev=PageView&noscript=1"></noscript> <!-- End Meta Pixel Code --> <!-- Metricool Tag --> <script> function loadScript(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.src="https://tracker.metricool.com/resources/be.js",c.onreadystatechange=a,c.onload=a,b.appendChild(c)}loadScript(function(){beTracker.t({hash:"8058c7a0f3b9767ff993f5004e233115"})}); </script> <!-- Metricool Tag --> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-KMPX2FK');</script> <!-- End Google Tag Manager --> <script> var a2a_config = a2a_config || {}; a2a_config.locale = "es"; </script> <script async src="https://static.addtoany.com/menu/page.js"></script> <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"> </script> <script src="./assets/js/jspdf.js"></script> <script src="./assets/js/addimage.js"></script> <script src="./assets/js/pdf/js/jquery/jquery-1.7.1.min.js" type="text/javascript"></script> <script src="./assets/js/pdf/libs/png_support/png.js" type="text/javascript"></script> <script src="./assets/js/pdf/libs/png_support/zlib.js" type="text/javascript"></script> <script src="./assets/js/pdf/libs/deflate.js" type="text/javascript"></script> <script src="./assets/js/pdf/dist/jspdf.debug.js" type="text/javascript"></script> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> function changeName(original){ let changed = original switch(original){ case "domains_mx" : { changed = "Nombres de Dominio MX por entidad federativa" break; } case "domains_world" : { changed = "Nombres de Dominio MX a nivel mundial" break; } case "domains_ca" : { changed = "Nombres de Dominio MX por provincia (Canad谩)" break; } case "domains_us" : { changed = "Nombres de Dominio MX por estado (USA)" break; } case "total_domains" : { changed = "Nombres de Dominio MX activos por a帽o" break; } case "type_domains" : { changed = "Total de Nombres por Tipo de Dominio" break; } case "instant_domains" : { changed = "Total de Nombres de Dominio MX" break; } case "domain_content" : { changed = "Nombres de Dominio por tipo de contenido" break; } case "reg_domains" : { changed = "Registros de Nombres de Dominio MX por a帽o" break; } case "dnssec_total" : { changed = "Nombres de Dominio MX con DNSSEC" break; } case "dnssec_pct" : { changed = "Porcentaje de Nombres de Dominio MX con DNSSEC" break; } case "domain_disputes" : { changed = "Disputas de Dombre de Dominio MX" break; } case "domain_chars" : { changed = "Nombres de Dominio por cantidad de caract茅res" break; } case "blocks_ipv4" : { changed = "Asignaci贸n de bloques IPv4 por a帽o" break; } case "blocks_ipv6" : { changed = "Asignaci贸n de bloques IPv6 por a帽o" break; } case "blocks_ipall" : { changed = "Asignaci贸n de bloques IPv4 e IPv6 por a帽o" break; } case "asns" : { changed = "Asignaci贸n de ASNs por a帽o" break; } case "month_slas" : { changed = "Disponibilidad de DNS, EPP, WHOIS" break; } case "total_registrars" : { changed = "Registrars Acreditados MX" break; } case "org_domains" : { changed = "Tipo de Registrantes de Nombres de Dominio MX" break; } case "domain_registrants" : { changed = "Registrantes asociados a Nombres de Dominio MX" break; } } return changed } function exportCSV (name) { var jsonString = sessionStorage.getItem(name.toString()); var data = new google.visualization.DataTable(jsonString); var browserIsIE; var downloadLink; var csvData = []; var tmpArr = []; var tmpStr = ''; var dataList = [] for (var i = 0; i < data.getNumberOfColumns(); i++) { tmpStr = data.getColumnLabel(i).replace(/"/g, '""'); tmpArr.push('"' + tmpStr + '"'); } csvData.push(tmpArr); for (var i = 0; i < data.getNumberOfRows(); i++) { tmpArr = []; for (var j = 0; j < data.getNumberOfColumns(); j++) { switch(data.getColumnType(j)) { case 'string': tmpStr = data.getValue(i, j).replace(/"/g, '""'); tmpArr.push('"' + tmpStr + '"'); dataList.push(data.getValue(i, j)) break; case 'number': tmpArr.push(data.getValue(i, j)); dataList.push(data.getValue(i, j)) break; } } csvData.push(tmpArr.join(',')); } var output = csvData.join('\n'); browserIsIE = false || !!document.documentMode; if (browserIsIE) { window.navigator.msSaveBlob(new Blob([output], {type: 'data:text/csv'}), changeName(name)); } else { downloadLink = document.createElement('a'); downloadLink.href = 'data:text/csv;charset=utf-8,' + encodeURI(output); downloadLink.download = changeName(name); downloadLink.click(); downloadLink = null; } }; </script> <script> let addr = window.location.href addr = addr.split("/") if(addr[addr.length - 1] === "nombres-de-dominio"){ google.charts.load('current', { packages: ['corechart'] }); function ajax_data(type, url, success) { $.ajax({ type: type, url: url, dataType: "text", cache: false, timeout: 20000, beforeSend: function (data) { }, success: function (data) { success.call(this, data); }, error: function (data) { alert("Error al procesar archivo" + url); } }); } $(document).ready(function () { url = '../assets/csv/ftp_line_domains.csv'; ajax_data('GET', url, function (data) { charts1(data); }); url = '../assets/csv/ftp_line_domains_all.csv'; ajax_data('GET', url, function (data) { charts2(data); }); url = '../assets/csv/domains_instant_statistics.csv'; ajax_data('GET', url, function (data) { charts3(data); }); url = '../assets/csv/ftp_dnssec_growth_year.csv'; ajax_data('GET', url, function (data) { charts5(data); }); url = '../assets/csv/ftp_dnssec_growth_pct.csv'; ajax_data('GET', url, function (data) { charts6(data); }); url = '../assets/csv/ftp_domain_disputes.csv'; ajax_data('GET', url, function (data) { charts7(data); }); url = '../assets/csv/ftp_donut_content.csv'; ajax_data('GET', url, function (data) { charts8(data); }); url = '../assets/csv/ftp_domain_chars4.csv'; ajax_data('GET', url, function (data) { charts10(data); }); url = '../assets/csv/ftp_combo_domains.csv'; ajax_data('GET', url, function (data) { charts12(data); }); url = '../assets/csv/ftp_column_registrars.csv'; ajax_data('GET', url, function (data) { charts11(data); }); url = '../assets/csv/ftp_registrant_org.csv'; ajax_data('GET', url, function (data) { charts4(data); }); }); function charts1(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization1); function drawVisualization1() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('number', 'Year'); data_table.addColumn('number', '.com.mx'); data_table.addColumn('number', '.org.mx'); data_table.addColumn('number', '.gob.mx'); data_table.addColumn('number', '.edu.mx'); data_table.addColumn('number', '.net.mx'); data_table.addColumn('number', '.mx'); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { //Process the rest of the rows (actual data) data_table.addRow([parseInt(cell_data[0]), parseInt(cell_data[1]), parseInt(cell_data[2]), parseInt(cell_data[3]), parseInt(cell_data[4]), parseInt(cell_data[5]), parseInt(cell_data[6])]); } } } var formatter = new google.visualization.NumberFormat({ pattern: '####' }); formatter.format(data_table, 0); // Apply formatter to second column var options = { hAxis: { title: 'A帽o', format: '####' }, vAxis: { title: 'Total' }, backgroundColor: '#ffffff', chartArea: { width: '65%' } }; var chart = new google.visualization.LineChart(document.getElementById('type_domains')); sessionStorage.setItem("type_domains", data_table.toJSON()); var chart_div = document.getElementById('type_domains_PNG'); var btnSave = document.getElementById('type_domains_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('type_domains') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("type_domains") + ".png"; a.click(); }, false); $('#checkComMx').change(function () { updateGraphic(); }); $('#checkOrgMx').change(function () { updateGraphic(); }); $('#checkGobMx').change(function () { updateGraphic(); }); $('#checkEduMx').change(function () { updateGraphic(); }); $('#checkNetMx').change(function () { updateGraphic(); }); $('#checkMx').change(function () { updateGraphic(); }); function updateGraphic() { var isComChecked = document.getElementById('checkComMx').checked; var isOrgChecked = document.getElementById('checkOrgMx').checked; var isGobChecked = document.getElementById('checkGobMx').checked; var isEduChecked = document.getElementById('checkEduMx').checked; var isNetChecked = document.getElementById('checkNetMx').checked; var isMxChecked = document.getElementById('checkMx').checked; var new_data_table = new google.visualization.DataTable(); new_data_table.addColumn('number', 'Year'); new_data_table.addColumn('number', '.com.mx'); new_data_table.addColumn('number', '.org.mx'); new_data_table.addColumn('number', '.gob.mx'); new_data_table.addColumn('number', '.edu.mx'); new_data_table.addColumn('number', '.net.mx'); new_data_table.addColumn('number', '.mx'); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { //Process the rest of the rows (actual data) new_data_table.addRow([parseInt(cell_data[0]), parseInt(cell_data[1]), parseInt(cell_data[2]), parseInt(cell_data[3]), parseInt(cell_data[4]), parseInt(cell_data[5]), parseInt(cell_data[6])]); } } } var formatter2 = new google.visualization.NumberFormat({ pattern: '####' }); formatter2.format(new_data_table, 0); // Apply formatter to second column if (!isMxChecked) { new_data_table.removeColumn(6); } if (!isNetChecked) { new_data_table.removeColumn(5); } if (!isEduChecked) { new_data_table.removeColumn(4); } if (!isGobChecked) { new_data_table.removeColumn(3); } if (!isOrgChecked) { new_data_table.removeColumn(2); } if (!isComChecked) { new_data_table.removeColumn(1); } var options2 = { hAxis: { title: 'A帽o', format: '####' }, vAxis: { title: 'Total' }, backgroundColor: '#ffffff', chartArea: { width: '65%' } }; var chart2 = new google.visualization.LineChart(document.getElementById('type_domains')); chart2.draw(new_data_table, options2); } } }; function charts2(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization2); function drawVisualization2() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('number', 'Year'); data_table.addColumn('number', 'Total'); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { data_table.addRow([parseInt(cell_data[0]), parseInt(cell_data[1])]); } } } var formatter = new google.visualization.NumberFormat({ pattern: '####' }); formatter.format(data_table, 0); var options = { hAxis: { title: 'A帽o', format: '####' }, vAxis: { title: 'Total' }, series: { 1: { curveType: 'function' } }, backgroundColor: '#ffffff', width: '80%', colors: ['#00aeef'] }; var chart = new google.visualization.LineChart(document.getElementById('total_domains')); var chart_div = document.getElementById('total_domains_PNG'); var btnSave = document.getElementById('total_domains_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('total_domains') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("total_domains") + ".png"; a.click(); }, false); } }; function charts3(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization3); function drawVisualization3() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('string', 'Dominio'); data_table.addColumn('number', 'Cantidad'); var mxAmount = 0; for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row if (cell_data[0] == 'mx') { mxAmount = parseInt(cell_data[1]); } else { data_table.addRow(['.' + cell_data[0], parseInt(cell_data[1])]); } } } } } data_table.addRow(['.mx', mxAmount]); var options = { title: 'Dominios .MX', legend: 'legend', pieSliceText: 'pieSliceText', sliceVisibilityThreshold: 0, slices: { 0: { color: '#006991', offset: 0.0 }, 1: { color: '#03c689', offset: 0.1 }, 2: { color: '#eb8258', offset: 0.2 }, 3: { color: '#0092c9', offset: 0.1 }, 4: { color: '#7c0abf', offset: 0.1 }, 5: { color: '#00aeef', offset: 0.0 } }, }; var chart = new google.visualization.PieChart(document.getElementById('instant_domains')); sessionStorage.setItem("instant_domains", data_table.toJSON()); var chart_div = document.getElementById('instant_domains_PNG'); var btnSave = document.getElementById('instant_domains_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('instant_domains') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("instant_domains") + ".png"; a.click(); }, false); } }; function charts5(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization5); function drawVisualization5() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('number', 'Year'); data_table.addColumn('number', 'Total'); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { //Process the rest of the rows (actual data) data_table.addRow([parseInt(cell_data[0]), parseInt(cell_data[1])]); } } } var formatter = new google.visualization.NumberFormat({ pattern: '####' }); formatter.format(data_table, 0); // Apply formatter to second column var options = { hAxis: { title: 'A帽o', format: '####' }, vAxis: { title: 'Total', }, series: { 1: { curveType: 'function' } }, backgroundColor: '#ffffff', width: '80%', colors: ['#00aeef'] }; var chart = new google.visualization.LineChart(document.getElementById('dnssec_total')); var chart_div = document.getElementById('dnssec_total_PNG'); var btnSave = document.getElementById('dnssec_total_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('dnssec_total') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("dnssec_total") + ".png"; a.click(); }, false); } }; function charts6(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization6); function drawVisualization6() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('number', 'Year'); data_table.addColumn('number', '%'); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { //Process the rest of the rows (actual data) data_table.addRow([parseInt(cell_data[0]), parseInt(cell_data[1]) / parseInt(cell_data[2]) * 100]); } } } var formatter = new google.visualization.NumberFormat({ pattern: '####' }); formatter.format(data_table, 0); // Apply formatter to second column var options = { hAxis: { title: 'A帽o', format: '####' }, vAxis: { title: '% Dominios con DNSSEC' }, series: { 1: { curveType: 'function' } }, backgroundColor: '#ffffff', width: '80%', colors: ['#00aeef'] }; var chart = new google.visualization.LineChart(document.getElementById('dnssec_pct')); sessionStorage.setItem("dnssec_pct", data_table.toJSON()); var chart_div = document.getElementById('dnssec_pct_PNG'); var btnSave = document.getElementById('dnssec_pct_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('dnssec_pct') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("dnssec_pct") + ".png"; a.click(); }, false); } }; function charts7(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization7); function drawVisualization7() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('string', 'A帽o'); data_table.addColumn('number', 'Transferencia'); data_table.addColumn('number', 'Rechazo'); data_table.addColumn('number', 'Terminaci贸n'); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([cell_data[0], parseInt(cell_data[1]), parseInt(cell_data[2]), parseInt(cell_data[3])]); } } } } var options = { legend: { position: 'top', maxLines: 3 }, colors: ['#006991', '#00aeef', '#eb8258'], isStacked: true, hAxis: { title: 'A帽o' }, vAxis: { title: 'Resultado' } }; var chart = new google.visualization.ColumnChart(document.getElementById('domain_disputes')); sessionStorage.setItem("domain_disputes", data_table.toJSON()); var chart_div = document.getElementById('domain_disputes_PNG'); var btnSave = document.getElementById('domain_disputes_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('domain_disputes') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("domain_disputes") + ".png"; a.click(); }, false); } }; function charts8(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization8); function drawVisualization8() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('string', 'Content'); data_table.addColumn('number', 'Total'); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([cell_data[0], parseInt(cell_data[1])]); } } } } var options = { title: 'Contenido de Dominios .MX', legend: 'legend', pieSliceText: 'pieSliceText', sliceVisibilityThreshold: 0, slices: { 0: { color: '#116787', offset: 0.0 }, 1: { color: '#7c0abf', offset: 0.0 }, 2: { color: '#26b566', offset: 0.0 }, 3: { color: '#0092c9', offset: 0.0 }, 4: { color: '#334533', offset: 0.0 }, 5: { color: '#c5d8e1', offset: 0.0 }, 6: { color: '#102c47', offset: 0.0 }, 7: { color: '#03c689', offset: 0.0 }, 8: { color: '#51adab', offset: 0.0 }, 9: { color: '#eb8258', offset: 0.0 }, 10: { color: '#0cbce4', offset: 0.0 }, 11: { color: '#703770', offset: 0.0 }, 12: { color: '#aee572', offset: 0.0 } }, }; var chart = new google.visualization.PieChart(document.getElementById('domain_content')); sessionStorage.setItem("domain_content", data_table.toJSON()); var chart_div = document.getElementById('domain_content_PNG'); var btnSave = document.getElementById('domain_content_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('domain_content') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("domain_content") + ".png"; a.click(); }, false); } }; function charts10(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization10); function drawVisualization10() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('number', 'Dominios'); data_table.addColumn('number', 'Caracteres'); data_table.addColumn({ type: 'string', role: 'tooltip' }, '[Dominios | Caracteres]'); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([parseInt(cell_data[0]), parseInt(cell_data[1]), '[' + parseInt(cell_data[1]) + ' Dominios | ' + parseInt(cell_data[0]) + ' Caracteres]']); } } } } var options = { hAxis: { title: 'Cantidad de caracteres', viewWindow: { max: 32, min: 0, }, ticks: [0, 5, 10, 15, 20, 25, 30] }, vAxis: { title: '# Dominios', minValue: 0, maxValue: 100000 }, legend: 'none', colors: ['#006991'] }; var chart = new google.visualization.ScatterChart(document.getElementById('domain_chars')); sessionStorage.setItem("domain_chars", data_table.toJSON()); var chart_div = document.getElementById('domain_chars_PNG'); var btnSave = document.getElementById('domain_chars_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('domain_chars') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("domain_chars") + ".png"; a.click(); }, false); } }; function charts12(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization12); function drawVisualization12() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('number', 'Year'); data_table.addColumn('number', 'Registrados'); data_table.addColumn('number', 'Pagados'); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { //Process the rest of the rows (actual data) data_table.addRow([parseInt(cell_data[0]), parseInt(cell_data[1]), parseInt(cell_data[2])]); } } } var formatter2 = new google.visualization.NumberFormat({ pattern: '####' }); formatter2.format(data_table, 0); // Apply formatter to first column var options = { vAxes: [{ title: "Total" }, { title: "Total de Dominios" }], hAxis: { title: "A帽o", format: '####' }, series: { 0: { type: "line", targetAxisIndex: 0, color: '#006991', }, 1: { type: "line", targetAxisIndex: 0, color: '#00aeef', } } }; var chart = new google.visualization.ComboChart(document.getElementById('reg_domains')); var chart_div = document.getElementById('reg_domains_PNG'); var btnSave = document.getElementById('reg_domains_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('reg_domains') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("reg_domains") + ".png"; a.click(); }, false); } }; function charts4(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization4); function drawVisualization4() { var employee_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('string', 'Tipo'); data_table.addColumn('number', 'Cantidad'); for (var count = 0; count < employee_data.length; count++) { var cell_data = employee_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([cell_data[0], parseInt(cell_data[1])]); } } } } var options = { legend: 'legend', pieSliceText: 'pieSliceText', sliceVisibilityThreshold: 0, slices: { 0: { offset: 0.0, color: '#006991' }, 1: { offset: 0.0, color: '#0092c9' } }, }; var chart = new google.visualization.PieChart(document.getElementById('org_domains')); sessionStorage.setItem("org_domains", data_table.toJSON()); var chart_div = document.getElementById('org_domains_PNG'); var btnSave = document.getElementById('org_domains_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('org_domains') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("org_domains") + ".png"; a.click(); }, false); } }; function charts11(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization11); function drawVisualization11() { var employee_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('string', 'A帽o'); data_table.addColumn('number', 'Total'); for (var count = 0; count < employee_data.length; count++) { var cell_data = employee_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([cell_data[0], parseInt(cell_data[1])]); } } } } var formatter = new google.visualization.NumberFormat({ pattern: '####' }); formatter.format(data_table, 0); // Apply formatter to second column var options = { chart: { subtitle: '' }, hAxis: { title: 'A帽o' }, vAxis: { title: 'Registrars' }, backgroundColor: '#ffffff', colors: ['#006991'] }; var chart = new google.visualization.ColumnChart(document.getElementById('total_registrars')); sessionStorage.setItem("total_registrars", data_table.toJSON()); var chart_div = document.getElementById('total_registrars_PNG'); var btnSave = document.getElementById('total_registrars_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('total_registrars') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("total_registrars") + ".png"; a.click(); }, false); } }; } </script> <script> addr = window.location.href addr = addr.split("/") if(addr[addr.length - 1] === "geografia-nombres-de-dominio"){ google.charts.load('current', { 'packages':['geochart'], // Note: you will need to get a mapsApiKey for your project. // See: https://developers.google.com/chart/interactive/docs/basic_load_libs#load-settings //'mapsApiKey': 'AIzaSyBjijASrT8aWre4XU0ICj4guZztZtHpS0E' }); function ajax_data(type, url, success) { $.ajax({ type:type, url:url, dataType:"text", cache:false, timeout:20000, beforeSend :function(data) { }, success:function(data){ success.call(this, data); }, error:function(data){ alert("Error In Connecting"); } }); } $(document).ready(function () { url='../assets/csv/ftp_map_domains_world.csv'; ajax_data('GET',url, function(data) { maps1(data); }); url='../assets/csv/ftp_map_domains_all.csv'; ajax_data('GET',url, function(data) { maps2(data); }); url='../assets/csv/ftp_map_domains_us.csv'; ajax_data('GET',url, function(data) { maps3(data); }); url='../assets/csv/ftp_map_domains_ca.csv'; ajax_data('GET',url, function(data) { maps4(data); }); }); function maps1(data){ var csvData=data; google.charts.setOnLoadCallback(drawVisualization1); function drawVisualization1(){ var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('string', 'Estado'); data_table.addColumn('number', 'Cantidad'); for(var count = 0; count<csv_data.length; count++) { var cell_data = csv_data[count].split(","); for(var cell_count=0; cell_count<cell_data.length; cell_count++) { if(count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([cell_data[0],parseInt(cell_data[1])]); } } } } var options = { title: 'Dominios .MX', colorAxis: { colors: ['#e5f0f4', '#006991'] } }; var chart = new google.visualization.GeoChart(document.getElementById('domains_world')); sessionStorage.setItem("domains_world", data_table.toJSON()); var chart_div = document.getElementById('domains_world_PNG'); var btnSave = document.getElementById('domains_world_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('domains_world') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("domains_world") + ".png"; a.click(); }, false); } }; function maps2(data){ var csvData=data; google.charts.setOnLoadCallback(drawVisualization2); function drawVisualization2() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('string', 'Estado'); data_table.addColumn('number', 'Cantidad'); for(var count = 0; count<csv_data.length; count++) { var cell_data = csv_data[count].split(","); for(var cell_count=0; cell_count<cell_data.length; cell_count++) { if(count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([cell_data[0],parseInt(cell_data[1])]); } } } } var options = { title: 'Dominios .MX', region: 'MX', colorAxis: { colors: ['#e5f0f4', '#006991'] }, resolution: 'provinces' }; var chart = new google.visualization.GeoChart(document.getElementById('domains_mx')); sessionStorage.setItem("domains_mx", data_table.toJSON()); var chart_div = document.getElementById('domains_mx_PNG'); var btnSave = document.getElementById('domains_mx_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('domains_mx') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("domains_mx") + ".png"; a.click(); }, false); } }; function maps3(data){ var csvData=data; google.charts.setOnLoadCallback(drawVisualization3); function drawVisualization3() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('string', 'Estado'); data_table.addColumn('number', 'Cantidad'); for(var count = 0; count<csv_data.length; count++) { var cell_data = csv_data[count].split(","); for(var cell_count=0; cell_count<cell_data.length; cell_count++) { if(count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([cell_data[0],parseInt(cell_data[1])]); } } } } var options = { title: 'Dominios .MX', region: 'US', resolution: 'provinces', colorAxis: { colors: ['#e5f0f4', '#91becf'] } }; var chart = new google.visualization.GeoChart(document.getElementById('domains_us')); sessionStorage.setItem("domains_us", data_table.toJSON()); var chart_div = document.getElementById('domains_us_PNG'); var btnSave = document.getElementById('domains_us_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('domains_us') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("domains_us") + ".png"; a.click(); }, false); } }; function maps4(data){ var csvData=data; google.charts.setOnLoadCallback(drawVisualization4); function drawVisualization4(){ var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn('string', 'Estado'); data_table.addColumn('number', 'Cantidad'); for(var count = 0; count<csv_data.length; count++) { var cell_data = csv_data[count].split(","); for(var cell_count=0; cell_count<cell_data.length; cell_count++) { if(count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([cell_data[0],parseInt(cell_data[1])]); } } } } var options = { title: 'Dominios .MX', region: 'CA', resolution: 'provinces', colorAxis: { colors: ['#f0f5f7', '#e4f3f7'] } }; var chart = new google.visualization.GeoChart(document.getElementById('domains_ca')); sessionStorage.setItem("domains_ca", data_table.toJSON()); var chart_div = document.getElementById('domains_ca_PNG'); var btnSave = document.getElementById('domains_ca_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('domains_ca') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("domains_ca") + ".png"; a.click(); }, false); } }; } </script> <script> addr = window.location.href addr = addr.split("/") if(addr[addr.length - 1] === "usuarios-servicios-ipv4"){ google.charts.load("current", { packages: ["corechart"] }); function ajax_data(type, url, success) { $.ajax({ type: type, url: url, dataType: "text", cache: false, timeout: 20000, beforeSend: function (data) {}, success: function (data) { success.call(this, data); }, error: function (data) { alert("Error In Connecting"); } }); } $(document).ready(function () { url = "../assets/csv/ftp_column_ipv4.csv"; ajax_data("GET", url, function (data) { charts14(data); }); url = "../assets/csv/ftp_column_ipv6.csv"; ajax_data("GET", url, function (data) { charts15(data); }); url = "../assets/csv/ftp_column_asn.csv"; ajax_data("GET", url, function (data) { charts16(data); }); url = "../assets/csv/ftp_column_ipv4_ipv6.csv"; ajax_data("GET", url, function (data) { charts17(data); }); }); function charts14(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization14); function drawVisualization14() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn("number", "A帽o"); data_table.addColumn("number", "Total"); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([parseInt(cell_data[0]), parseInt(cell_data[1])]); } } } } var formatter = new google.visualization.NumberFormat({ pattern: "####" }); formatter.format(data_table, 0); // Apply formatter to first column var options = { chart: { title: "Asignaci贸n de Bloques IPv4", subtitle: "Cada unidad equivale a un bloque de 256 direcciones IPv4", logscale: true, }, hAxis: { title: "A帽o", format: "####", }, vAxis: { title: "Cantidad de bloques de direcciones IPv4", scaleType: "log", }, backgroundColor: "#ffffff", colors: ["#006991"], }; var chart = new google.visualization.ColumnChart(document.getElementById("blocks_ipv4")); chart.draw(data_table, options); sessionStorage.setItem("blocks_ipv4", data_table.toJSON()); var chart_div = document.getElementById('blocks_ipv4_PNG'); var btnSave = document.getElementById('blocks_ipv4_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('blocks_ipv4') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("blocks_ipv4") + ".png"; a.click(); }, false); } }; function charts15(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization15); function drawVisualization15() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn("number", "A帽o"); data_table.addColumn("number", "Total"); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([parseInt(cell_data[0]), parseInt(cell_data[1])]); } } } } var formatter = new google.visualization.NumberFormat({ pattern: "####" }); formatter.format(data_table, 0); // Apply formatter to first column var options = { chart: { title: "Asignaci贸n de Bloques IPv6", subtitle: "Cada unidad equivale a un bloque /48 de direcciones IPv6", logscale: true, }, hAxis: { title: "A帽o", format: "####", }, vAxis: { title: "Cantidad de bloques de direcciones IPv6", scaleType: "log", }, backgroundColor: "#ffffff", colors: ["#006991"], }; var chart = new google.visualization.ColumnChart(document.getElementById("blocks_ipv6")); sessionStorage.setItem("blocks_ipv6", data_table.toJSON()); var chart_div = document.getElementById('blocks_ipv6_PNG'); var btnSave = document.getElementById('blocks_ipv6_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('blocks_ipv6') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("blocks_ipv6") + ".png"; a.click(); }, false); } } function charts16(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization16); function drawVisualization16() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn("number", "A帽o"); data_table.addColumn("number", "Total"); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([parseInt(cell_data[0]), parseInt(cell_data[1])]); } } } } var formatter = new google.visualization.NumberFormat({ pattern: "####" }); formatter.format(data_table, 0); // Apply formatter to first column var options = { hAxis: { title: "A帽o", format: "####", }, vAxis: { title: "ASNs", viewWindow: { max: 70, min: 0, }, }, bar: { groupWidth: "80%" }, backgroundColor: "#ffffff", colors: ["#006991"], }; var chart = new google.visualization.ColumnChart(document.getElementById("asns")); sessionStorage.setItem("asns", data_table.toJSON()); var chart_div = document.getElementById('asns_PNG'); var btnSave = document.getElementById('asns_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('asns') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("asns") + ".png"; a.click(); }, false); } } function charts17(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization17); function drawVisualization17() { var csv_data = csvData.split(/\r?\n|\r/); var data_table = new google.visualization.DataTable(); data_table.addColumn("number", "A帽o"); data_table.addColumn("number", "IPv4"); data_table.addColumn("number", "IPv6"); for (var count = 0; count < csv_data.length; count++) { var cell_data = csv_data[count].split(","); for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers } else { if (cell_count === 0) { //Only add once per row data_table.addRow([ parseInt(cell_data[0]), parseInt(cell_data[1]), parseInt(cell_data[2]), ]); } } } } var formatter = new google.visualization.NumberFormat({ pattern: "####" }); formatter.format(data_table, 0); // Apply formatter to first column var options = { title: "Asignaci贸n de Bloques", sutitle: "IPv4: Cada unidad equivale a 256 direcciones IP | IPv6: Cada unidad equivale a un bloque /48.", vAxes: { 0: { title: "IPv4" }, 1: { title: "IPv6" }, }, hAxis: { title: "A帽o", format: "####", }, seriesType: "bars", series: { 0: { targetAxisIndex: 0, color: "#006991" }, // Bind series 0. 1: { targetAxisIndex: 1, color: "#03c689" }, // Bind series 0. }, }; var chart = new google.visualization.ComboChart(document.getElementById("blocks_ipall")); sessionStorage.setItem("blocks_ipall", data_table.toJSON()); var chart_div = document.getElementById('blocks_ipall_PNG'); var btnSave = document.getElementById('blocks_ipall_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('blocks_ipall') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("blocks_ipall") + ".png"; a.click(); }, false); } } } </script> <script> addr = window.location.href addr = addr.split("/") if(addr[addr.length - 1] === "usuarios-servicios-ipv4"){ google.charts.load('current', { packages: ['corechart'] }); function ajax_data(type, url, success) { $.ajax({ type: type, url: url, dataType: "text", cache: false, timeout: 20000, beforeSend: function (data) { }, success: function (data) { success.call(this, data); }, error: function (data) { alert("Error In Connecting"); } }); } $(document).ready(function () { url = '../assets/csv/ftp_service_slas.csv'; ajax_data('GET', url, function (data) { charts0(data); }); url = '../assets/csv/ftp_registrant_dom_scatter2.csv'; ajax_data('GET', url, function (data) { charts9(data); }); }); function charts0(data) { var csvData = data; google.charts.setOnLoadCallback(drawVisualization1); function drawVisualization1() { var employee_data = csvData.split(/\r?\n|\r/); var table_data = '<table class="table table-bordered table-striped">'; var data_table = new google.visualization.DataTable(); data_table.addColumn('string', 'Servicio'); data_table.addColumn('number', 'Meta'); data_table.addColumn('number', 'Jul-2024'); data_table.addColumn('number', 'Ago-2024'); data_table.addColumn('number', 'Sep-2024'); data_table.addColumn('number', 'Oct-2024'); for (var count = 0; count < employee_data.length; count++) { var cell_data = employee_data[count].split(","); table_data += '<tr>'; for (var cell_count = 0; cell_count < cell_data.length; cell_count++) { if (count === 0) { //Ignore headers table_data += '<th>' + cell_data[cell_count] + '</th>'; } else { if (cell_count === 0) { //Only add once per row data_table.addRow([cell_data[0], parseFloat(cell_data[1]), parseFloat(cell_data[2]), parseFloat(cell_data[3]), parseFloat(cell_data[4]), parseFloat(cell_data[5])]); table_data += '<td>' + cell_data[cell_count] + '</td>'; } else { table_data += '<td>' + cell_data[cell_count] + '%</td>'; } } } table_data += '</tr>'; } table_data += '</table>'; $('#table_slas').html(table_data); var formatter = new google.visualization.NumberFormat({ pattern: '##.00', suffix: '%' }) formatter.format(data_table, 1); // Apply formatter to second column formatter.format(data_table, 2); formatter.format(data_table, 3); formatter.format(data_table, 4); formatter.format(data_table, 5); var options = { chart: { title: 'SLAs mensuales de Servicios .MX', subtitle: 'EPP, Whois, DNS' }, hAxis: { viewWindow: { min: 95, max: 100 } }, colors: ['#708090', '#26b566', '#eb8258', '#a092c9', '#0092c9'], bars: 'horizontal', displayExactValues: true }; var chart = new google.visualization.BarChart(document.getElementById('month_slas')); sessionStorage.setItem("month_slas", data_table.toJSON()); var chart_div = document.getElementById('month_slas_PNG'); var btnSave = document.getElementById('month_slas_PDF'); google.visualization.events.addListener(chart, 'ready', function () { btnSave.disabled = false; chart_div.disabled = false; }); chart.draw(data_table, options); btnSave.addEventListener('click', function () { var doc = new jsPDF({orientation: 'landscape'}); doc.addImage(chart.getImageURI(), 5, 10) doc.save(changeName('month_slas') + '.pdf'); }, false); chart_div.addEventListener('click', function () { var a = document.createElement("a"); a.href = chart.getImageURI(); a.download = changeName("month_slas") + ".png"; a.click(); }, false); } }; } </script> <link rel="stylesheet" href="styles.221dd402671c2fe0.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.221dd402671c2fe0.css"></noscript></head> <body> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KMPX2FK" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <app-root></app-root> <script src="runtime.903f6da72c5c095d.js" type="module"></script><script src="polyfills.a8af8bf77d316c82.js" type="module"></script><script src="main.1484735dc9f8043b.js" type="module"></script><script type="text/javascript" src="/_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3&ns=1&cb=504172816" async></script></body> </html>