• Home
  • New Entries
  • Popular Entries
  • Submit a Story
  • About

Google Chart API ...

You may have seen quite a bit about the new Google Chart API, but you may not have seen a real world example. In the recent release of the Digg Bury Recorder I got some first hand practice in using th Google Chart API. When developing the application I found a few interesting nuances and knowledge of these could help you in using the API in your applications.

View More Info

One of the most interesting things that I found is that the charting always graphs on a 100x100 basis starting at 0,0. This presented some issues in our application as it needed to graph things like 25 buries and 1200 diggs. The way that I solved this issue was to find the greatest number on each axis and take 100 divided by the greatest number from the points on each axis. Once you get this number you multiply each point it by the appropriate scaler for each axis (although it may not work correctly with points that are less than zero and you would have to adjust the equation to work around that).

The below is an example of an URL that would be used to create a line chart (this is taken directly from the Digg Bury Recorder).

http://chart.apis.google.com/chart?chs=300x225&chd=t:9,16,51,51,51,52,58,59,61,62,63,67,69,69,69,72,74,74,89,93,96,98,100,100|4,8,12,16,20,25,29,33,37,41,45,50,54,58,62,66,70,75,79,83,87,91,95,100&cht=lxy&chxt=x,y&chxr=0,0,155|1,0,24

The parts of this URL that I would like to point out are below:

    * chxr=0,0,155|1,0,24 - This builds the markers of the graph (in our application I used the greatest value for each axis)
    * &cht=lxy - This specifies an X, Y line chart that uses actual points (if you look at the Google Chart API documentation you will see that most examples use helloworld as the points, as each letter has a numeric value, but I prefer to just pass in numbers)
    *

      chd=t:9,16,51,51,51,52,58,59,61,62,63,67,69,69,69,72,74,74,89,93,96,98,100,100|4,8,12,16,20,25,29,33,37,41,45,50,54,58,62,66,70,75,79,83,87,91,95,100

      - This is a list of all the points (scaled as I mentioned before). It is important to note that a | is used to separate each axis.

The above Google Chart API URL will result in the below graph.


source: ajaxonomy

 View Full Story.
Posted at 10:49:59 am | Permalink | Posted in Google  Tutorials  

Related Stuff

  • MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.

  • Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone

  • TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support

  • ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.

  • Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.

  • Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software

  • PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.

Be the first ... |Add your comment.

Your Comment ...

  Name (required)

  Email (required, hidden)

  Website


About Ajaxlines

Ajaxlines is a project focused on providing its audience with a database of most of Ajax related articles, resources, tutorials and services from around the world.

Its purpose is to showcase the power of Ajax and to act as a portal to the Ajax development community.


Recent Stuff

Using ASP.NET AJAX JSON Asynchronous Web Services

Growl for Windows and a Web Notification API

Learn AJAX from Scratch - Part II

Learn AJAX from Scratch - Part I

PHP AJAX CHAT, Bug fixes - including weird mozilla bug

Learn PHP From Scratch


Our Partners

Ajax Projects

Web 2.0 Sites

Webloglines

Human Development Handbook

Software Development Company

Ajaxlines


Search


Topics

  • .Net (96)
  • Articles (76)
  • Bookmarking (35)
  • Calendar (18)
  • Chat (38)
  • ColdFusion (3)
  • CSS (30)
  • Email (23)
  • Flash (13)
  • Games (6)
  • Google (17)
  • Html (6)
  • Image (11)
  • International Calls & VOIP (7)
  • Java (34)
  • Javascript (146)
  • JSON (16)
  • Perl (2)
  • PHP (82)
  • Presentation (19)
  • Python (3)
  • Resources (1)
  • RSS (1)
  • Ruby (7)
  • Storage (4)
  • Toolkits (87)
  • Tutorials (190)
  • UI (11)
  • Utilities (161)
  • Web2.0 (13)
  • XmlHttpRequest (18)
  • YUI (4)

© 2006 www.ajaxlines.com. All Rights Reserved. Powered by IRange