Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

76
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda