Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

73
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!