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

72
Vistas
Uncaught reference error with Google Chart

I want to filter the view of my Google Scatter Chart when the webiste is loaded. There are different checkboxes, which get checked when the website is loaded and a function should check the status of the checkboxes and filter the rows of the chart data accordingly. This is the function, I use when the webiste is loaded:

// 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();
  });

In Firefox everything is working fine, but in Chrome I get an uncaught reference error, that the "checkCells" is not defined. The checkCells function look like the following and is declared above the onload function:

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);
      };

Anybody got an idea on how to fix this issue?

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