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 6190523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:36:17+00:00 2026-05-24T02:36:17+00:00

I have been trying to plot these on a scatter chart using google api.

  • 0

I have been trying to plot these on a scatter chart using google api. But it doesn’t seem to work.

S.No:1 Price:0.632 Volume:10.26
S.No:2 Price:0.631 Volume:10
S.No:3 Price:0.631 Volume:20
S.No:4 Price:0.631 Volume:4.65

I have hundred entries like this, which represents the bitcoin value.

I want to plot it in a way that price in on the vertical axis and Serial no. in horizontal axis. The volume will define the diameter of the circle.

<html>
  <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('number', 'Transactions');
        data.addColumn('number', 'Price');
        data.addRows(6);
        data.setValue(1, 0.632, 10.26);
        data.setValue(2, 0.631, 10);
        data.setValue(3,0.631, 20);
        data.setValue(4, 0.631, 4.65);



        var chart = new google.visualization.ScatterChart(document.getElementById('chart_div'));
        chart.draw(data, {width: 400, height: 240,
                          title: 'Bitcoins Transaction Prices',
                          hAxis: {title: 'Transactions', minValue: 1, maxValue: 100},
                          vAxis: {title: 'Price', minValue: 0, maxValue: 5},
                          legend: 'none'
                         });
      }
    </script>
  </head>

  <body>
    <div id="chart_div"></div>
  </body>
</html>

This returns a blank page for me. Whats possibly wrong? I follow this example.
My php code from which i get the values is given below.

<?php
//get the unix time stamp of day 30 days back from today
$last_thirty = strtotime('-30 days'); 
//get the unix time stamp of day 1 month back from today
$last_month = strtotime("-1 month"); 
//get the data using bitcoinchart http api
$json = file_get_contents('http://bitcoincharts.com/t/lasttrades.json?limit=10&since=' . $last_month);
//decode json to php array
$data = json_decode($json);
$no = 1;
//loop through it
foreach ($data as $item) {
    $sn =  "S.No:".$no . "";
    $price = "Price:{$item->price}";
    $volume = "Volume:{$item->volume}";
    $no++;
    echo $sn . "<br/>";
    echo $price . "<br/>";
    echo $volume . "<br/>";

} ?>
  • 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-05-24T02:36:18+00:00Added an answer on May 24, 2026 at 2:36 am

    The complete documentation can be found here.
    http://code.google.com/apis/chart/interactive/docs/customizing_charts.html

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

Sidebar

Related Questions

I have been trying to make a case for using Python at my work.
Has anyone managed to use core-plot from wax? I have been trying recently, but
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL,
I have been trying to work my way through Project Euler, and have noticed
I have been trying to define multiple combo boxes in R using the tcltk
I have been trying to implement XOR linked list and its operations but I
I have been trying to get this to work. Basically I have a search
I have been trying this for so long, but was not able to implement
I have been trying to serialize some json data in Silverlight. I am using
I have been trying to find a really fast way to parse yyyy-mm-dd [hh:mm:ss]

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.