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

251
Views
Formato de tabla de datos no válido: debe tener al menos 2 columnas. - Gráfico de columnas de Google Ajax

Tengo un problema con Invalid data table format: must have at least 2 columns. error de mi código. Sé que hay una respuesta aquí , pero no es para mí.

Tomé la idea de ajax de google pero es para un gráfico circular. Más tarde encontré este enlace que parece ser útil. Nuevamente, mientras sigo las instrucciones de la página, mala suerte para mí.

json

 [ ["Time","Order","Delivered","Income"], ["00:00",52327,0,52327], ["04:00",39703,0,39703], ["08:00",189949,0,189949], ["12:00",209406,0,209406], ["16:00",134622,0,134622],["20:00",121045,0,121045] ]

JS

 google.charts.load('current', { 'packages': ['bar'] }); google.charts.setOnLoadCallback(drawChart); function drawChart() { var jsonData = $.ajax({ url: "https://paste-bin.xyz/raw/12684",//ajax data dataType: "json", async: false }).responseText; // Create our data table out of JSON data loaded from server. var data = new google.visualization.DataTable(jsonData); var chart = new google.charts.Bar(document.getElementById('chart1')); chart.draw(data); }

De acuerdo con la referencia tanto en Google como en el tutorial, debería funcionar. También hago una versión de violín aquí: https://jsfiddle.net/c3sd61rv/ (versión clásica aquí: https://jsfiddle.net/y5o7L0dn/1/ )

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!