Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8037955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:04:39+00:00 2026-06-05T03:04:39+00:00

I am desperately trying to get my GoogleChart working. This code always throws an

  • 0

I am desperately trying to get my GoogleChart working. This code always throws an error though:

        function drawChart() 
        { 
          var data = new google.visualization.DataTable(); 
          data.addColumn('number', 'hour'); 
          data.addColumn('number', 'TriggerCount'); 
          var JsonManuallyEncoded = '{1:{1:01,2:4},2:{1:03,2:4},3:{1:04,2:48},4:{1:05,2:59},5:{1:06,2:59},6:{1:07,2:87},7:{1:08,2:62},8:{1:09,2:46},9:{1:10,2:61},10:{1:11,2:71},11:{1:12,2:54},12:{1:13,2:61},13:{1:14,2:89},14:{1:15,2:58},15:{1:16,2:122},16:{1:17,2:108},17:{1:18,2:64},18:{1:19,2:50},19:{1:20,2:10},20:{1:21,2:18}};'
          data.addRows(JsonManuallyEncoded);


        var chart = new google.visualization.ColumnChart(document.getElementById('chart_div')); 
        chart.draw(data);}

The Firefox console says: “Argument given to addRows must be eiter a number or an array”.
I suspect that the format of the JSON string is not correct, but I cannot figure out what’s wrong. Can somebody please identify my mistake? It’s probably trivial but I am spending hours on this already…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:04:40+00:00Added an answer on June 5, 2026 at 3:04 am

    Have you looked at the documentation for addRows? but you should not pass the row data to addRows as a JSON encoded string, you should pass a array of arrays data structure. I think there may be other API functions for passing a JSON string so i recommend you to read the documentation and look at the examples.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now I'm trying desperately to get @font-face to work in my website. This
Okay... I'm getting kind of desperate trying to get this code to work with
I am trying desperately to get a maven maven-glassfish-plugin working to start my domain
I've got a Sony network camera (SNC-RZ25N) that I am trying desperately to get
I'm trying, desperately, to get into C++ programming with DirectX. It's been a steep
I'm desperate for a solution to this. I'm trying to develop Assembly code allowing
I am desperately trying to get my head wrapped around how to implement home
I am new to Ruby on Rails and I'm desperately trying to get a
I am new to ASP.NET MVC3 and trying desperately to just get something simple
For a long time I tried desperately to get this to work, I've googled,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.