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

  • SEARCH
  • Home
  • 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 8289233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:27:38+00:00 2026-06-08T12:27:38+00:00

So I have the following code I want to embed in my website, the

  • 0

So I have the following code I want to embed in my website, the purpose of which is to display daily and monthly website metrics in tabular form.

I’m trying to mock the page up, but I am running into a roadblock: I can’t seem to find a way to render two different google charts using the google charts API.

I’m sure it’s an incredibly silly mistake that I’m just not seeing, but I’ve been looking into this for about an hour now and just can’t figure out how to display two tables.

<!DOCTYPE html>
<html>
  <head>
    <script type='text/javascript' src='https://www.google.com/jsapi'></script>
    <script type='text/javascript'>
      google.load('visualization', '1', {packages:['table']});
      google.setOnLoadCallback(drawDailyTable);
      function drawDailyTable() {
        var Dailydata = new google.visualization.DataTable();
        Dailydata.addColumn('string', 'Metric');
        Dailydata.addColumn('number', 'Number');
        Dailydata.addRows([
          ['Total Daily Unique Users',  {v: 462, f: '462'}],
          ['Total Daily Visits',   {v:6702,   f: '6,702'}]
        ]);
        var Dailytable = new google.visualization.Table(document.getElementById('table_div'));
        Dailytable.draw(Dailydata, {showRowNumber: true});
      }
    </script>


    <script type='text/javascript' src='https://www.google.com/jsapi'></script>
    <script type='text/javascript'>
      google.load('visualization', '1', {packages:['table']});
      google.setOnLoadCallback(drawMonthlyTable);
      function drawMonthlyTable() {
      var Monthlydata = new google.visualization.DataTable();
        Monthlydata.addColumn('string', 'Metric');
        Monthlydata.addColumn('number', 'Number');
        Monthlydata.addRows([
          ['Total Monthly Unique Users',  {v: 12875, f: '12,875'}],
          ['Total Monthly Visits',   {v:37980,   f: '37,980'}]
        ]);
        var Monthlytable = new google.visualization.Table(document.getElementById('table_div'));
        Monthlytable.draw(Monthlydata, {showRowNumber: true});
        }
    </script>
  </head>

  <body>
    <div id='table_div'></div>
  </body>
</html>
  • 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-08T12:27:41+00:00Added an answer on June 8, 2026 at 12:27 pm

    I figured it out, in my drawtable functions where it says: document.getElementById('table_div'), I just renamed the ID for each respective table to document.getElementById('dailytable_div') and document.getElementById('monthlytable_div'), and then edited my body to look like this:

      <body>
        <div id='dailytable_div'></div>
        <div id='monthlytable_div'></div>
      </body>
    

    Problem solved!

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

Sidebar

Related Questions

I want to know is below code correct ? I have following code which
I have the following code: // Dictionary which I want to optimize Dictionary<string, MyClass>
I have the following php code which I want to add a delay too:
I have the following code, which I want to load values on a selection
I have the following (here simplified) code which I want to test with FakeItEasy
I have following code snippet in jquery.In which,I want to animate each element of
I have the following code which I want to be running asynchronously, but the
I have the following code which I want to use to make sure that
I have following code and i want to pass additional parameter in JSON.getJSONfromURL() method
I have the following code I want to run, but the problem is $this->type

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.