Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

74
Vistas
Error de referencia no detectado con Google Chart

Quiero filtrar la vista de mi gráfico de dispersión de Google cuando se carga el sitio web. Hay diferentes casillas de verificación, que se marcan cuando se carga el sitio web y una función debe verificar el estado de las casillas de verificación y filtrar las filas de los datos del gráfico en consecuencia. Esta es la función que uso cuando se carga el sitio web:

 // Filter for the initial draw of the ScatterChart $(window).on('load', function() { document.getElementById("checkbox_18650").checked = true; document.getElementById("checkbox_21700").checked = true; checkCells(); });

En Firefox, todo funciona bien, pero en Chrome aparece un error de referencia no detectado, que indica que "checkCells" no está definido. La función checkCells tiene el siguiente aspecto y se declara encima de la función onload:

 checkCells = function() { var values = []; if (document.getElementById("checkbox_pouch").checked == true) { values.push('pouch'); } if (document.getElementById("checkbox_18650").checked == true) { values.push('18650'); } if (document.getElementById("checkbox_21700").checked == true) { values.push('21700'); } if (document.getElementById("checkbox_prismatic").checked == true) { values.push('prismatic'); } if (document.getElementById("checkbox_pouch").checked == false && document.getElementById("checkbox_18650").checked == false && document.getElementById("checkbox_21700").checked == false && document.getElementById("checkbox_prismatic").checked == false) { values.push('empty'); } if (values.length > 0) { var myRows = view.setRows(data.getFilteredRows([{ column:2, test: function (value) { return (values.indexOf(value) > -1); } }])); } capacityRangeSlider.draw(myRows); energyRangeSlider.draw(myRows); powerRangeSlider.draw(myRows); currentRangeSlider.draw(myRows); dashboard.draw(view, drawOptions); };

¿Alguien tiene una idea de cómo solucionar este problema?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda