Click here to Skip to main content
Licence CPOL
First Posted 22 Jan 2011
Views 13,040
Bookmarked 9 times

Google Charting API and Formula Imaging

By | 3 Oct 2011 | Tip/Trick
Use Google APIs to create Graphical Formulas

Having trouble writing or posting articles? These articles aim to gather together tips and tricks from authors and mentors to help you write great articles.

Update: 3rd Oct, the link to the chart playground should now work after Google appeared to have moved things around, if it breaks again, just visit code.google.com, and go to the charting section.
 
Recently I wrote an article and it used some formula, and had the formula shown in text format which ends up with the likes of the following;
α = 2Atan( H1 / ( √(((2H1D)/2)-H12)))
 
I am sure you would agree that it doesn't look very pretty. I wanted to turn this into something more presentable.
 
In the end, I came across Google Chart Tools / Image Tools here[^], which use the TeX notation for building graphical representations on formula.
 
A little more hunting and I found a useful cheat sheet for TeX Notation here[^]
 
Putting things together, you can then save the outputed image for your local use. Here is the example from the above in text linked directly to the Google API:

 
The API construct for this is:
cht=tx
chl=\alpha=2Atan{\HUGE[}\frac{H_{1}}{\sqrt((\frac{2H_{1}D}{2})-H_{1}^2)}{\HUGE]}
 
For more information, click here[^] to take you to this API page with this example already loaded.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

DaveAuld

Engineer
Apache North Sea Ltd.
United Kingdom United Kingdom

Member

Follow on Twitter Follow on Twitter
Google+
I have been working in the Oil & Gas Industry for over 20 years now.
 
Core Discipline is Instrumentation and Control Systems.
 
Working my way though BSC Honours Degree (B29 in Computing) with the Open University, 300/360 points completed. Currently half way through 'Developing applications with VB', had a free choice to fill 30 points so why not! Kicked off the final project in January should be finished in October, and hopefully that is the degree all done.
 
Currently, Offshore Installation Manager for the Forties Bravo and Charlie Platforms, which are located ~110Miles NE of Aberdeen, Scotland in the North Sea.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralReason for my vote of 5 Cool :-) Pinmemberraja_krish6:05 8 Jun '11  
GeneralReason for my vote of 5 Very useful. PinmemberLokanta_brahmachari4:30 25 Jan '11  
GeneralReason for my vote of 5 Great simple summary of a service I ... PinmemberPhil Martin...12:45 23 Jan '11  
GeneralRe: I recently started poking around http://code.google.com, sur... PinmentorDaveAuld19:12 23 Jan '11  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120528.1 | Last Updated 3 Oct 2011
Article Copyright 2011 by DaveAuld
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid